fix(desktop): stop workspaces list from swapping to the new-workspace screen
Problem
On the v2 workspaces list (/v2-workspaces), users in the new-workspace-screen test arm (or with the team override flag) sometimes land on the full-page new-workspace create screen instead of their list, even though they have plenty of workspaces.
Root cause
The page swapped in NewWorkspaceEmptyScreen when isReady && liveWorkspaces.length === 0 under default filters. But isReady only reflects host workspace-query settlement, while the rendered rows come from a join in useAccessibleV2Workspaces that also depends on:
- the auth session (
activeOrganizationId/currentUserId— rows are[]while it loads or refetches), useHostProjects(a workspace whose project row hasn't arrived is dropped by the join),- the
v2Hosts/v2UsersHostscollections for cloud-fallback rows.
So on cold boot / session refresh / org switch, the host query settles first, the join transiently reports zero rows, and the list gets replaced by the create screen — a false-empty flash that reads as a redirect.
Fix
Remove the empty-dashboard swap entirely: the list view never replaces itself with the create screen. A genuinely empty list now shows the standard "No workspaces yet" empty state, which was already correctly gated in V2WorkspacesList. NewWorkspaceEmptyScreen had no other consumers and is deleted.
Note: this removes the "zero workspaces → dashboard IS the create screen" behavior that was part of the new-workspace-screen experiment's test arm. The test arm's page-instead-of-modal behavior (DashboardNewWorkspaceModal redirecting store opens to /new-workspace) is untouched.
Verification
bun run lintcleanapps/desktoptsc --noEmitclean
Summary by cubic
Stops the v2 workspaces list from switching to the full-page new-workspace screen during initial load. Truly empty lists now show the standard "No workspaces yet" state.
- Bug Fixes
- Removed the empty-dashboard swap so the list never replaces itself with the create screen.
- Deleted
NewWorkspaceEmptyScreenand variant gating inpage.tsx. - Kept the test arm’s modal redirect to
/new-workspaceunchanged.
Summary by CodeRabbit
- Bug Fixes
- Standardized the workspace dashboard experience by removing the alternate empty-screen flow.
- The dashboard now consistently displays the standard header and workspace board or list content, including when no live workspaces are available.