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): tighten inventory row density

rcourtman319fe1d4fab3
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 804f1c6da0..ee7197a95e 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -662,6 +662,10 @@ scan pattern in its first column. Protected-item rows should lead with a clear
status cue, the primary item name, and compact badge-backed item/platform
context instead of relying on recovery-only rails or plain-text metadata lines
that make the table read like a report instead of an operational grid.
+That same row contract should avoid duplicating context that already has a
+dedicated column. When `Item Type` and `Platform` columns are visible, the
+primary item cell should not restate those same badges on desktop; duplicate
+context belongs only as a small-screen fallback when those columns collapse.
That same inventory surface should use structural grouping to surface posture,
not just local row styling. When the protected-item page mixes healthy and
problematic coverage, the table body should section attention items ahead of
diff --git a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx
index 2e517e7ee4..64718ba2e7 100644
--- a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx
+++ b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx
@@ -513,10 +513,10 @@ export const RecoveryProtectedInventorySection: Component<
onClick={() => props.onSelectRollup(rollup.rollupId)}
>
<TableCell
- class="max-w-[420px] px-3 py-2 text-base-content"
+ class="max-w-[420px] px-3 py-1.5 text-base-content"
title={label}
>
- <div class="flex min-w-0 flex-col gap-1.5">
+ <div class="flex min-w-0 flex-col gap-1">
<div class="flex min-w-0 items-center gap-2">
<StatusDot
variant={outcomeVariant}
@@ -525,7 +525,7 @@ export const RecoveryProtectedInventorySection: Component<
title={getRecoveryOutcomeLabel(outcome)}
ariaLabel={getRecoveryOutcomeLabel(outcome)}
/>
- <span class="truncate text-sm font-medium">{label}</span>
+ <span class="truncate text-[13px] font-medium">{label}</span>
<Show when={neverSucceeded}>
<span class={getRecoveryRollupStatusPillClass('never-succeeded')}>
{getRecoveryRollupStatusPillLabel('never-succeeded')}
@@ -537,7 +537,7 @@ export const RecoveryProtectedInventorySection: Component<
</span>
</Show>
</div>
- <div class="flex flex-wrap items-center gap-1.5 text-[10px]">
+ <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'}>
{itemTypePresentation?.label}
@@ -548,7 +548,7 @@ export const RecoveryProtectedInventorySection: Component<
{(platform) => {
const badge = getSourcePlatformBadge(platform);
return (
- <span class={badge?.classes || ''}>
+ <span class={`${badge?.classes || ''} lg:hidden`}>
{badge?.label || getSourcePlatformLabel(platform)}
</span>
);
@@ -559,7 +559,7 @@ export const RecoveryProtectedInventorySection: Component<
</div>
</TableCell>
- <TableCell class="hidden md:table-cell whitespace-nowrap px-3 py-2">
+ <TableCell class="hidden md:table-cell whitespace-nowrap px-3 py-1.5">
<Show
when={itemTypePresentation}
fallback={<span class="text-muted">—</span>}
@@ -570,7 +570,7 @@ export const RecoveryProtectedInventorySection: Component<
</Show>
</TableCell>
- <TableCell class="hidden lg:table-cell whitespace-nowrap px-3 py-2">
+ <TableCell class="hidden lg:table-cell whitespace-nowrap px-3 py-1.5">
<div class="flex flex-wrap gap-1.5">
<For each={platforms}>
{(platform) => {
@@ -586,7 +586,7 @@ export const RecoveryProtectedInventorySection: Component<
</TableCell>
<TableCell
- class={`whitespace-nowrap px-3 py-2 ${getRecoveryRollupAgeTextClass(
+ class={`whitespace-nowrap px-3 py-1.5 ${getRecoveryRollupAgeTextClass(
rollup,
nowMs,
)}`}
@@ -607,7 +607,7 @@ export const RecoveryProtectedInventorySection: Component<
)}
</TableCell>
- <TableCell class="whitespace-nowrap px-3 py-2">
+ <TableCell class="whitespace-nowrap px-3 py-1.5">
<span
class={`inline-flex rounded px-1.5 py-0.5 text-[10px] font-medium ${getRecoveryOutcomeBadgeClass(
outcome,
diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
index bdf3c61a8b..28065c9ee4 100644
--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
@@ -226,6 +226,7 @@ describe('Recovery', () => {
expect(vmRow).not.toBeNull();
expect(within(vmRow!).getByLabelText('Healthy')).toBeInTheDocument();
expect(within(vmRow!).getAllByText('PVE').length).toBeGreaterThan(0);
+ expect(within(vmRow!).getAllByText('VM').length).toBeGreaterThan(0);
expect(screen.queryByText('Backups By Date')).not.toBeInTheDocument();
fireEvent.click(await screen.findByText('VM 123'));