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.

Keep Coverage restore-point identifiers readable without hover

pulse-triage[bot]ff371a3ab745
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 1bfbcbb8f6..75fc0b1419 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -20,6 +20,24 @@
## Purpose
+### Coverage restore points retain their identifiers without hover
+
+The existing open Coverage evidence rows show each point's full identifier and
+metadata, including an archive's full volume identifier rather than only its
+format/hover title. When the Details column is hidden, those same facts fold
+beside the source. Literal text wraps at every width; it is not interpreted as
+markup. Same-time points remain distinguishable without changing inventory
+identity, preview selection/order/limits, requests, counts, posture or state.
+Ordinary polling updates the same open rows and preserves disclosure focus.
+
+Normal-suite `coverageRestorePointIdentity.test.tsx` consumes parsed PBS/PVE
+inventory with tied dates for all three source kinds, literal markup, long
+volume identifiers, an incomplete point and namesake guests. It covers responsive
+projections and same-panel polling. Desktop/narrow browser proof exercises the
+real Backups consumer with readable, inspected identifier and metadata pixels.
+This is safer evidence inspection, not a restored guest or installed recovery.
+
+
### Backup size uncertainty survives responsive disclosure
The Backups consumer uses the existing byte formatter only for a positive
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index b1077e6cbd..0e7729ae41 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -21,6 +21,24 @@
## Purpose
+### Coverage restore points retain their identifiers without hover
+
+The existing open Coverage evidence rows show each point's full identifier and
+metadata, including an archive's full volume identifier rather than only its
+format/hover title. When the Details column is hidden, those same facts fold
+beside the source. Literal text wraps at every width; it is not interpreted as
+markup. Same-time points remain distinguishable without changing inventory
+identity, preview selection/order/limits, requests, counts, posture or state.
+Ordinary polling updates the same open rows and preserves disclosure focus.
+
+Normal-suite `coverageRestorePointIdentity.test.tsx` consumes parsed PBS/PVE
+inventory with tied dates for all three source kinds, literal markup, long
+volume identifiers, an incomplete point and namesake guests. It covers responsive
+projections and same-panel polling. Desktop/narrow browser proof exercises the
+real Backups consumer with readable, inspected identifier and metadata pixels.
+This is safer evidence inspection, not a restored guest or installed recovery.
+
+
### Unknown restore-point sizes stay unknown across inspection and sorting
Raw inventory retains the provider's reported size. The recovery view admits
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 0408a50f6b..f81396adac 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -23,6 +23,24 @@ and sort the complete canonical change table while startup and ingestion wait.
## Purpose
+### Coverage restore points retain their identifiers without hover
+
+The existing open Coverage evidence rows show each point's full identifier and
+metadata, including an archive's full volume identifier rather than only its
+format/hover title. When the Details column is hidden, those same facts fold
+beside the source. Literal text wraps at every width; it is not interpreted as
+markup. Same-time points remain distinguishable without changing inventory
+identity, preview selection/order/limits, requests, counts, posture or state.
+Ordinary polling updates the same open rows and preserves disclosure focus.
+
+Normal-suite `coverageRestorePointIdentity.test.tsx` consumes parsed PBS/PVE
+inventory with tied dates for all three source kinds, literal markup, long
+volume identifiers, an incomplete point and namesake guests. It covers responsive
+projections and same-panel polling. Desktop/narrow browser proof exercises the
+real Backups consumer with readable, inspected identifier and metadata pixels.
+This is safer evidence inspection, not a restored guest or installed recovery.
+
+
### Restore-point size is evidence, not identity or protection
The Backups consumer retains the same point/workload identity, provider state
diff --git a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
index 993050fe54..6406e71319 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
@@ -46,6 +46,7 @@ import {
getWorkloadRecoveryPostureLabel,
type WorkloadCoverageRow,
type CoverageTask,
+ type RecoverableArtifact,
} from './proxmoxBackupRecoveryModel';
import { proxmoxBackupWorkloadSubject } from './proxmoxBackupWorkloadSubject';
import { formatDurationFromSeconds, type CoverageSortKey } from './proxmoxBackupsTableModel';
@@ -462,6 +463,27 @@ const buildCoverageDetailSections = (row: WorkloadCoverageRow): DetailSection[]
},
]);
+// Several points can share a reader, location and rounded age. Preserve the
+// point's own identifier and full metadata in the open evidence at every width;
+// a hidden Details column or hover-only volume cannot identify it on a phone.
+function CoverageRestorePointDetails(props: { artifact: RecoverableArtifact }) {
+ return (
+ <div
+ class="block whitespace-normal text-muted leading-snug wrap-anywhere"
+ data-coverage-evidence-detail
+ >
+ <span class="block" data-coverage-evidence-identifier>
+ Identifier: {props.artifact.nativeId}
+ </span>
+ <Show when={props.artifact.detailTitle || props.artifact.detail}>
+ <span class="mt-1 block" data-coverage-evidence-metadata>
+ Metadata: {props.artifact.detailTitle || props.artifact.detail}
+ </span>
+ </Show>
+ </div>
+ );
+}
+
// "Workload coverage" table: one row per workload answering "does this have a
// backup?" across PBS snapshots / PVE backup files / guest snapshots, each
// expanding to its restore evidence. Presentational — the parent owns the
@@ -1037,6 +1059,18 @@ export function ProxmoxCoverageTable(props: {
: 'Unknown size'}
</span>
</Show>
+ <Show
+ when={
+ !isCoverageEvidenceColumnVisible(
+ layoutMode(),
+ 'details',
+ )
+ }
+ >
+ <div class="mt-1">
+ <CoverageRestorePointDetails artifact={artifact} />
+ </div>
+ </Show>
</TableCell>
<Show
when={isCoverageEvidenceColumnVisible(
@@ -1098,13 +1132,7 @@ export function ProxmoxCoverageTable(props: {
<TableCell
class={`${getPlatformTableCellClassForKind('text')} text-base-content`}
>
- <span
- class="block whitespace-normal wrap-anywhere"
- title={artifact.detailTitle}
- data-coverage-evidence-detail
- >
- {artifact.detail || '—'}
- </span>
+ <CoverageRestorePointDetails artifact={artifact} />
</TableCell>
</Show>
</TableRow>
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx
index b766763c68..ab2f212fa4 100644
--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx
@@ -618,6 +618,14 @@ describe('ProxmoxCoverageTable column visibility', () => {
'whitespace-normal',
'wrap-anywhere',
);
+ // An age/source pair is not the point's identity. The open evidence keeps
+ // the full identifier and metadata readable rather than only on hover.
+ expect(panel.querySelector('[data-coverage-evidence-identifier]')).toHaveTextContent(
+ 'Identifier: pbs-1',
+ );
+ expect(panel.querySelector('[data-coverage-evidence-metadata]')).toHaveTextContent(
+ 'Metadata: vm/100/2026-07-18T23:00:00Z',
+ );
// The source label wraps in the drawer too; a long snapshot name is not cut.
expect(within(panel).getByText('PBS', { selector: 'td span' })).toHaveClass(
'whitespace-normal',
diff --git a/frontend-modern/src/features/proxmox/__tests__/coverageRestorePointIdentity.test.tsx b/frontend-modern/src/features/proxmox/__tests__/coverageRestorePointIdentity.test.tsx
new file mode 100644
index 0000000000..cf6bae08ee
--- /dev/null
+++ b/frontend-modern/src/features/proxmox/__tests__/coverageRestorePointIdentity.test.tsx
@@ -0,0 +1,173 @@
+import { cleanup, fireEvent, render, screen, waitFor, within } from '@solidjs/testing-library';
+import { Route, Router } from '@solidjs/router';
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+
+import { resetCreateNonSuspendingQueryCacheForTest } from '@/hooks/createNonSuspendingQuery';
+import { protectionPolicy } from '@/utils/__fixtures__/protectionPosture';
+import { ProxmoxBackupsTable } from '../ProxmoxBackupsTable';
+import {
+ BACKUP_IDENTITY_NOW,
+ identityArchive,
+ identityGuest,
+ identityPBS,
+ identitySnapshot,
+} from '../__fixtures__/backupIdentity';
+
+const api = vi.hoisted(() => ({ fetch: vi.fn(), json: vi.fn(), width: 320 }));
+vi.mock('@/utils/apiClient', () => ({ apiFetch: api.fetch, apiFetchJSON: api.json }));
+vi.mock('@/hooks/useObservedElementWidth', () => ({
+ useObservedElementWidth: () => ({ setElement: () => {}, width: () => api.width }),
+}));
+
+const guests = [
+ identityGuest('east-100', 'east', 'pve-1'),
+ identityGuest('west-100', 'west', 'pve-1'),
+];
+const literal = '<img src=x onerror=alert(1)>';
+const volume = `local:backup/very-long-production-archive-${'preserved-'.repeat(8)}.vma.zst`;
+let updated: boolean;
+function inventories() {
+ return {
+ backups: [
+ identityPBS({ id: 'same-time-pbs-a', namespace: 'east' }),
+ identityPBS({
+ id: 'same-time-pbs-b',
+ namespace: 'east',
+ files: updated ? ['index.json.blob', 'disk.fidx'] : ['index.json.blob'],
+ inProgress: true,
+ writeActivityObserved: true,
+ writeActive: false,
+ }),
+ ],
+ storageBackups: [
+ identityArchive({ id: 'same-time-archive-a', volid: updated ? `${volume}-updated` : volume }),
+ identityArchive({ id: `same-time-archive-b ${literal}`, volid: `local:backup/${literal}` }),
+ ],
+ guestSnapshots: [
+ identitySnapshot({ id: 'same-time-snapshot-a', name: 'before-update' }),
+ identitySnapshot({
+ id: 'same-time-snapshot-b',
+ name: 'after-update',
+ description: updated ? `updated ${literal}` : 'second snapshot',
+ }),
+ ],
+ backupTasks: [],
+ };
+}
+function mount() {
+ api.fetch.mockImplementation((url: string) => {
+ const inventory = inventories();
+ return Promise.resolve(
+ new Response(
+ JSON.stringify({
+ data: url === '/api/backups/pbs' ? { backups: inventory.backups } : inventory,
+ }),
+ { headers: { 'Content-Type': 'application/json' } },
+ ),
+ );
+ });
+ // Point identities must not invent an assessment or change workload protection.
+ api.json.mockResolvedValue({ data: [], policy: protectionPolicy });
+ render(() => (
+ <Router>
+ <Route
+ path="/*"
+ component={() => <ProxmoxBackupsTable emptyIcon={<span />} workloads={guests} />}
+ />
+ </Router>
+ ));
+}
+async function open() {
+ const toggle = await screen.findByRole('button', { name: /Expand details for east-100/ });
+ await fireEvent.click(toggle);
+ return screen.findByTestId('proxmox-coverage-detail');
+}
+function evidenceRows(panel: HTMLElement) {
+ return Array.from(panel.querySelectorAll<HTMLElement>('[data-coverage-evidence-detail]')).map(
+ (details) => details.closest('tr')!,
+ );
+}
+
+beforeEach(() => {
+ vi.resetAllMocks();
+ vi.useFakeTimers({ now: BACKUP_IDENTITY_NOW, toFake: ['Date', 'setInterval', 'clearInterval'] });
+ resetCreateNonSuspendingQueryCacheForTest();
+ api.width = 320;
+ updated = false;
+ window.history.replaceState({}, '', '/proxmox/backups/coverage');
+});
+afterEach(() => {
+ cleanup();
+ resetCreateNonSuspendingQueryCacheForTest();
+ vi.useRealTimers();
+});
+
+describe('Coverage restore-point identity through parsed inventory', () => {
+ it.each([320, 479, 480, 719, 720, 960, 1200])(
+ 'distinguishes same-time points with full identifiers and metadata at %ipx',
+ async (width) => {
+ api.width = width;
+ mount();
+ const panel = await open();
+ const rows = evidenceRows(panel);
+ expect(rows).toHaveLength(6);
+ const expected = [
+ ['same-time-pbs-a', '1 PBS file'],
+ ['same-time-pbs-b', '1 PBS file'],
+ ['same-time-archive-a', volume],
+ [`same-time-archive-b ${literal}`, `local:backup/${literal}`],
+ ['same-time-snapshot-a', 'before-update'],
+ ['same-time-snapshot-b', 'second snapshot'],
+ ];
+ for (const [id, metadata] of expected) {
+ const row = rows.find((candidate) =>
+ candidate.querySelector('[data-coverage-evidence-identifier]')?.textContent?.includes(id),
+ )!;
+ expect(row).toBeDefined();
+ expect(row.querySelector('[data-coverage-evidence-identifier]')).toHaveTextContent(
+ `Identifier: ${id}`,
+ );
+ expect(row.querySelector('[data-coverage-evidence-metadata]')).toHaveTextContent(
+ `Metadata: ${metadata}`,
+ );
+ expect(row.querySelector('[data-coverage-evidence-detail]')).toHaveClass(
+ 'whitespace-normal',
+ 'wrap-anywhere',
+ );
+ expect(row.querySelector('[data-coverage-evidence-detail]')).not.toHaveClass('truncate');
+ }
+ expect(panel.querySelector('img')).toBeNull();
+ expect(within(panel).getByText('Failed', { exact: true })).toBeInTheDocument();
+ expect(screen.getByRole('button', { name: '2 unknown' })).toBeInTheDocument();
+ expect(screen.getByText(/5 completed restore points/)).toBeInTheDocument();
+ expect(api.fetch).toHaveBeenCalledTimes(2);
+ await fireEvent.click(screen.getByRole('button', { name: /Expand details for west-100/ }));
+ expect(screen.getByTestId('proxmox-coverage-detail')).not.toHaveTextContent(volume);
+ expect(screen.getByTestId('proxmox-coverage-detail')).not.toHaveTextContent(
+ 'same-time-pbs-a',
+ );
+ },
+ );
+
+ it.each([320, 1200])('refreshes the same open evidence and focus at %ipx', async (width) => {
+ api.width = width;
+ mount();
+ const panel = await open();
+ const toggle = screen.getByRole('button', { name: /Collapse details for east-100/ });
+ toggle.focus();
+ const before = evidenceRows(panel);
+ expect(before).toHaveLength(6);
+ updated = true;
+ await vi.advanceTimersByTimeAsync(30_000);
+ await waitFor(() => expect(panel).toHaveTextContent(`${volume}-updated`));
+ expect(panel).not.toHaveTextContent('second snapshot');
+ expect(panel).toHaveTextContent(`updated ${literal}`);
+ expect(panel).toHaveTextContent('2 PBS files');
+ expect(panel.querySelector('img')).toBeNull();
+ expect(screen.getByTestId('proxmox-coverage-detail')).toBe(panel);
+ expect(evidenceRows(panel)).toEqual(before);
+ expect(document.activeElement).toBe(toggle);
+ expect(api.fetch).toHaveBeenCalledTimes(4);
+ expect(screen.getByText(/5 completed restore points/)).toBeInTheDocument();
+ });
+});