refactor(desktop): remove the v2 new-workspace modal
The new-workspace screen won its experiment and its flag is now at 100%, so v2 has exactly one create surface: the /new-workspace route. This removes the modal branch and everything that existed only to choose between the two.
Why now
Experiment 387127 ended 2026-08-11: 55.7% of the test arm created a real workspace vs 44.3% of control (n=499, 98.8% chance to win). The flag has since served the screen to every account created after 2026-08-05 plus half the older base — ~81% of everyone who opened the surface last week.
The other ~19% was a live randomised holdout on existing users, the population the original experiment never tested. On a clean window (exposure Sep 1–5, 3-day workspace creation) the arms are indistinguishable — screen 39.4% (n=259) vs modal 40.4% (n=230), difference −1.0pp, 95% CI ≈ [−9.7, +7.7]. No benefit for existing users, and no sign of harm. Flag set to 100% before this PR.
What goes
DashboardNewWorkspaceModal— its only remaining job was to render nothing, close the store, and redirect to the route.DashboardNewWorkspaceModalContentand the modal'sPromptGroup(856 lines), plus the two children only it used,AttachmentButtonsandUploadingAttachmentPill.useNewWorkspaceScreenVariant, and thenew-workspace-screen/new-workspace-screen-overrideflag constants.- The stash/restore machinery on the new-workspace store — a
StashedDrafttype, three actions and three exported hooks, with zero consumers anywhere in the repo.
Net −1,427 / +108.
What changes
useOpenNewWorkspace (and useOpenNewSession) is now the single entry point for "start creating a workspace". It navigates to the route on v2 and keeps v1 on its dialog, so the 13 call sites stop reaching into a store to set a flag that a component elsewhere watched in order to redirect.
The command palette gets openNewWorkspace on CommandContext rather than calling useNewWorkspaceModalStore.getState() — Command.run has no hook access, and this is the same shape as the existing navigate helper.
useSelectedHostProjectIds moved to renderer/hooks/ since it has four consumers and its parent directory is gone.
Deliberately left alone
- v1.
components/NewWorkspaceModal/still ships for non-v2 installs and still owns the store'sisOpen/preSelected*state, so the store stays. new-workspace-prompt-cards. That experiment is still in draft and lives inside the screen; itsuseNewWorkspacePromptCardsVarianthook stays. Worth a separate decision on whether it's still happening — its release-condition cutoff is still the2026-09-01placeholder.- Directory names.
components/DashboardNewWorkspaceModal/and.../DashboardNewWorkspaceForm/PromptGroup/are now named after deleted components. Renaming them touches ~20 files of imports including v1's, which would bury the deletion — better as a follow-up. openSessionModal/preSelectedSessionon the store are only read by v2 today, but I couldn't cheaply prove the sessions section never renders under v1, so the v1 fallback stays.
Verification
bun run typecheck— 38/38 tasks pass.bun test(desktop) — 3712 pass, 1 fail, 1 error. Identical on the base commit (git checkout HEAD~1 -- apps/desktop packages/shared, same counts), and both suspects pass in isolation: a@dnd-kit/React interop error leaking between files. Pre-existing, not from this change.bun run lint,bun run check:i18n(0 missing in every locale, no catalog churn),sherif(one pre-existingapps/review-hostwarning).- Persisted-key registry test passes; the deleted code only read
AGENT_STORAGE_KEY, which the screen still writes, so no key is orphaned andDEAD_KEYSneeds nothing.
Not verified by hand in a running app — the route path this makes universal is already what ~81% of users get, so the behaviour is the shipped one, not a new one.
https://claude.ai/code/session_01476rbYah5x4eZ31ksKX3fP
Summary by cubic
The new-workspace screen won its experiment (flag now 100%), so v2 has exactly one create surface: the /new-workspace route. This removes the modal branch, the redirect shim that existed only to choose between the two, and everything the modal alone used.
- Deletes
DashboardNewWorkspaceModal, itsPromptGroupcomposer,DashboardNewWorkspaceModalContent,AttachmentButtons, andUploadingAttachmentPill. - Removes the
useNewWorkspaceScreenVarianthook and thenew-workspace-screen/new-workspace-screen-overrideflag constants. - Removes the stash/restore draft machinery from the new-workspace store — declared and exported, with zero consumers.
useOpenNewWorkspace(anduseOpenNewSession) is now the single entry point for starting a workspace: it navigates to the route on v2 and keeps the dialog for v1, replacing the call sites that set a store flag a component elsewhere watched.useOpenNewWorkspaceForHostcovers the Cloud sidebar "+", navigating with a?host=search param.- The command palette gets
openNewWorkspaceonCommandContext, anduseSelectedHostProjectIdsmoves torenderer/hooks/.
Deliberately left alone
- v1's
NewWorkspaceModaland its store state stay for non-v2 installs; the store keepsisOpen,preSelected*, and the open actions. TheusePreSelectedSession,usePreSelectedHostId,useOpenNewSessionModal, anduseOpenNewWorkspaceModalForHostselectors are gone — the deleted modal was their only reader. - The
new-workspace-prompt-cardsexperiment is still in draft and lives inside the screen; its hook stays. - Old directory names (
components/DashboardNewWorkspaceModal/) persist to avoid churning ~20 imports; renaming them is a good follow-up.
The route behavior this makes universal is already what ~81% of users get, so it is the shipped behavior, not a new one. Typecheck, lint, and i18n pass; the one failing test also fails on the base commit.
Summary by CodeRabbit
-
New Features
- Unified new-workspace actions across the command palette, sidebar, onboarding, tasks, issues, pull requests, and keyboard shortcuts.
- New workspace and session actions now open the appropriate creation experience based on cloud availability, with project and host context preserved.
- Added shared project-selection support for workspace actions.
-
Changes
- The v2 workspace creation experience is accessed through a dedicated route.
- Removed the legacy dashboard workspace modal, draft-stashing support, and related experiment flags.