Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

refactor(recovery): inline secondary item identity

rcourtman6c38ef2f5108
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 431067fdea..39b968227f 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -274,9 +274,10 @@ protected inventory rows to lead with bare numeric IDs.
That same operator-facing row-identity rule should still preserve the governed
entity identifier as secondary context when it exists. Recovery inventory and
event rows should lead with the canonical item name, then show a muted
-secondary `VMID`/`CTID`/`ID` line when `display.entityIdLabel` is available, so
-operators can disambiguate familiar names without turning the primary scan path
-back into raw numeric identifiers.
+secondary compact `VMID`/`CTID`/`ID` cue when `display.entityIdLabel` is
+available, so operators can disambiguate familiar names without turning the
+primary scan path back into raw numeric identifiers or bloating the table with
+an extra recovery-only identity row.
That same shared presentation layer also owns the distinction between
aggregate recovery-method language and single-record recovery-method language.
Timeline legends and daily breakdowns must use aggregate labels such as
diff --git a/frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsx b/frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsx
index 9619593d10..a5ff913d38 100644
--- a/frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsx
+++ b/frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsx
@@ -243,24 +243,24 @@ export const RecoveryHistoryTable: Component<RecoveryHistoryTableProps> = (props
class="max-w-[420px] whitespace-nowrap px-3 py-1 text-base-content"
title={item}
>
- <div class="flex min-w-0 max-w-full flex-col gap-0.5">
- <div class="flex min-w-0 max-w-full items-center gap-2">
- <StatusDot
- variant={outcomeVariant}
- size="xs"
- pulse={outcome === 'running'}
- title={getRecoveryOutcomeLabel(outcome)}
- ariaLabel={getRecoveryOutcomeLabel(outcome)}
- />
- <span class="min-w-0 flex-1 truncate text-[12px] font-medium">
+ <div class="flex min-w-0 max-w-full items-center gap-2">
+ <StatusDot
+ variant={outcomeVariant}
+ size="xs"
+ pulse={outcome === 'running'}
+ title={getRecoveryOutcomeLabel(outcome)}
+ ariaLabel={getRecoveryOutcomeLabel(outcome)}
+ />
+ <div class="flex min-w-0 flex-1 items-baseline gap-1.5">
+ <span class="min-w-0 truncate text-[12px] font-medium">
{item}
</span>
+ <Show when={itemSecondary}>
+ <span class="shrink-0 text-[10px] font-mono tabular-nums text-muted">
+ {itemSecondary}
+ </span>
+ </Show>
</div>
- <Show when={itemSecondary}>
- <span class="pl-4 text-[10px] font-mono tabular-nums text-muted">
- {itemSecondary}
- </span>
- </Show>
</div>
</TableCell>
);
diff --git a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx
index dc1707bbe4..25e2eff85a 100644
--- a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx
+++ b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx
@@ -449,7 +449,14 @@ export const RecoveryProtectedInventorySection: Component<
title={getRecoveryOutcomeLabel(outcome)}
ariaLabel={getRecoveryOutcomeLabel(outcome)}
/>
- <span class="truncate text-[13px] font-medium">{label}</span>
+ <div class="flex min-w-0 items-baseline gap-1.5">
+ <span class="truncate text-[13px] font-medium">{label}</span>
+ <Show when={secondaryLabel}>
+ <span class="shrink-0 text-[10px] font-mono tabular-nums text-muted">
+ {secondaryLabel}
+ </span>
+ </Show>
+ </div>
<Show when={neverSucceeded}>
<span class={getRecoveryRollupStatusPillClass('never-succeeded')}>
{getRecoveryRollupStatusPillLabel('never-succeeded')}
@@ -461,11 +468,6 @@ export const RecoveryProtectedInventorySection: Component<
</span>
</Show>
</div>
- <Show when={secondaryLabel}>
- <div class="pl-4 text-[10px] font-mono tabular-nums text-muted">
- {secondaryLabel}
- </div>
- </Show>
<div class="flex flex-wrap items-center gap-1.5 text-[10px] md:hidden">
<Show when={itemTypePresentation?.label}>
<span class={itemTypePresentation?.badgeClasses || 'inline-flex items-center rounded px-2 py-0.5 text-[10px] font-medium whitespace-nowrap bg-surface-alt text-base-content'}>
diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
index 177d7f5a3f..e910c00e25 100644
--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
@@ -265,6 +265,9 @@ describe('Recovery', () => {
expect(within(vmRow!).getAllByText('PVE').length).toBeGreaterThan(0);
expect(within(vmRow!).getAllByText('VM').length).toBeGreaterThan(0);
expect(within(vmRow!).getByText('VMID 123')).toBeInTheDocument();
+ expect(within(vmRow!).getByText('VMID 123').parentElement?.className).toContain(
+ 'items-baseline',
+ );
expect(screen.queryByText('Backups By Date')).not.toBeInTheDocument();
expect(screen.queryByText('Recovery Activity')).not.toBeInTheDocument();
@@ -339,6 +342,9 @@ describe('Recovery', () => {
expect(historyRow).not.toBeNull();
expect(within(historyRow!).getByLabelText('Healthy')).toBeInTheDocument();
expect(within(historyRow!).getByText('VMID 123')).toBeInTheDocument();
+ expect(within(historyRow!).getByText('VMID 123').parentElement?.className).toContain(
+ 'items-baseline',
+ );
expect(activityHeading).toBeInTheDocument();
});