diff --git a/packages/dashboard/app/components/command-center/__tests__/CommandCenter.mobile-scroll.test.tsx b/packages/dashboard/app/components/command-center/__tests__/CommandCenter.mobile-scroll.test.tsx index f2c7350700..864228ff15 100644 --- a/packages/dashboard/app/components/command-center/__tests__/CommandCenter.mobile-scroll.test.tsx +++ b/packages/dashboard/app/components/command-center/__tests__/CommandCenter.mobile-scroll.test.tsx @@ -368,6 +368,20 @@ async function openChartTab(tab: string) { describe("CommandCenter mobile scroll regression (FN-6595)", () => { beforeEach(() => { + /* + FNXC:CommandCenter 2026-07-30-22:10: + CLEAR THE PERSISTED SUB-TAB — cases in this file are no longer independent without it. + + #2420 made `activeTab` initialise from per-project persisted state + (`getCommandCenterState(projectId)?.activeTab`) instead of always `"overview"`, because Command + Center unmounts on navigation by design and has to restore its sub-tab on remount. These cases + click through to other tabs, so the FIRST case now leaves `mission-control` persisted and every + later case renders `command-center-panel-mission-control` — the `command-center-panel-overview` + lookups then fail with no hint that the cause is a previous test. + + Confirmed as ordering, not breakage: each failing case passes when run alone with `-t`. + */ + localStorage.clear(); apiMock.mockReset(); mockOverviewApi(); injectCommandCenterCss(); diff --git a/packages/dashboard/app/components/command-center/__tests__/CommandCenter.tablet-layout.test.tsx b/packages/dashboard/app/components/command-center/__tests__/CommandCenter.tablet-layout.test.tsx index bc04bb4481..c9a661bfb2 100644 --- a/packages/dashboard/app/components/command-center/__tests__/CommandCenter.tablet-layout.test.tsx +++ b/packages/dashboard/app/components/command-center/__tests__/CommandCenter.tablet-layout.test.tsx @@ -391,6 +391,20 @@ async function openChartTab(tab: string) { describe("CommandCenter tablet layout regression (FN-6679)", () => { beforeEach(() => { + /* + FNXC:CommandCenter 2026-07-30-22:10: + CLEAR THE PERSISTED SUB-TAB — cases in this file are no longer independent without it. + + #2420 made `activeTab` initialise from per-project persisted state + (`getCommandCenterState(projectId)?.activeTab`) instead of always `"overview"`, because Command + Center unmounts on navigation by design and has to restore its sub-tab on remount. These cases + click through to other tabs, so the FIRST case now leaves `mission-control` persisted and every + later case renders `command-center-panel-mission-control` — the `command-center-panel-overview` + lookups then fail with no hint that the cause is a previous test. + + Confirmed as ordering, not breakage: each failing case passes when run alone with `-t`. + */ + localStorage.clear(); apiMock.mockReset(); mockOverviewApi(); injectCommandCenterCss();