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.

Improve recovery page drill-in UX

rcourtman8d45b3397fc8
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 4ffad27e64..9bcb144ff8 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -236,6 +236,14 @@ work extends shared components instead of creating new local variants.
shared panels `min-h-0`, and page-owned modal bodies may use
`overflow-y-auto` only under shrinkable flex columns instead of clipping
lower fields behind a fixed-height shell.
+ Shared filter popovers follow the same primitive-level ownership. The
+ shared `FilterToolbar` panel class must render above nested card, table,
+ and empty-state shells, and feature pages embedding those controls must
+ make only their immediate control shell overflow-visible rather than
+ forking local z-index or popover positioning rules.
+ The shared navigation guide owns route-aware first focus: when it opens
+ from a top-level product route such as `/recovery`, the first highlighted
+ step should match that route instead of always restarting at Dashboard.
5. Keep shared infrastructure shell state on the reusable settings boundary: `frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts` and `frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx` must continue to derive provider counts, availability, and shared subtab copy from one infrastructure-settings source — via the unified aggregator through `frontend-modern/src/components/Settings/useConnectionsLedger.ts` — instead of creating provider-local summary fetches or VMware-only shell vocabulary. Phase 9 retired the old `PlatformConnectionsWorkspace` per-type shell, but setup guidance may still use `Platform connections` as the operator-facing label for the shared API-backed onboarding path.
That same shared shell boundary now owns the default posture for
`/settings/infrastructure`: the landing route should read as one
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 86f44e039e..626f9b7e19 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -452,6 +452,9 @@ querying, and the operator-facing storage health presentation layer.
14. Reintroducing stacked full-width recovery tables as the primary desktop layout; the governed recovery surface must expose one primary data region at a time with explicit protected-items versus recovery-events view switching so Pulse stays inventory-first for Proxmox operators without collapsing the page back into a single-platform backup screen
15. Letting the primary recovery workspace tabs drift out of canonical route state; when operators explicitly switch between protected items and recovery events, the shared recovery link builder and page model must preserve that selection in route state unless the active `rollupId` or `day` context already implies the default workspace
16. Treating a selected protected-item rollup as row-click-only or header-only state instead of a canonical history filter; when a protected-item row focuses recovery history, the governed recovery events controls must surface that focus inside the shared filter surface through the same user-creatable item filter control, count it with the rest of the active filters, and let the same filter reset path clear it
+17. Letting recovery-event focus leak as hidden state on the protected inventory surface; switching back to protected items must clear event-only `rollupId` and `day` context, and protected-item drill-ins must open recovery events without preserving an invisible day filter that can make valid history look empty.
+18. Letting the recovery details panel lead with transport-shaped payloads; operator-facing details must summarize outcome, artifact, target, restore readiness, and readable metadata labels first, while raw JSON and provider-specific keys stay behind an explicitly technical disclosure.
+19. Letting recovery posture summaries become passive counters only; summary-card actions may focus events, stale inventory, or attention inventory, but those actions must route through the canonical recovery workspace and route-state owner instead of mutating local-only filter state.
## Completion Obligations
diff --git a/frontend-modern/src/components/Recovery/Recovery.tsx b/frontend-modern/src/components/Recovery/Recovery.tsx
index 9cfee98603..97801a0089 100644
--- a/frontend-modern/src/components/Recovery/Recovery.tsx
+++ b/frontend-modern/src/components/Recovery/Recovery.tsx
@@ -508,13 +508,27 @@ const Recovery: Component = () => {
batch(() => {
setWorkspaceView('events');
setRollupId(nextRollupId);
+ setSelectedDateKey(null);
+ setCurrentPage(1);
+ });
+ };
+
+ const handleWorkspaceViewChange = (value: string) => {
+ const nextView = value as RecoveryWorkspaceView;
+ batch(() => {
+ setWorkspaceView(nextView);
+ setCurrentPage(1);
+ if (nextView === 'inventory') {
+ setRollupId('');
+ setSelectedDateKey(null);
+ }
});
};
const workspaceControls = () => (
<Subtabs
value={workspaceView()}
- onChange={(value) => setWorkspaceView(value as RecoveryWorkspaceView)}
+ onChange={handleWorkspaceViewChange}
ariaLabel="Recovery data view"
class="px-4 sm:px-5"
tabs={[
@@ -590,6 +604,37 @@ const Recovery: Component = () => {
summary={overallRollupsSummary}
timeRange={summaryRange}
onTimeRangeChange={setSummaryRange}
+ onOpenEvents={() => {
+ batch(() => {
+ setWorkspaceView('events');
+ setCurrentPage(1);
+ });
+ }}
+ onShowAttention={() => {
+ batch(() => {
+ setWorkspaceView('inventory');
+ setRollupId('');
+ setSelectedDateKey(null);
+ if ((overallRollupsSummary().counts.failed || 0) > 0) {
+ setHistoryOutcomeFilter('failed');
+ setProtectedStaleOnly(false);
+ } else {
+ setHistoryOutcomeFilter('all');
+ setProtectedStaleOnly(true);
+ }
+ setCurrentPage(1);
+ });
+ }}
+ onShowStale={() => {
+ batch(() => {
+ setWorkspaceView('inventory');
+ setRollupId('');
+ setSelectedDateKey(null);
+ setHistoryOutcomeFilter('all');
+ setProtectedStaleOnly(true);
+ setCurrentPage(1);
+ });
+ }}
/>
{workspaceControls()}
diff --git a/frontend-modern/src/components/Recovery/RecoveryActivitySection.tsx b/frontend-modern/src/components/Recovery/RecoveryActivitySection.tsx
index 3dd1e71a3a..dfe4d9fc64 100644
--- a/frontend-modern/src/components/Recovery/RecoveryActivitySection.tsx
+++ b/frontend-modern/src/components/Recovery/RecoveryActivitySection.tsx
@@ -1,4 +1,4 @@
-import { For, Show } from 'solid-js';
+import { For, Show, createMemo } from 'solid-js';
import type { Accessor, Component, JSX } from 'solid-js';
import { Card } from '@/components/shared/Card';
@@ -70,6 +70,58 @@ interface RecoveryActivitySectionProps {
function RecoveryActivitySectionContent(props: RecoveryActivitySectionProps): JSX.Element {
const timelineAxisTicks = () => getRecoveryTimelineAxisTicks(props.timeline().points.length);
+ const formatActivityAverage = (value: number): string => {
+ if (!Number.isFinite(value) || value <= 0) return '0/day';
+ if (value >= 10) return `${Math.round(value)}/day`;
+ return `${Number(value.toFixed(1))}/day`;
+ };
+ const selectedTimelinePoint = createMemo(() => {
+ const selected = props.selectedDateKey();
+ if (!selected) return null;
+ return props.timeline().points.find((point) => point.key === selected) || null;
+ });
+ const lowestActivePoint = createMemo(() => {
+ const active = props.timeline().points.filter((point) => point.total > 0);
+ if (active.length === 0) return null;
+ return active.reduce((lowest, point) => (point.total < lowest.total ? point : lowest), active[0]);
+ });
+ const activitySignal = createMemo(() => {
+ const selected = selectedTimelinePoint();
+ const average = props.activitySummary().averagePerDay;
+ if (selected) {
+ if (average > 0 && selected.total < average * 0.5) {
+ return {
+ tone: 'amber',
+ label: 'Below normal',
+ detail: `${selected.total} points vs ${formatActivityAverage(average)} average`,
+ };
+ }
+ return {
+ tone: 'base',
+ label: 'Selected day',
+ detail: `${selected.total} points`,
+ };
+ }
+
+ const lowest = lowestActivePoint();
+ if (lowest && average > 0 && lowest.total < average * 0.5) {
+ return {
+ tone: 'amber',
+ label: 'Lowest active day',
+ detail: `${getRecoveryPrettyDateLabel(lowest.key)}: ${lowest.total} points`,
+ };
+ }
+
+ return {
+ tone: 'base',
+ label: 'Average volume',
+ detail: formatActivityAverage(average),
+ };
+ });
+ const signalClass = () =>
+ activitySignal().tone === 'amber'
+ ? 'border-amber-500/30 bg-amber-500/10 text-amber-300'
+ : 'border-border bg-surface-alt text-muted';
return (
<>
@@ -89,7 +141,15 @@ function RecoveryActivitySectionContent(props: RecoveryActivitySectionProps): JS
</span>
</Show>
</div>
- <div class="flex flex-wrap items-center gap-2" />
+ <div class="flex flex-wrap items-center gap-2 text-[11px]">
+ <span class="rounded-md border border-border bg-surface-alt px-2 py-1 text-muted">
+ Avg {formatActivityAverage(props.activitySummary().averagePerDay)}
+ </span>
+ <span class={`rounded-md border px-2 py-1 ${signalClass()}`}>
+ <span class="font-medium">{activitySignal().label}</span>
+ <span class="ml-1"> {activitySignal().detail}</span>
+ </span>
+ </div>
</div>
</div>
diff --git a/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx b/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx
index 7d4f53da95..1b707305e6 100644
--- a/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx
+++ b/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx
@@ -146,7 +146,7 @@ export const RecoveryHistorySection: Component<RecoveryHistorySectionProps> = (p
return (
<div class="flex flex-col gap-2">
<Show when={!props.kioskMode}>
- <Card padding="none" tone="card" class="overflow-hidden border-border-subtle bg-surface">
+ <Card padding="none" tone="card" class="overflow-visible border-border-subtle bg-surface">
<div class="px-4 py-3 sm:px-5">
<Show when={props.hasFocusedRollup() && props.selectedHistoryItemLabel()}>
<div class="mb-3 flex min-w-0 flex-wrap items-center gap-2 text-sm">
diff --git a/frontend-modern/src/components/Recovery/RecoveryPointDetails.test.tsx b/frontend-modern/src/components/Recovery/RecoveryPointDetails.test.tsx
index 6001967905..df0b4049fc 100644
--- a/frontend-modern/src/components/Recovery/RecoveryPointDetails.test.tsx
+++ b/frontend-modern/src/components/Recovery/RecoveryPointDetails.test.tsx
@@ -78,6 +78,9 @@ describe('RecoveryPointDetails', () => {
owner: 'root@pam',
files: ['vm/100/2026-03-10T10:00:00Z'],
verificationState: 'ok',
+ vmid: '100',
+ datastore: 'fast-store',
+ namespace: 'Finance',
},
}}
/>
@@ -94,16 +97,20 @@ describe('RecoveryPointDetails', () => {
expect(screen.getByText('Namespace / Group')).toBeInTheDocument();
expect(screen.getByText('Point Type')).toBeInTheDocument();
expect(screen.getByText('Method')).toBeInTheDocument();
- expect(screen.getByText('Outcome')).toBeInTheDocument();
+ expect(screen.getAllByText('Outcome').length).toBeGreaterThan(0);
expect(screen.getByText('VM')).toBeInTheDocument();
expect(screen.getByText('Lab Cluster')).toBeInTheDocument();
expect(screen.getByText('pve-01')).toBeInTheDocument();
- expect(screen.getByText('Finance')).toBeInTheDocument();
+ expect(screen.getAllByText('Finance').length).toBeGreaterThan(0);
expect(screen.getByText('Backup')).toBeInTheDocument();
expect(screen.getByText('Remote Copy')).toBeInTheDocument();
expect(screen.getAllByText('Success').length).toBeGreaterThan(0);
expect(screen.getAllByText('Verified').length).toBeGreaterThan(0);
expect(screen.getByText('Target Ref')).toBeInTheDocument();
+ expect(screen.getByText('VMID')).toBeInTheDocument();
+ expect(screen.getByText('Datastore')).toBeInTheDocument();
+ expect(screen.getByText('Namespace')).toBeInTheDocument();
+ expect(screen.queryByText('details.vmid')).not.toBeInTheDocument();
const platformCard = screen.getByText('Platform').parentElement?.parentElement;
expect(platformCard).not.toBeNull();
diff --git a/frontend-modern/src/components/Recovery/RecoveryPointDetails.tsx b/frontend-modern/src/components/Recovery/RecoveryPointDetails.tsx
index c61b4b5679..ac7c91f2af 100644
--- a/frontend-modern/src/components/Recovery/RecoveryPointDetails.tsx
+++ b/frontend-modern/src/components/Recovery/RecoveryPointDetails.tsx
@@ -7,10 +7,15 @@ import type { RecoveryExternalRef, RecoveryPoint } from '@/types/recovery';
import { formatAbsoluteTime, formatBytes, formatUptime } from '@/utils/format';
import { getRecoveryItemTypeLabel, getRecoveryPointItemTypeKey } from '@/utils/recoveryItemTypePresentation';
import { getRecoveryPointLocationEntries } from '@/utils/recoveryLocationPresentation';
+import {
+ getRecoveryOutcomeTextClass,
+ normalizeRecoveryOutcome,
+} from '@/utils/recoveryOutcomePresentation';
import {
getRecoveryPointKindLabel,
getRecoveryPointModeLabel,
getRecoveryPointOutcomeLabel,
+ getRecoveryPointRepositoryLabel,
} from '@/utils/recoveryRecordPresentation';
import { pbsInstanceFromResource } from '@/utils/resourceStateAdapters';
import {
@@ -28,6 +33,29 @@ const detailNumber = (p: RecoveryPoint, key: string): number | null => {
return typeof value === 'number' && Number.isFinite(value) ? value : null;
};
+const detailString = (p: RecoveryPoint, key: string): string => {
+ const value = p.details?.[key];
+ return typeof value === 'string' ? value.trim() : '';
+};
+
+const COMMON_DETAIL_LABELS: Record<string, string> = {
+ instance: 'Instance',
+ vmid: 'VMID',
+ node: 'Node',
+ snapshotName: 'Snapshot',
+ volid: 'Volume',
+ datastore: 'Datastore',
+ namespace: 'Namespace',
+ storage: 'Storage',
+ taskName: 'Task',
+ phase: 'Phase',
+ hostname: 'Hostname',
+ dataset: 'Dataset',
+ k8sClusterName: 'Kubernetes Cluster',
+ storageLocation: 'Storage Location',
+ veleroName: 'Velero Backup',
+};
+
const formatDurationFromISO = (
startedAt: string | null | undefined,
completedAt: string | null | undefined,
@@ -152,6 +180,97 @@ export const RecoveryPointDetails: Component<RecoveryPointDetailsProps> = (props
if (typeof top === 'number' && Number.isFinite(top)) return top;
return detailNumber(point(), 'sizeBytes');
});
+ const itemLabel = createMemo(() => {
+ const displayLabel = String(point().display?.itemLabel || '').trim();
+ if (displayLabel) return displayLabel;
+ const refLabel = labelForRef(point().itemRef || point().subjectRef);
+ if (refLabel !== 'n/a') return refLabel;
+ return point().itemResourceId || point().id;
+ });
+ const targetLabel = createMemo(() => {
+ const repositoryLabel = getRecoveryPointRepositoryLabel(point());
+ if (repositoryLabel) return repositoryLabel;
+ const refLabel = labelForRef(point().repositoryRef);
+ return refLabel === 'n/a' ? 'No target recorded' : refLabel;
+ });
+ const normalizedOutcome = createMemo(() => normalizeRecoveryOutcome(point().outcome));
+ const outcomeLabel = createMemo(() => getRecoveryPointOutcomeLabel(point().outcome));
+ const readiness = createMemo(() => {
+ const outcome = normalizedOutcome();
+ if (outcome === 'failed') {
+ return {
+ label: 'Not restorable',
+ detail: 'This event did not produce a usable recovery point.',
+ className: 'text-rose-600 dark:text-rose-400',
+ };
+ }
+ if (outcome === 'running') {
+ return {
+ label: 'In progress',
+ detail: 'Recovery metadata is still being collected.',
+ className: 'text-blue-600 dark:text-blue-400',
+ };
+ }
+ if (point().verified === true) {
+ return {
+ label: 'Verified candidate',
+ detail: 'Verification completed for this recovery point.',
+ className: 'text-emerald-600 dark:text-emerald-400',
+ };
+ }
+ if (point().verified === false) {
+ return {
+ label: 'Verification failed',
+ detail: 'Treat this artifact as suspect until verification is rerun.',
+ className: 'text-amber-600 dark:text-amber-400',
+ };
+ }
+ if (outcome === 'success') {
+ return {
+ label: 'Available candidate',
+ detail: 'The event succeeded, but no verification result was recorded.',
+ className: 'text-emerald-600 dark:text-emerald-400',
+ };
+ }
+ return {
+ label: 'Review required',
+ detail: 'The event needs an operator review before restore use.',
+ className: 'text-amber-600 dark:text-amber-400',
+ };
+ });
+ const failureDetail = createMemo(() => {
+ const error = detailString(point(), 'error');
+ if (error) return error;
+ const status = detailString(point(), 'status');
+ if (normalizedOutcome() === 'failed' && status) return status;
+ return '';
+ });
+ const operatorSummaryPairs = createMemo(() => [
+ {
+ k: 'Outcome',
+ v: outcomeLabel(),
+ valueClass: getRecoveryOutcomeTextClass(normalizedOutcome()),
+ detail: formatDurationFromISO(point().startedAt, point().completedAt),
+ },
+ {
+ k: 'Artifact',
+ v: `${getRecoveryPointKindLabel(point().kind)} / ${getRecoveryPointModeLabel(point().mode)}`,
+ valueClass: 'text-base-content',
+ detail: itemLabel(),
+ },
+ {
+ k: 'Target',
+ v: targetLabel(),
+ valueClass: 'text-base-content',
+ detail: platformLabel() || 'n/a',
+ },
+ {
+ k: 'Restore readiness',
+ v: readiness().label,
+ valueClass: readiness().className,
+ detail: readiness().detail,
+ },
+ ]);
const summaryPairs = createMemo(() => {
const p = point();
@@ -200,7 +319,7 @@ export const RecoveryPointDetails: Component<RecoveryPointDetailsProps> = (props
for (const k of commonDetailKeys) {
const v = p.details?.[k];
if (v == null) continue;
- pairs.push({ k: `details.${k}`, v: String(v) });
+ pairs.push({ k: COMMON_DETAIL_LABELS[k] || k, v: String(v) });
}
return pairs;
@@ -245,6 +364,47 @@ export const RecoveryPointDetails: Component<RecoveryPointDetailsProps> = (props
</button>
</div>
+ <div class="rounded-md border border-border bg-surface-alt/40 p-3">
+ <div class="mb-3 flex flex-wrap items-start justify-between gap-3">
+ <div>
+ <div class="text-[10px] font-semibold uppercase tracking-wide text-muted">
+ Recovery Point Summary
+ </div>
+ <div class="mt-1 text-sm font-medium text-base-content break-words">
+ {itemLabel()}
+ </div>
+ </div>
+ <Show when={platformBadge()}>
+ {(badge) => (
+ <span class={badge().classes} title={badge().title}>
+ {badge().label}
+ </span>
+ )}
+ </Show>
+ </div>
+ <div class="grid grid-cols-1 gap-2 md:grid-cols-2 xl:grid-cols-4">
+ <For each={operatorSummaryPairs()}>
+ {(pair) => (
+ <div class="rounded border border-border bg-surface px-3 py-2 text-xs">
+ <div class="text-[10px] font-semibold uppercase tracking-wide text-muted">
+ {pair.k}
+ </div>
+ <div class={`mt-0.5 text-[13px] font-semibold ${pair.valueClass}`}>
+ {pair.v}
+ </div>
+ <div class="mt-1 text-[11px] leading-4 text-muted break-words">{pair.detail}</div>
+ </div>
+ )}
+ </For>
+ </div>
+ <Show when={failureDetail()}>
+ <div class="mt-3 rounded border border-rose-500/30 bg-rose-500/10 px-3 py-2 text-xs text-rose-700 dark:text-rose-200">
+ <div class="font-semibold">Failure detail</div>
+ <div class="mt-1 break-words font-mono text-[11px]">{failureDetail()}</div>
+ </div>
+ </Show>
+ </div>
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-2">
<For each={summaryPairs()}>
{(pair) => (
@@ -479,12 +639,16 @@ export const RecoveryPointDetails: Component<RecoveryPointDetailsProps> = (props
</div>
</Show>
- <div class="rounded border border-border bg-surface p-3">
- <div class="text-[10px] font-semibold uppercase tracking-wide text-muted">Raw</div>
- <pre class="mt-2 overflow-auto text-[11px] leading-relaxed text-base-content font-mono">
- {prettyJSON()}
- </pre>
- </div>
+ <details class="rounded border border-border bg-surface">
+ <summary class="cursor-pointer px-3 py-2 text-[10px] font-semibold uppercase tracking-wide text-muted hover:bg-surface-hover">
+ Technical details
+ </summary>
+ <div class="border-t border-border px-3 py-2">
+ <pre class="overflow-auto text-[11px] leading-relaxed text-base-content font-mono">
+ {prettyJSON()}
+ </pre>
+ </div>
+ </details>
</div>
);
};
diff --git a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx
index 71adfd0246..76d966a71e 100644
--- a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx
+++ b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx
@@ -38,6 +38,7 @@ import {
getRecoveryProtectedSearchPlaceholder,
getRecoverySearchHistoryEmptyMessage,
getRecoveryRollupTimestampMs,
+ STALE_ISSUE_THRESHOLD_MS,
} from '@/utils/recoveryTablePresentation';
import {
normalizeRecoveryOutcome,
@@ -87,6 +88,39 @@ interface RecoveryProtectedInventorySectionProps {
}
const availableOutcomes = ['all', 'success', 'warning', 'failed', 'running'] as const;
+const STALE_THRESHOLD_DAYS = Math.max(
+ 1,
+ Math.round(STALE_ISSUE_THRESHOLD_MS / (24 * 60 * 60 * 1000)),
+);
+
+const getProtectionInsight = (
+ rollup: ProtectionRollup,
+ inventoryStatus: ReturnType<typeof getRecoveryRollupInventoryStatus>,
+ nowMs: number,
+): string => {
+ const successMs = rollup.lastSuccessAt ? Date.parse(rollup.lastSuccessAt) : 0;
+ const attemptMs = rollup.lastAttemptAt ? Date.parse(rollup.lastAttemptAt) : 0;
+
+ if (inventoryStatus === 'never-succeeded') {
+ return attemptMs > 0
+ ? `No successful point recorded after ${formatRelativeTime(attemptMs)}`
+ : 'No successful point recorded yet';
+ }
+
+ if (inventoryStatus === 'stale') {
+ if (successMs > 0 && Number.isFinite(successMs)) {
+ const ageDays = Math.max(1, Math.floor((nowMs - successMs) / (24 * 60 * 60 * 1000)));
+ return `Last success is ${ageDays} days old; expected within ${STALE_THRESHOLD_DAYS} days`;
+ }
+ return `No successful point within ${STALE_THRESHOLD_DAYS} days`;
+ }
+
+ if (inventoryStatus === 'failed') return 'Latest protection event failed';
+ if (inventoryStatus === 'warning') return 'Latest protection event completed with warnings';
+ if (inventoryStatus === 'running') return 'Protection event in progress';
+ return '';
+};
+
export const RecoveryProtectedInventorySection: Component<
RecoveryProtectedInventorySectionProps
> = (props) => {
@@ -202,7 +236,7 @@ export const RecoveryProtectedInventorySection: Component<
return (
<div class="flex flex-col gap-2">
<Show when={!props.kioskMode}>
- <Card padding="none" tone="card" class="overflow-hidden border-border-subtle bg-surface">
+ <Card padding="none" tone="card" class="overflow-visible border-border-subtle bg-surface">
<div class="px-4 py-3 sm:px-5">
<PageControls
role="group"
@@ -280,7 +314,7 @@ export const RecoveryProtectedInventorySection: Component<
<LabeledFilterSelect
id="recovery-protected-status-filter"
- label="Latest status"
+ label="Protection state"
value={props.historyOutcomeFilter()}
onChange={(event) => {
const value = event.currentTarget.value as 'all' | RecoveryOutcome;
@@ -378,7 +412,7 @@ export const RecoveryProtectedInventorySection: Component<
['type', 'Item Type'],
['platform', getRecoveryArtifactColumnLabel('platform', 'Platform')],
['lastBackup', 'Latest Point'],
- ['outcome', 'Status'],
+ ['outcome', 'Protection State'],
] as const
).map(([column, label]) => (
<TableHead
@@ -390,7 +424,7 @@ export const RecoveryProtectedInventorySection: Component<
: column === 'lastBackup'
? ' w-[120px]'
: column === 'outcome'
- ? ' w-[70px]'
+ ? ' w-[116px]'
: ''
}`}
onClick={() => toggleProtectedSort(column)}
@@ -431,6 +465,7 @@ export const RecoveryProtectedInventorySection: Component<
getRecoveryItemTypePresentation(getRecoveryRollupItemTypeKey(rollup)) || null;
const nowMs = Date.now();
const neverSucceeded = inventoryStatus === 'never-succeeded';
+ const protectionInsight = getProtectionInsight(rollup, inventoryStatus, nowMs);
return (
<TableRow
@@ -459,6 +494,11 @@ export const RecoveryProtectedInventorySection: Component<
</Show>
</div>
</div>
+ <Show when={protectionInsight}>
+ <div class="pl-4 text-[10px] leading-4 text-muted">
+ {protectionInsight}
+ </div>
+ </Show>
<div class="flex flex-wrap items-center gap-1.5 text-[10px] md:hidden">
<Show when={itemTypePresentation?.label}>
<span class={itemTypePresentation?.tableBadgeClasses}>
@@ -520,13 +560,22 @@ export const RecoveryProtectedInventorySection: Component<
: undefined
}
>
- {successMs > 0 ? (
- formatRelativeTime(successMs)
- ) : neverSucceeded ? (
- <span class={getRecoverySpecialOutcomeTextClass('never')}>never</span>
- ) : (
- '—'
- )}
+ <div class="flex flex-col">
+ <span>
+ {successMs > 0 ? (
+ formatRelativeTime(successMs)
+ ) : neverSucceeded ? (
+ <span class={getRecoverySpecialOutcomeTextClass('never')}>never</span>
+ ) : (
+ '—'
+ )}
+ </span>
+ <Show when={inventoryStatus !== 'healthy' && attemptMs > 0}>
+ <span class="text-[10px] font-normal text-muted">
+ Attempt {formatRelativeTime(attemptMs)}
+ </span>
+ </Show>
+ </div>
</TableCell>
<TableCell class="whitespace-nowrap px-3 py-1.5">
diff --git a/frontend-modern/src/components/Recovery/RecoverySummary.tsx b/frontend-modern/src/components/Recovery/RecoverySummary.tsx
index f4d8ab46ea..372dea81f9 100644
--- a/frontend-modern/src/components/Recovery/RecoverySummary.tsx
+++ b/frontend-modern/src/components/Recovery/RecoverySummary.tsx
@@ -27,6 +27,9 @@ export interface RecoverySummaryProps {
};
timeRange: () => RecoverySummaryTimeRange;
onTimeRangeChange?: (range: RecoverySummaryTimeRange) => void;
+ onOpenEvents?: () => void;
+ onShowAttention?: () => void;
+ onShowStale?: () => void;
}
export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {
@@ -110,6 +113,8 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {
if (!latestLabel) return undefined;
return <span class="ml-auto truncate text-xs text-muted">{latestLabel}</span>;
});
+ const summaryActionClass =
+ 'mt-auto inline-flex w-fit rounded border border-border bg-surface px-2 py-1 text-[11px] font-medium text-base-content hover:bg-surface-hover';
return (
<Show when={!loaded() || hasRollups()}>
<SummaryPanel
@@ -161,6 +166,11 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {
</div>
<div class="text-[11px] text-muted">{primaryPostureMetric().label}</div>
</div>
+ <Show when={attentionCount() > 0 && props.onShowAttention}>
+ <button type="button" class={summaryActionClass} onClick={() => props.onShowAttention?.()}>
+ Show attention
+ </button>
+ </Show>
</div>
</SummaryMetricCard>
@@ -178,6 +188,11 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {
</div>
<div class="text-[11px] text-muted">fresh in 24h</div>
</div>
+ <Show when={summary().stale > 0 && props.onShowStale}>
+ <button type="button" class={summaryActionClass} onClick={() => props.onShowStale?.()}>
+ Show stale
+ </button>
+ </Show>
</div>
</SummaryMetricCard>
@@ -195,6 +210,11 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {
</div>
<div class="text-[11px] text-muted">types</div>
</div>
+ <Show when={itemCoverage().primaryItemLabel}>
+ <div class="text-[11px] text-muted">
+ Primary: {itemCoverage().primaryItemLabel}
+ </div>
+ </Show>
</div>
</SummaryMetricCard>
@@ -213,6 +233,11 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {
</div>
<div class="text-[11px] text-muted">points</div>
</div>
+ <Show when={props.onOpenEvents}>
+ <button type="button" class={summaryActionClass} onClick={() => props.onOpenEvents?.()}>
+ Open events
+ </button>
+ </Show>
</div>
</SummaryMetricCard>
</SummaryPanel>
diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
index b67bcc1f6e..7a75df9ea3 100644
--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
@@ -331,7 +331,7 @@ describe('Recovery', () => {
expect(within(inventoryTable).getByText('Item')).toBeInTheDocument();
expect(within(inventoryTable).getByText('Item Type')).toBeInTheDocument();
expect(within(inventoryTable).getByText('Platform')).toBeInTheDocument();
- expect(within(inventoryTable).getByText('Status')).toBeInTheDocument();
+ expect(within(inventoryTable).getByText('Protection State')).toBeInTheDocument();
expect(within(inventoryTable).queryByText('ITEM TYPE')).not.toBeInTheDocument();
expect(within(inventoryTable).queryByText('PLATFORM')).not.toBeInTheDocument();
expect(inventoryBody?.className).toContain('divide-y');
@@ -417,7 +417,7 @@ describe('Recovery', () => {
'min-w-[',
);
expect(within(inventoryControls).getByLabelText('Platform').className).not.toContain('min-w-[');
- expect(within(inventoryControls).getByLabelText('Latest status').className).not.toContain(
+ expect(within(inventoryControls).getByLabelText('Protection state').className).not.toContain(
'min-w-[',
);
expect(screen.getAllByText(/^1 event$/i)).toHaveLength(1);
@@ -1069,7 +1069,7 @@ describe('Recovery', () => {
it('uses one canonical outcome filter across protected items and history transport', async () => {
render(() => <Recovery />);
- const protectedStatus = await screen.findByLabelText('Latest status');
+ const protectedStatus = await screen.findByLabelText('Protection state');
fireEvent.change(protectedStatus, { target: { value: 'failed' } });
await waitFor(() => {
diff --git a/frontend-modern/src/components/shared/FilterToolbar.test.tsx b/frontend-modern/src/components/shared/FilterToolbar.test.tsx
index 0ab633762d..b38de2eb7f 100644
--- a/frontend-modern/src/components/shared/FilterToolbar.test.tsx
+++ b/frontend-modern/src/components/shared/FilterToolbar.test.tsx
@@ -1,7 +1,12 @@
import { cleanup, render, screen, waitFor } from '@solidjs/testing-library';
import { For, createSignal } from 'solid-js';
import { afterEach, describe, expect, it, vi } from 'vitest';
-import { FilterHeader, FilterSegmentedControl, LabeledFilterSelect } from './FilterToolbar';
+import {
+ FilterHeader,
+ FilterSegmentedControl,
+ LabeledFilterSelect,
+ filterPanelClass,
+} from './FilterToolbar';
import toggleSource from './Toggle.tsx?raw';
import toggleModelSource from './toggleModel.ts?raw';
import toggleStateSource from './useToggleState.ts?raw';
@@ -94,4 +99,10 @@ describe('FilterHeader', () => {
true,
);
});
+
+ it('keeps shared filter popovers above nested table and card shells', () => {
+ expect(filterPanelClass).toContain('absolute');
+ expect(filterPanelClass).toContain('z-[80]');
+ expect(filterPanelClass).toContain('w-[min(40rem,calc(100vw-2rem))]');
+ });
});
diff --git a/frontend-modern/src/components/shared/FilterToolbar.tsx b/frontend-modern/src/components/shared/FilterToolbar.tsx
index 4dbf5f67f5..5051983ae9 100644
--- a/frontend-modern/src/components/shared/FilterToolbar.tsx
+++ b/frontend-modern/src/components/shared/FilterToolbar.tsx
@@ -17,7 +17,7 @@ export const filterSelectClass =
'rounded-md border border-border bg-surface px-2 py-1 text-xs font-medium text-base-content outline-none focus:border-blue-500';
export const filterDividerClass = 'hidden h-5 w-px bg-surface-hover sm:block';
export const filterPanelClass =
- 'absolute right-0 top-[calc(100%+0.5rem)] z-20 w-[min(40rem,calc(100vw-2rem))] rounded-md border border-border bg-surface p-3 shadow-lg';
+ 'absolute right-0 top-[calc(100%+0.5rem)] z-[80] w-[min(40rem,calc(100vw-2rem))] rounded-md border border-border bg-surface p-3 shadow-lg';
export const filterPanelTitleClass = 'text-sm font-medium text-base-content';
export const filterPanelDescriptionClass = 'text-xs text-muted';
export const mobileFiltersButtonClass =
diff --git a/frontend-modern/src/components/shared/__tests__/WhatsNewModal.test.tsx b/frontend-modern/src/components/shared/__tests__/WhatsNewModal.test.tsx
index dfcaf7f9ad..f4b6fcab4b 100644
--- a/frontend-modern/src/components/shared/__tests__/WhatsNewModal.test.tsx
+++ b/frontend-modern/src/components/shared/__tests__/WhatsNewModal.test.tsx
@@ -16,6 +16,7 @@ vi.mock('@/stores/sessionPresentationPolicy', () => ({
describe('WhatsNewModal', () => {
beforeEach(() => {
+ window.history.pushState({}, '', '/');
localStorage.clear();
presentationPolicyIsDemoModeMock.mockReturnValue(false);
sessionPresentationPolicyResolvedMock.mockReturnValue(true);
@@ -157,4 +158,14 @@ describe('WhatsNewModal', () => {
const docsLink = await screen.findByRole('link', { name: 'Navigation guide' });
expect(docsLink).toHaveAttribute('href', '/docs/MIGRATION_UNIFIED_NAV.md');
});
+
+ it('starts the navigation guide on recovery when opened from recovery', async () => {
+ window.history.pushState({}, '', '/recovery?rollupId=res%3Asystem-container-1');
+
+ render(() => <WhatsNewModal />);
+
+ const dialog = await screen.findByRole('dialog', { name: 'Pulse navigation guide' });
+ expect(within(dialog).getByText('Step 5 of 5')).toBeInTheDocument();
+ expect(within(dialog).getByText(/Use this for backups, snapshots, and replication/i)).toBeInTheDocument();
+ });
});
diff --git a/frontend-modern/src/components/shared/useWhatsNewModalState.ts b/frontend-modern/src/components/shared/useWhatsNewModalState.ts
index 79473e55fc..73e46819bd 100644
--- a/frontend-modern/src/components/shared/useWhatsNewModalState.ts
+++ b/frontend-modern/src/components/shared/useWhatsNewModalState.ts
@@ -31,6 +31,20 @@ const MOBILE_TAB_SELECTOR_BY_TARGET = {
const clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);
+const getInitialStepIndexForPath = (): number => {
+ if (typeof window === 'undefined') return 0;
+ const path = window.location.pathname.toLowerCase();
+ const target = (() => {
+ if (path.startsWith('/recovery')) return 'recovery';
+ if (path.startsWith('/storage')) return 'storage';
+ if (path.startsWith('/workloads')) return 'workloads';
+ if (path.startsWith('/infrastructure')) return 'infrastructure';
+ return 'dashboard';
+ })();
+ const index = WHATS_NEW_FEATURE_CARDS.findIndex((card) => card.target === target);
+ return index >= 0 ? index : 0;
+};
+
const isVisibleElement = (element: Element | null): element is HTMLElement => {
if (!(element instanceof HTMLElement)) return false;
const rect = element.getBoundingClientRect();
@@ -58,7 +72,7 @@ export function useWhatsNewModalState() {
);
const [dontShowAgain, setDontShowAgain] = createSignal(true);
const [dismissedForSession, setDismissedForSession] = createSignal(false);
- const [stepIndex, setStepIndex] = createSignal(0);
+ const [stepIndex, setStepIndex] = createSignal(getInitialStepIndexForPath());
const [panelRef, setPanelRef] = createSignal<HTMLDivElement | null>(null);
const [spotlightRect, setSpotlightRect] = createSignal<SpotlightRect | null>(null);
@@ -77,7 +91,7 @@ export function useWhatsNewModalState() {
const isLastStep = createMemo(() => stepIndex() >= WHATS_NEW_FEATURE_CARDS.length - 1);
const resetTourState = () => {
- setStepIndex(0);
+ setStepIndex(getInitialStepIndexForPath());
setSpotlightRect(null);
};
@@ -115,7 +129,7 @@ export function useWhatsNewModalState() {
const handleReopen = () => {
setHasSeen(false);
setDismissedForSession(false);
- setStepIndex(0);
+ setStepIndex(getInitialStepIndexForPath());
};
window.addEventListener(WHATS_NEW_REOPEN_EVENT, handleReopen);
onCleanup(() => window.removeEventListener(WHATS_NEW_REOPEN_EVENT, handleReopen));
diff --git a/frontend-modern/src/features/recovery/useRecoverySurfaceState.ts b/frontend-modern/src/features/recovery/useRecoverySurfaceState.ts
index ce2cf19cd8..cca2acbb03 100644
--- a/frontend-modern/src/features/recovery/useRecoverySurfaceState.ts
+++ b/frontend-modern/src/features/recovery/useRecoverySurfaceState.ts
@@ -332,6 +332,8 @@ export function useRecoverySurfaceState() {
const derivedDefaultView: RecoveryWorkspaceView =
nextRollup || nextDay ? 'events' : 'inventory';
const resolvedView = (nextView || derivedDefaultView) as RecoveryWorkspaceView;
+ const visibleRollup = resolvedView === 'events' ? nextRollup : '';
+ const visibleDay = resolvedView === 'events' ? nextDay : '';
const nextMode = normalizeRecoveryModeQueryValue(parsed.mode);
const rawScope = normalizeRecoveryRouteValue(parsed.scope).toLowerCase();
const nextScope: 'all' | 'workload' = rawScope === 'workload' ? 'workload' : 'all';
@@ -340,7 +342,7 @@ export function useRecoverySurfaceState() {
const verificationValue = normalizeRecoveryRouteValue(parsed.verification).toLowerCase();
const statusValue = normalizeRecoveryRouteValue(parsed.status).toLowerCase();
- if (nextRollup !== untrack(rollupId)) setRollupId(nextRollup);
+ if (visibleRollup !== untrack(rollupId)) setRollupId(visibleRollup);
if (resolvedView !== untrack(workspaceView)) setWorkspaceView(resolvedView);
if (nextQuery !== untrack(queryFilter)) setQueryFilter(nextQuery);
if (nextPlatform !== untrack(platformFilter)) setPlatformFilter(nextPlatform);
@@ -348,7 +350,7 @@ export function useRecoverySurfaceState() {
if (nextStaleOnly !== untrack(protectedStaleOnly)) setProtectedStaleOnly(nextStaleOnly);
if (nextRange !== untrack(chartRangeDays)) setChartRangeDays(nextRange as 7 | 30 | 90 | 365);
if (nextCluster !== untrack(clusterFilter)) setClusterFilter(nextCluster);
- if ((nextDay || null) !== untrack(selectedDateKey)) setSelectedDateKey(nextDay || null);
+ if ((visibleDay || null) !== untrack(selectedDateKey)) setSelectedDateKey(visibleDay || null);
if (nextMode !== untrack(modeFilter)) setModeFilter(nextMode);
if (nextScope !== untrack(scopeFilter)) setScopeFilter(nextScope);
if (nextNode !== untrack(nodeFilter)) setNodeFilter(nextNode);