mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-20 09:23:27 +00:00
Keep dashboard source coverage readable
This commit is contained in:
parent
d2dbd0dab1
commit
5ce4308748
4 changed files with 15 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ export function EstateSummaryPanel(props: EstateSummaryPanelProps) {
|
|||
|
||||
<div>
|
||||
<p class="text-[11px] font-medium uppercase tracking-wide text-muted">Source coverage</p>
|
||||
<p class="mt-1 truncate text-sm font-medium text-base-content">
|
||||
<p class="mt-1 break-words text-sm font-medium leading-snug text-base-content">
|
||||
{props.summary.hasCanonicalProjection
|
||||
? formatSurfaceSummary(props.summary.surfaces)
|
||||
: 'Coverage syncing'}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue