From 5ce4308748bb4fcb989bf60f5d5d080fc8868aea Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sun, 26 Apr 2026 12:44:24 +0100 Subject: [PATCH] Keep dashboard source coverage readable --- .../v6/internal/subsystems/frontend-primitives.md | 4 ++++ docs/release-control/v6/internal/subsystems/registry.json | 4 ++++ .../src/features/dashboardOverview/EstateSummaryPanel.tsx | 2 +- .../src/pages/__tests__/DashboardPage.test.tsx | 8 ++++++-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md index e26bda297..c5fc1ba9e 100644 --- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md +++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md @@ -1642,6 +1642,10 @@ canonical connected-infrastructure projection, fall back only to the compact dashboard summary that the route already owns, and keep the explicit Infrastructure handoff above detailed problem, storage, recovery, or trend rows without restoring platform-special navigation. +Source coverage is part of that first-viewport proof and must remain readable +at mobile and tablet shell widths; the estate summary may wrap that provider +inventory across lines, but it must not truncate the canonical source mix with +ellipsis in the default dashboard viewport. That compact fallback must keep speaking in system terms. When the connected projection has not arrived yet, estate orientation copy may say how many systems are reporting or syncing, but it must not slide back to generic diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.json index 47a9c47dd..690f99925 100644 --- a/docs/release-control/v6/internal/subsystems/registry.json +++ b/docs/release-control/v6/internal/subsystems/registry.json @@ -2963,6 +2963,8 @@ "frontend-modern/src/components/Toast/Toast.tsx", "frontend-modern/src/features/dashboardOverview/ActionRequiredPanel.tsx", "frontend-modern/src/features/dashboardOverview/DashboardCustomizer.tsx", + "frontend-modern/src/features/dashboardOverview/estateSummaryModel.ts", + "frontend-modern/src/features/dashboardOverview/EstateSummaryPanel.tsx", "frontend-modern/src/features/dashboardOverview/index.ts", "frontend-modern/src/features/dashboardOverview/KPIStrip.tsx", "frontend-modern/src/features/dashboardOverview/ProblemResourcesTable.tsx", @@ -3366,6 +3368,8 @@ "match_files": [ "frontend-modern/src/features/dashboardOverview/ActionRequiredPanel.tsx", "frontend-modern/src/features/dashboardOverview/DashboardCustomizer.tsx", + "frontend-modern/src/features/dashboardOverview/estateSummaryModel.ts", + "frontend-modern/src/features/dashboardOverview/EstateSummaryPanel.tsx", "frontend-modern/src/features/dashboardOverview/index.ts", "frontend-modern/src/features/dashboardOverview/KPIStrip.tsx", "frontend-modern/src/features/dashboardOverview/ProblemResourcesTable.tsx", diff --git a/frontend-modern/src/features/dashboardOverview/EstateSummaryPanel.tsx b/frontend-modern/src/features/dashboardOverview/EstateSummaryPanel.tsx index 90aad391c..63ce1e4c4 100644 --- a/frontend-modern/src/features/dashboardOverview/EstateSummaryPanel.tsx +++ b/frontend-modern/src/features/dashboardOverview/EstateSummaryPanel.tsx @@ -220,7 +220,7 @@ export function EstateSummaryPanel(props: EstateSummaryPanelProps) {

Source coverage

-

+

{props.summary.hasCanonicalProjection ? formatSurfaceSummary(props.summary.surfaces) : 'Coverage syncing'} diff --git a/frontend-modern/src/pages/__tests__/DashboardPage.test.tsx b/frontend-modern/src/pages/__tests__/DashboardPage.test.tsx index 55c587731..3f4c4e474 100644 --- a/frontend-modern/src/pages/__tests__/DashboardPage.test.tsx +++ b/frontend-modern/src/pages/__tests__/DashboardPage.test.tsx @@ -8,6 +8,7 @@ import type { DashboardOverview } from '@/hooks/useDashboardOverview'; import type { DashboardRecoverySummary } from '@/hooks/useDashboardRecovery'; import DashboardPage from '@/pages/Dashboard'; import dashboardPageSource from '@/pages/Dashboard.tsx?raw'; +import type { ConnectedInfrastructureSurface } from '@/types/api'; const aiRuntimeMock = vi.hoisted(() => ({ featureEnabled: false, @@ -26,7 +27,7 @@ const connectedInfrastructureMock: Array<{ status: 'active' | 'ignored'; healthStatus?: string; lastSeen?: number; - surfaces: Array<{ id: string; kind: 'agent' | 'proxmox' | 'truenas'; label: string }>; + surfaces: Array<{ id: string; kind: ConnectedInfrastructureSurface['kind']; label: string }>; }> = []; const reconnectSpy = vi.fn(); const navigateSpy = vi.hoisted(() => vi.fn()); @@ -324,7 +325,10 @@ describe('Dashboard page module contract', () => { ); expect(screen.getByText('1 system needs review; details below')).toBeInTheDocument(); expect(screen.getByText('2 active')).toBeInTheDocument(); - expect(screen.getByText(/Proxmox/)).toBeInTheDocument(); + const sourceCoverage = screen.getByText(/Proxmox/); + expect(sourceCoverage).toBeInTheDocument(); + expect(sourceCoverage).toHaveClass('break-words'); + expect(sourceCoverage).not.toHaveClass('truncate'); expect(screen.getByText(/TrueNAS/)).toBeInTheDocument(); expect( estateHeading.compareDocumentPosition(problemHeading) & Node.DOCUMENT_POSITION_FOLLOWING,