chore(desktop,trpc,db): delete v1 cloud secrets surface and dead v1 cloud routers
Teardown Wave A, slice 1
Deletes dead v1 cloud code confirmed unused by telemetry (zero secrets.* / v1 project.* / workspace.* API calls in 90 days) and repo-wide caller audits.
Removed
- Desktop cloud secrets/env settings tree (15 files) — URL-only reachable, flag-gated, not linked from settings nav
- v1
projectrouter incl.secretssub-router + crypto/validation utils - v1 cloud
workspacerouter (ensure/create/delete, zero callers since #2836 era) host.ensureClient(write-only, zero callers)secrets+sandbox_imagestables (migration0066, generated via drizzle-kit; no Electric shapes, no inbound FKs) + relations/zod/typesSECRETS_ENCRYPTION_KEYfrom trpc/api env schemas (only consumer deleted; deploy-workflow env refs left as a follow-up)project/workspaceentries fromCLOUD_TRPC_ROUTER_ROOTS
Untouched by design (Wave B, adoption-gated): v1 workspaces table + enums/zod, v2_clients, device_presence, electric-proxy allowlist, cloud-access flag (reused for sandbox rollout).
Compat: old builds calling a deleted procedure get a clean tRPC NOT_FOUND on that call (dead settings page / retired background sync only) — no sync streams or crash paths involved.
Verification: lint clean · typecheck 38/38 (incl. desktop route-tree regen) · db 13/13, api 17/17, desktop renderer 1451/1451 tests.
Part of the Sandbox Workspaces cleanup track (see the Sandboxes Notion page for the plan set).
Summary by cubic
Removes the v1 cloud secrets UI and v1 cloud routers to reduce dead surface ahead of Sandbox Workspaces. Previously a URL-only settings page and project.*/workspace.*/secrets.* procedures were available; now they are deleted and any calls return tRPC NOT_FOUND without affecting other flows.
- Drops
secretsandsandbox_imagestables via migration 0067 inpackages/db; removes related schema, relations, and zod types. - Deletes v1
projectandworkspacerouters andhost.ensureClientinpackages/trpc; prunespackages/trpc/src/root.ts; removesSECRETS_ENCRYPTION_KEYfrom env schemas inapps/apiandpackages/trpc. - Removes the desktop cloud secrets settings tree and search entry in
apps/desktop; updatesCLOUD_TRPC_ROUTER_ROOTSto dropprojectandworkspace.
Rollout
- Run migration 0067.
- Remove
SECRETS_ENCRYPTION_KEYfrom deploy environments once workflows are cleaned. - Monitor for NOT_FOUND errors from old builds that still call deleted procedures.
Summary by CodeRabbit
- Removed Features
- Removed project and workspace management APIs.
- Removed project cloud settings and environment-variable management, including adding, editing, importing, searching, revealing, and deleting secrets.
- Removed related settings search entries and cloud navigation routes.
- Removed sandbox image and stored secret data from the database.
- API Changes
- Removed legacy project, workspace, and client-registration endpoints.
- Removed secret encryption, decryption, and validation functionality.