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): match storage workspace handoff

rcourtman7822cb10142c
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 957de6aca6..a1ebf72eb4 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -775,7 +775,8 @@ page shell, it should follow the same ordering already used by storage: shared
subtabs row first, shared controls card second, and data card after that. The
contained styling should come from the same canonical subtabs shell, list, and
button class treatment already used by established Pulse surfaces rather than
-from a recovery-only variant boundary or recovery-local filter-row embedding.
+from a recovery-only variant boundary, adjacent chip row, or recovery-local
+filter-row embedding.
That same shared-boundary rule applies to summary density. The shared compact
mode on `SummaryPanel.tsx` and `SummaryMetricCard.tsx` exists for genuinely
dense monitoring surfaces, but pages that are trying to align with the normal
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 682c524d8c..11b0330a05 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -765,6 +765,9 @@ switcher should live in its own canonical subtabs row above the controls card,
not inside the controls card and not inside a table-card header strip, so the
page hands off from summary into tabs, then filters, then data the same way the
storage surface does.
+That same canonical-row rule also means the subtabs row should stand on its own
+full-width shell instead of sharing a flex line with recovery-only chips or
+adjacent badges that break the storage-style border and spacing treatment.
That same handoff should keep recovery on the standard Pulse summary density.
`RecoverySummary.tsx` should use the shared default `SummaryPanel` /
`SummaryMetricCard` rhythm that infrastructure and workloads use, instead of
diff --git a/frontend-modern/src/components/Recovery/Recovery.tsx b/frontend-modern/src/components/Recovery/Recovery.tsx
index ce5e9f467d..4f5c50eb12 100644
--- a/frontend-modern/src/components/Recovery/Recovery.tsx
+++ b/frontend-modern/src/components/Recovery/Recovery.tsx
@@ -488,28 +488,22 @@ const Recovery: Component = () => {
{(() => {
return (
<>
- <div class="flex flex-wrap items-center gap-3">
- <Subtabs
- value={workspaceView()}
- onChange={(value) => setWorkspaceView(value as RecoveryWorkspaceView)}
- ariaLabel="Recovery data view"
- tabs={[
- {
- value: 'inventory',
- label: `Protected items ${filteredRollups().length}`,
- },
- {
- value: 'events',
- label: `Recovery events ${recoveryPoints.meta().total}`,
- },
- ]}
- />
- <Show when={rollupId().trim().length > 0}>
- <span class="inline-flex w-fit items-center rounded-md border border-border-subtle bg-surface-alt px-2 py-0.5 text-[11px] font-medium text-muted">
- Focused drill-in
- </span>
- </Show>
- </div>
+ <Subtabs
+ class="w-full"
+ value={workspaceView()}
+ onChange={(value) => setWorkspaceView(value as RecoveryWorkspaceView)}
+ ariaLabel="Recovery data view"
+ tabs={[
+ {
+ value: 'inventory',
+ label: `Protected items ${filteredRollups().length}`,
+ },
+ {
+ value: 'events',
+ label: `Recovery events ${recoveryPoints.meta().total}`,
+ },
+ ]}
+ />
<Show when={workspaceView() === 'inventory'}>
<RecoveryProtectedInventorySection
diff --git a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx
index 8d87c3eb2e..32bb56aad0 100644
--- a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx
+++ b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx
@@ -379,7 +379,7 @@ export const RecoveryProtectedInventorySection: Component<
))}
</TableRow>
</TableHeader>
- <TableBody class="divide-y divide-border">
+ <TableBody class="divide-y divide-border-subtle/60">
<For each={visibleRollups()}>
{(rollup) => {
const resourceIndex = props.resourcesById();
@@ -416,7 +416,7 @@ export const RecoveryProtectedInventorySection: Component<
return (
<TableRow
- class="cursor-pointer border-b border-border-subtle/70 odd:bg-surface even:bg-surface-alt/35 transition-colors hover:bg-surface-hover/95"
+ class="cursor-pointer odd:bg-surface even:bg-surface-alt/35 transition-colors hover:bg-surface-hover/95"
onClick={() => props.onSelectRollup(rollup.rollupId)}
>
<TableCell
diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
index bcb0c01e2c..885daf8b1d 100644
--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
@@ -206,6 +206,7 @@ describe('Recovery', () => {
const workspaceTablist = await screen.findByRole('tablist', { name: /recovery data view/i });
expect(within(workspaceTablist).getByRole('tab', { name: /protected items 2/i })).toBeInTheDocument();
expect(within(workspaceTablist).getByRole('tab', { name: /recovery events 0/i })).toBeInTheDocument();
+ expect(screen.queryByText('Focused drill-in')).not.toBeInTheDocument();
await screen.findByText('VM 123');
const inventoryControls = screen.getByRole('group', { name: /protected items controls/i });
expect(
diff --git a/frontend-modern/src/components/shared/PageControls.guardrails.test.ts b/frontend-modern/src/components/shared/PageControls.guardrails.test.ts
index 3286aa002c..374db0c80f 100644
--- a/frontend-modern/src/components/shared/PageControls.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/PageControls.guardrails.test.ts
@@ -107,5 +107,7 @@ describe('page controls guardrails', () => {
expect(recoveryPageSource).not.toContain('variant="control"');
expect(recoveryPageSource).not.toContain('listClass=');
expect(recoveryPageSource).not.toContain('tabClass=');
+ expect(recoveryPageSource).toContain('class="w-full"');
+ expect(recoveryPageSource).not.toContain('Focused drill-in');
});
});