feat(canvas): surface + select per-workspace cloud provider #2404
Reference in New Issue
Block a user
Delete Branch "feat/workspace-cloud-provider"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Surface + select the per-workspace cloud provider in the canvas. The control plane and workspace-server already support it end-to-end (
compute.provider:aws|gcp|hetzner→ forwarded to CP'sWorkspaceProvisioner, persisted inworkspaces.compute, returned byGET /workspaces) — the canvas was the only layer dropping it, so everything silently defaulted to AWS and you couldn't tell which cloud a workspace ran on.Changes
store/socket.ts— addprovider?toWorkspaceCompute(GET already returned it; it was just untyped/dropped).tabs/ContainerConfigTab.tsx— read-only Provider badge (AWS/GCP/Hetzner, default AWS) in the Container Config header. Provider is set at create time and changing a workspace's cloud requires a recreate, so it isn't editable here. Important: the Save path rebuilds the wholecomputeobject, so it now preservesprovider— otherwise a Container-Config save would wipe the persisted provider and mislead the badge.CreateWorkspaceDialog.tsx— a Cloud provider picker (awsdefault /gcp/hetzner) in Container Config, SaaS-only (the cloud backend is only meaningful when CP provisions the box). Threadsproviderinto both compute branches of the create payload.A workspace whose cloud differs from its tenant's is reached over a per-workspace Cloudflare tunnel (runtime#95), so e.g. a GCP/Hetzner workspace can live under an AWS tenant and vice-versa.
Test plan
npm run build✓ (production build green)npm run lint✓ ;tsc --noEmitclean on all three changed files (pre-existing__tests__mock-typing errors are unrelated; canvas has notestscript so CI gates on build+lint).No backend changes — the API/CP plumbing already exists.
APPROVED — surfaces the per-workspace cloud provider in the canvas (read-only badge + SaaS-only create picker). Backend already supports compute.provider end-to-end; this is the UI layer. Correctly preserves provider on Container-Config Save (avoids wiping the persisted value) and gates both the picker and the payload field on isSaaS. Build + full vitest green.
APPROVED (security) — no new secrets, no auth/access-control changes; provider is a non-sensitive enum (aws/gcp/hetzner) already accepted + validated server-side. Read-only badge + create picker only. Second approval.
New commits pushed, approval review dismissed automatically according to repository settings
New commits pushed, approval review dismissed automatically according to repository settings
APPROVED — re-approve on
88a310f367(added SaaS picker test coverage). Build + vitest green.APPROVED (security) — re-approve on
88a310f367. No security surface; test-only addition.