From be2f6324f0352bd8b25d2df5bbda4d587dd6166b Mon Sep 17 00:00:00 2001 From: rcourtman Date: Thu, 28 May 2026 09:42:09 +0100 Subject: [PATCH] Guard against duplicate WorkloadsFilter on platform overview pages Add a platformOverviewLayout guardrail that asserts the Proxmox and vSphere overview surfaces each render exactly one and pass suppressFilterToolbar to the embedded . This is the regression that shipped in 6.0.0-rc.6: both pages owned a shared page-level filter and the embedded surface still rendered its own, producing two stacked toolbars wired to the same state. --- .../platformOverviewLayout.guardrails.test.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts b/frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts index f7d60de18..7dfaae110 100644 --- a/frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts +++ b/frontend-modern/src/features/platformPage/__tests__/platformOverviewLayout.guardrails.test.ts @@ -314,6 +314,26 @@ describe('platform overview layout guardrails', () => { } }); + it('keeps platform overview pages from rendering a duplicate WorkloadsFilter', () => { + // Proxmox and vSphere overview pages render their own page-level + // WorkloadsFilter above the embedded WorkloadsSurface so a single + // toolbar drives both the page's top table and the workloads table. + // If the embedded surface also renders its own filter the page ends + // up with two stacked toolbars wired to the same state (RC6 bug). + const surfacesWithSharedToolbar: Array<[string, string]> = [ + ['ProxmoxPageSurface', proxmoxPageSurfaceSource], + ['VmwarePageSurface', vmwarePageSurfaceSource], + ]; + for (const [name, source] of surfacesWithSharedToolbar) { + const filterCount = (source.match(/`).toBe(1); + expect( + /]*?suppressFilterToolbar/s.test(source), + `${name} should pass suppressFilterToolbar to `, + ).toBe(true); + } + }); + it('keeps mobile host tables focused on useful operational columns', () => { // Assertions use the canonical kind-based helpers // (getPlatformTableHeadClassForKind('')) so the platform overview