From 5c3763058d9a491c2afc1daeef8a9938da840d2c Mon Sep 17 00:00:00 2001 From: Satya Patel Date: Tue, 11 Aug 2026 16:06:54 -0700 Subject: [PATCH] fix(desktop): stop workspaces list from swapping to the new-workspace screen --- .../NewWorkspaceEmptyScreen.tsx | 21 ------------------- .../NewWorkspaceEmptyScreen/index.ts | 1 - .../_dashboard/v2-workspaces/page.tsx | 20 ------------------ 3 files changed, 42 deletions(-) delete mode 100644 apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/NewWorkspaceEmptyScreen/NewWorkspaceEmptyScreen.tsx delete mode 100644 apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/NewWorkspaceEmptyScreen/index.ts diff --git a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/NewWorkspaceEmptyScreen/NewWorkspaceEmptyScreen.tsx b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/NewWorkspaceEmptyScreen/NewWorkspaceEmptyScreen.tsx deleted file mode 100644 index bd50d8672d5..00000000000 --- a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/NewWorkspaceEmptyScreen/NewWorkspaceEmptyScreen.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { PromptInputProvider } from "@superset/ui/ai-elements/prompt-input"; -import { NewWorkspaceScreen } from "renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/components/NewWorkspaceScreen"; -import { DashboardNewWorkspaceDraftProvider } from "renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/DashboardNewWorkspaceDraftContext"; -import { newWorkspaceAttachmentsStore } from "renderer/stores/new-workspace-attachments"; - -/** - * Experiment test arm (new-workspace-screen): replaces the "No workspaces yet" - * empty state with the create screen itself. With zero workspaces there is - * nothing behind it, so it is pinned — close actions (Escape) are no-ops. - * Store opens are not handled here: DashboardNewWorkspaceModal redirects them - * to the /new-workspace route. - */ -export function NewWorkspaceEmptyScreen() { - return ( - {}}> - - - - - ); -} diff --git a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/NewWorkspaceEmptyScreen/index.ts b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/NewWorkspaceEmptyScreen/index.ts deleted file mode 100644 index 60e6790579f..00000000000 --- a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/NewWorkspaceEmptyScreen/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { NewWorkspaceEmptyScreen } from "./NewWorkspaceEmptyScreen"; diff --git a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/page.tsx b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/page.tsx index f33f53e440d..1d1d860e7e5 100644 --- a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/page.tsx +++ b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/page.tsx @@ -1,7 +1,5 @@ import { createFileRoute, useNavigate } from "@tanstack/react-router"; import { useEffect, useMemo, useRef } from "react"; -import { useNewWorkspaceScreenVariant } from "renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/hooks/useNewWorkspaceScreenVariant"; -import { NewWorkspaceEmptyScreen } from "./components/NewWorkspaceEmptyScreen"; import { V2WorkspacesBoard } from "./components/V2WorkspacesBoard"; import { V2WorkspacesHeader } from "./components/V2WorkspacesHeader"; import { V2WorkspacesList } from "./components/V2WorkspacesList"; @@ -176,24 +174,6 @@ function V2WorkspacesPage() { [all], ); - // Experiment test arm: with zero workspaces the dashboard IS the create - // screen — the "No workspaces yet" empty state never shows. Gated on - // isReady (never pin over rows that are still settling) and on default - // filters so a filtered-to-empty view keeps the normal empty state. - // Evaluating the flag here is the exposure moment. - const isEmptyDashboard = - isReady && - liveWorkspaces.length === 0 && - !searchQuery.trim() && - projectFilters.length === 0 && - prStateFilters.length === 0 && - agentStatusFilters.length === 0 && - deviceFilter === DEVICE_FILTER_THIS_DEVICE; - const variant = useNewWorkspaceScreenVariant(isEmptyDashboard); - if (variant === "test" && isEmptyDashboard) { - return ; - } - return (