Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
refactor(recovery): make summary item-first
rcourtman672ec5c7f6f8
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 8a44107806..eac04fc11d 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -337,11 +337,13 @@ default, but the first visible framing now reflects the whole multi-platformrecovery system instead of a single backup table metaphor.That same summary contract now also includes platform- and item-coverageframing through `frontend-modern/src/utils/recoverySummaryPresentation.ts`, so-the first visible recovery overview explicitly shows how many recovery-platforms are in scope, which protected item types Pulse is covering, which-platform families dominate the current protected set, and how many protected-items already span multiple platforms instead of leaving the multi-platform-model implicit in row-level badges alone.+the first visible recovery overview explicitly shows which protected item+types Pulse is covering before it shows supporting platform mix, with+primary-item and primary-platform readouts kept as distinct governed summary+fields instead of one ambiguous "primary" label. The summary may still surface+platform breadth and cross-platform protected items, but the recovery page+must read item-first so the unified recovery model is not visually anchored to+one platform family.The recovery table presentation helper now owns the canonical subject-typelabel fallback for recovery rows and delegates its title-casing to the shared`frontend-modern/src/utils/textPresentation.ts` helper rather than keeping adiff --git a/frontend-modern/src/components/Recovery/Recovery.tsx b/frontend-modern/src/components/Recovery/Recovery.tsxindex da8d0f0273..22ac015e5f 100644--- a/frontend-modern/src/components/Recovery/Recovery.tsx+++ b/frontend-modern/src/components/Recovery/Recovery.tsx@@ -559,9 +559,9 @@ const Recovery: Component = () => {<div class="border-b border-border px-3 pb-3 pt-2 text-xs text-muted"><Showwhen={workspaceView() === 'inventory'}- fallback="Cross-platform recovery artifacts grouped by day and filtered through one shared recovery model."+ fallback="Recovery events grouped by day and filtered through one shared item-first recovery model.">- Platform-neutral protection inventory across every connected recovery platform in the selected window.+ Unified protection inventory across protected item types, with platform mix carried as supporting recovery context.</Show></div></Card>diff --git a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsxindex e9d38295ee..d365de2c94 100644--- a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx+++ b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx@@ -160,7 +160,7 @@ export const RecoveryProtectedInventorySection: Component<Protected Items</div><div class="text-xs text-muted">- Unified protection inventory across workloads, datasets, and other protected items from every connected platform.+ Unified protection inventory across workloads, datasets, and other protected items, with platform mix carried as supporting context.</div></div><div class="flex flex-wrap items-center gap-2 text-xs text-muted">diff --git a/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx b/frontend-modern/src/components/Recovery/RecoverySummary.test.tsxindex 8c201b9483..140f7f43fe 100644--- a/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx+++ b/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx@@ -59,9 +59,10 @@ describe('RecoverySummary', () => {expect(screen.getByText('Recent History')).toBeInTheDocument();expect(screen.getByText('Attention Queue')).toBeInTheDocument();expect(screen.getByText('Recovery Points')).toBeInTheDocument();- expect(screen.getByText('Multi-platform')).toBeInTheDocument();expect(screen.getAllByText('Item Types').length).toBeGreaterThan(0);expect(screen.getByText('Primary Item')).toBeInTheDocument();+ expect(screen.getByText('Primary Platform')).toBeInTheDocument();+ expect(screen.getByText('Platform Mix')).toBeInTheDocument();expect(screen.getByText('2 protected')).toBeInTheDocument();expect(screen.getByText('2 platforms')).toBeInTheDocument();expect(screen.getByText('2 item types')).toBeInTheDocument();diff --git a/frontend-modern/src/components/Recovery/RecoverySummary.tsx b/frontend-modern/src/components/Recovery/RecoverySummary.tsxindex 827a388e35..0257dcd22c 100644--- a/frontend-modern/src/components/Recovery/RecoverySummary.tsx+++ b/frontend-modern/src/components/Recovery/RecoverySummary.tsx@@ -54,14 +54,14 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {<div class="flex flex-wrap items-center justify-between gap-2 border-b border-border-subtle px-1 pb-2 text-[11px]"><div class="flex flex-wrap items-center gap-3"><span class="font-medium text-base-content">{summary().total} protected</span>- <span class="text-sky-300">- {platformCoverage().platformCount} platform- {platformCoverage().platformCount === 1 ? '' : 's'}- </span><span class="text-violet-300">{itemCoverage().itemTypeCount} item type{itemCoverage().itemTypeCount === 1 ? '' : 's'}</span>+ <span class="text-sky-300">+ {platformCoverage().platformCount} platform+ {platformCoverage().platformCount === 1 ? '' : 's'}+ </span><span class="text-emerald-400">{healthyCount()} healthy</span><Show when={attentionCount() > 0}><span class="text-amber-300">{attentionCount()} attention</span>@@ -142,27 +142,27 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {</div><div class="mt-3 grid gap-3 sm:grid-cols-2"><div>- <div class="text-[10px] uppercase tracking-wide text-muted">Platforms</div>+ <div class="text-[10px] uppercase tracking-wide text-muted">Item Types</div><div class="mt-1 text-2xl font-semibold text-base-content">- {platformCoverage().platformCount}+ {itemCoverage().itemTypeCount}</div></div><div>- <div class="text-[10px] uppercase tracking-wide text-muted">Item Types</div>- <div class="mt-1 text-2xl font-semibold text-base-content">- {itemCoverage().itemTypeCount}+ <div class="text-[10px] uppercase tracking-wide text-muted">Primary Item</div>+ <div class="mt-1 text-xl font-semibold text-base-content">+ {itemCoverage().primaryItemLabel ?? 'n/a'}</div></div><div>- <div class="text-[10px] uppercase tracking-wide text-muted">Multi-platform</div>+ <div class="text-[10px] uppercase tracking-wide text-muted">Platforms</div><div class="mt-1 text-2xl font-semibold text-base-content">- {platformCoverage().multiPlatformCount}+ {platformCoverage().platformCount}</div></div><div>- <div class="text-[10px] uppercase tracking-wide text-muted">Primary Item</div>+ <div class="text-[10px] uppercase tracking-wide text-muted">Primary Platform</div><div class="mt-1 text-xl font-semibold text-base-content">- {itemCoverage().primaryLabel ?? 'n/a'}+ {platformCoverage().primaryPlatformLabel ?? 'n/a'}</div></div></div>@@ -190,8 +190,15 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {</Show><div><div class="mb-2 text-[10px] font-semibold uppercase tracking-wide text-muted">- Platforms+ Platform Mix</div>+ <Show when={platformCoverage().multiPlatformCount > 0}>+ <div class="mb-2 text-xs text-muted">+ {platformCoverage().multiPlatformCount} protected item+ {platformCoverage().multiPlatformCount === 1 ? '' : 's'} span multiple+ platforms.+ </div>+ </Show><div class="flex flex-wrap gap-2"><For each={platformCoverage().items.slice(0, 6)}>{(item) => (diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsxindex d438fd8a22..b28a357185 100644--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx@@ -284,12 +284,14 @@ describe('Recovery', () => {}});- it('surfaces platform coverage in the unified recovery summary', async () => {+ it('surfaces item-first recovery coverage in the unified summary', async () => {render(() => <Recovery />);+ expect(await screen.findByText('2 item types')).toBeInTheDocument();expect(await screen.findByText('2 platforms')).toBeInTheDocument();- expect(screen.getByText('2 item types')).toBeInTheDocument();- expect(screen.getByText('Multi-platform')).toBeInTheDocument();+ expect(screen.getByText('Primary Item')).toBeInTheDocument();+ expect(screen.getByText('Primary Platform')).toBeInTheDocument();+ expect(screen.getByText('Platform Mix')).toBeInTheDocument();});it('keeps recovery history width aligned with canonical column specs', async () => {diff --git a/frontend-modern/src/utils/__tests__/recoverySummaryPresentation.test.ts b/frontend-modern/src/utils/__tests__/recoverySummaryPresentation.test.tsindex c074c7d478..afdc109456 100644--- a/frontend-modern/src/utils/__tests__/recoverySummaryPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/recoverySummaryPresentation.test.ts@@ -108,7 +108,7 @@ describe('recoverySummaryPresentation', () => {expect(coverage.platformCount).toBe(4);expect(coverage.multiPlatformCount).toBe(1);- expect(coverage.primaryLabel).toBe('K8s');+ expect(coverage.primaryPlatformLabel).toBe('K8s');expect(coverage.items).toMatchObject([{ key: 'kubernetes', label: 'K8s', count: 1, percent: 33 },{ key: 'proxmox-pbs', label: 'PBS', count: 1, percent: 33 },@@ -126,7 +126,7 @@ describe('recoverySummaryPresentation', () => {]);expect(coverage.itemTypeCount).toBe(3);- expect(coverage.primaryLabel).toBe('VM');+ expect(coverage.primaryItemLabel).toBe('VM');expect(coverage.items).toMatchObject([{ key: 'vm', label: 'VM', count: 2, percent: 50 },{ label: 'Dataset', count: 1, percent: 25 },diff --git a/frontend-modern/src/utils/recoverySummaryPresentation.ts b/frontend-modern/src/utils/recoverySummaryPresentation.tsindex 085ce54fdd..70334aad02 100644--- a/frontend-modern/src/utils/recoverySummaryPresentation.ts+++ b/frontend-modern/src/utils/recoverySummaryPresentation.ts@@ -118,7 +118,7 @@ export interface RecoveryPlatformCoverageItem {export interface RecoveryPlatformCoverageSummary {platformCount: number;multiPlatformCount: number;- primaryLabel: string | null;+ primaryPlatformLabel: string | null;items: RecoveryPlatformCoverageItem[];}@@ -132,7 +132,7 @@ export interface RecoveryItemCoverageItem {export interface RecoveryItemCoverageSummary {itemTypeCount: number;- primaryLabel: string | null;+ primaryItemLabel: string | null;items: RecoveryItemCoverageItem[];}@@ -418,7 +418,7 @@ export function buildRecoveryPlatformCoverage(return {platformCount: items.length,multiPlatformCount,- primaryLabel: items[0]?.label || null,+ primaryPlatformLabel: items[0]?.label || null,items,};}@@ -463,7 +463,7 @@ export function buildRecoveryItemCoverage(return {itemTypeCount: items.length,- primaryLabel: items[0]?.label || null,+ primaryItemLabel: items[0]?.label || null,items,};}