Skip to content

Use an editable combobox for the Cloud Run region field (DT-4232)#3636

Merged
rossnelson merged 3 commits into
mainfrom
dt-4232
Jul 13, 2026
Merged

Use an editable combobox for the Cloud Run region field (DT-4232)#3636
rossnelson merged 3 commits into
mainfrom
dt-4232

Conversation

@rossnelson

@rossnelson rossnelson commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

What

Replaces the free-text gcpRegion input on the Create Worker Deployment form (Cloud Run provider) with an editable Holocene Combobox, and makes the suggestion list configurable.

  • Suggests known GCP Cloud Run regions from a new GCP_REGIONS list.
  • Allows a custom region not in the list via allowCustomValue, so an unsupported-by-us region never blocks deployment creation.
  • Keeps the field visible and editable (no auto-hide, no forced default). The existing gcp-region-hint is preserved below the field.
  • Exposes an optional gcpRegions?: string[] prop, threaded page -> form -> compute-fields, so cloud-ui can pass its own region list. When omitted, the built-in GCP_REGIONS default applies.

Combobox fix

While wiring this up, found a latent bug in the shared Holocene Combobox: addCustomValue unconditionally cleared the input (displayValue = '') after selecting. For single-select this blanked the field even though the value was stored, so a newly added custom value looked unselected. That clear is only meant for multiselect (reset the input for the next chip), so it is now guarded with if (multiselect). The only other allowCustomValue consumer (nexus-form) is multiselect, so this path was never exercised before.

Why

The worker's region is always a GCP (Cloud Run) region, while the Namespace region may be AWS or Azure, so defaulting to the Namespace region is not reliable. Our GetRegions list only covers regions we support for hosting a namespace, not all GCP regions a Cloud Run worker pool can use. This offers helpful suggestions without limiting the user.

Notes

  • Skipped the optional Namespace-region pre-fill: the ticket flags the Namespace region as an unreliable GCP default and the plumbing was not warranted.
  • No schema change needed; gcpRegion stays a required non-empty string, which allows custom values.

Testing

  • pnpm check passes (0 errors)
  • pnpm lint passes (0 errors)

Jira: DT-4232

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Jul 7, 2026 7:50pm

Request Review

@temporal-cicd

temporal-cicd Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️

📊 Strict Mode: 10 errors in 1 file (1.2% of 858 total)

src/lib/holocene/combobox/combobox.svelte (10)
  • L154:4: Type 'null' is not assignable to type 'string'.
  • L157:4: Type 'null' is not assignable to type '"search" | "link" | "success" | "error" | "action" | "activity" | "add-square" | "add" | "apple" | "archives" | "arrow-down" | "arrow-left" | "arrow-up" | "arrow-right" | "ascending" | ... 146 more ... | "xmark-square"'.
  • L159:4: Type 'null' is not assignable to type 'keyof T'.
  • L244:4: 'inputElement' is possibly 'null'.
  • L245:4: 'inputElement' is possibly 'null'.
  • L251:14: Argument of type 'string | T | undefined' is not assignable to parameter of type 'string | T'.
  • L256:14: Argument of type 'string | T | undefined' is not assignable to parameter of type 'string | T'.
  • L302:60: Function lacks ending return statement and return type does not include 'undefined'.
  • L395:10: Type 'HTMLLIElement | null' is not assignable to type 'HTMLLIElement'.
  • L395:43: 'menuElement' is possibly 'null'.

Generated by 🚫 dangerJS against 2d986ce

@rossnelson
rossnelson marked this pull request as ready for review July 7, 2026 20:06
@rossnelson
rossnelson requested a review from a team as a code owner July 7, 2026 20:07
@rossnelson
rossnelson enabled auto-merge (squash) July 7, 2026 20:07
showChevron
required
/>
{#if !errors.gcpRegion?.[0]}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably make hintText part of Combobox so it can associate the hint text with with the form field via aria-desbribedby. right now the hint text is not associated for accessibility tech users.

@rossnelson
rossnelson merged commit 4507115 into main Jul 13, 2026
32 checks passed
@rossnelson
rossnelson deleted the dt-4232 branch July 13, 2026 16:24
rossedfort added a commit that referenced this pull request Jul 13, 2026
Auto-generated version bump from 2.52.0 to 2.52.1

Bump type: patch

Changes included:
- [`3be0df00`](3be0df0) fix(schedules): default absent second/minute/hour to 0 when editing (#3653)
- [`508b65b7`](508b65b) fix(schedules): default emptied second/minute/hour to 0 on submit (#3655)
- [`1f0e149c`](1f0e149) fix(workers): reject $LATEST qualifier in Lambda ARN validation (#3657)
- [`b42b0776`](b42b077) a11y(2.4.3): inert-based focus containment + restore; drop trap from native dialogs (#3598)
- [`cc491a29`](cc491a2) a11y(2.4.3): keep toast live region announcing during a focus trap [DT-4252] (#3654)
- [`ddc7f8e2`](ddc7f8e) a11y(2.4.11): add scroll-padding so sticky overlays don't obscure focused elements (#3532)
- [`b7e3a472`](b7e3a47) FilterBar icon update (#3660)
- [`09318ec6`](09318ec) Add danger PR comment for api version bump (#3662)
- [`273cc4be`](273cc4b) a11y(4.1.2): add label prop to Button primitive and enforce accessible names (#3556)
- [`4507115f`](4507115) Use an editable combobox for the Cloud Run region field (DT-4232) (#3636)
- [`694a7471`](694a747) a11y(1.4.13): migrate saved-query nav tooltips to Tooltip primitive (#3607)
- [`8b384a40`](8b384a4) a11y(4.1.2): fix nested interactive elements in Copyable component (#3558)
- [`1bfd2750`](1bfd275) fix describe SANO API requests to include runId parameter (#3661)
- [`ba18b43e`](ba18b43) a11y(4.1.2): require label on CodeBlock primitive; add aria-readonly for read-only mode (#3557)
- [`6e2290f1`](6e2290f) feat(deployments): make compute provider picker configurable (#3659)
- [`4470b76a`](4470b76) fix(workers): persist WDV compute-config edits via update mask; revert $LATEST validation (#3658)
- [`17fd591b`](17fd591) fix(nexus-operations): make start standalone nexus operation timeouts optional (#3656)

Co-authored-by: rossedfort <[email protected]>
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.

2 participants