Skip to content

Add per-option controls and structured cluster labels to the cloud provider dropdown - #2694

Draft
morgan-wowk wants to merge 1 commit into
masterfrom
add-eo9-cloud-provider-and-option-controls
Draft

Add per-option controls and structured cluster labels to the cloud provider dropdown#2694
morgan-wowk wants to merge 1 commit into
masterfrom
add-eo9-cloud-provider-and-option-controls

Conversation

@morgan-wowk

@morgan-wowk morgan-wowk commented Sep 1, 2026

Copy link
Copy Markdown

What

Extends the schema-driven Cloud Provider dropdown (TaskNode annotations editor) with per-option controls, richer structured option labels, and legacy-key resolution — no new dropdown, reusing the existing launcher_annotation_schemas-derived pipeline.

Per-option controls

  • active — an option shows only when x-active !== false and its feature-flag-key (if any) is enabled.
  • label ≠ value — the option's title gives a friendly display name while the value written to the backend stays the launcher key.
  • deprecatedx-deprecated (+ optional x-deprecated-message) renders a small TriangleAlert icon with a tooltip beside the option, reusing the existing inline icon+tooltip primitive.

Structured provider / project / cluster labels

New x-provider / x-project / x-cluster schema fields flow onto AnnotationOption. When provider is present the dropdown item renders two lines — a primary provider line and a muted cluster · project secondary line — so an option can identify platform, project, and cluster at a glance while staying accessible and following the existing UI primitives.

To keep the collapsed control compact, the trigger no longer uses SelectValue; it renders a single-line summary (provider · cluster) from the selected option. Radix still tracks the value via each SelectItem's value, and the rich content remains inside ItemText for typeahead/a11y.

Legacy-key resolution

resolveLauncherKey maps a persisted cloud_provider value onto its current launcher key via an x-legacy-keys alias array on the canonical entry. getProviderSchema and the compute-resources editor resolve through it, so an overlay can rename a launcher key (e.g. google → a cluster id) without stranding existing pipelines that persisted the old value — they keep resolving to the renamed launcher instead of rendering an empty compute panel. When no alias applies the value passes through unchanged, so this is a no-op for current keys.

System / UX impact

  • Both the v1 (AnnotationsSection) and v2 (ConfigurationSection) editors render through the same AnnotationsInput, so this covers both.
  • Options with no x-provider (e.g. Davies) keep the existing single-line rendering.
  • Purely additive schema fields; existing configs are unaffected.

Tests

AnnotationsEditor/utils.test.ts covers the parse layer: x-active gating (both mechanisms), label ≠ value, deprecated flag + message (launcher and enum paths), provider/project/cluster population, and resolveLauncherKey / getProviderSchema legacy-key resolution. pnpm typecheck, pnpm lint, pnpm test, pnpm format:check all pass.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: add-eo9-cloud-provider-and-option-controls/2f4d0cb

Copy link
Copy Markdown
Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@morgan-wowk
morgan-wowk force-pushed the add-eo9-cloud-provider-and-option-controls branch from 76d5e74 to 996d2ea Compare September 1, 2026 22:10
@morgan-wowk morgan-wowk changed the title Add active and deprecated controls to cloud provider options Add per-option controls and structured cluster labels to the cloud provider dropdown Sep 1, 2026
@morgan-wowk
morgan-wowk force-pushed the add-eo9-cloud-provider-and-option-controls branch 2 times, most recently from 86818aa to 63856db Compare September 4, 2026 21:18
@morgan-wowk
morgan-wowk force-pushed the add-eo9-cloud-provider-and-option-controls branch from 63856db to 2f4d0cb Compare September 4, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant