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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
fix(ui): make Proxmox backup tables container-aware
rcourtman95745e77ca16
diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.jsonindex bcdeb95b67..3021a4e187 100644--- a/frontend-modern/browser-verification.json+++ b/frontend-modern/browser-verification.json@@ -1,36 +1,79 @@{"version": 1,- "base_sha": "e86ca7da057a613a59d5cea24b8230d9a3c914df",- "verified_at": "2026-08-04T10:06:40Z",+ "base_sha": "3699dca8267b4a7522b8b193ee9749c0cf20dfd8",+ "verified_at": "2026-08-04T10:26:06Z","result": "passed","changed_paths": [- "frontend-modern/src/components/Workloads/useGuestRowState.ts",- "frontend-modern/src/components/Workloads/workloadSelectors.ts",- "frontend-modern/src/utils/availabilityProbePresentation.ts",- "frontend-modern/src/utils/status.ts"+ "frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx",+ "frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx",+ "frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx",+ "frontend-modern/src/features/proxmox/proxmoxBackupsTablePresentation.ts"],"content_sha256": {- "frontend-modern/src/components/Workloads/useGuestRowState.ts": "44d3b0d6ba5fa8a940dac638040aa193b8d471dd9e2d4714a6591aa9ad2ddbc7",- "frontend-modern/src/components/Workloads/workloadSelectors.ts": "a31b6f298a8fe56c9be698ba6361cf9f8151fda4ddc5171155bc5ca53aaf1bc6",- "frontend-modern/src/utils/availabilityProbePresentation.ts": "e51d19778743b991c81fea2d1e595b17c73e1cee35b40396e0583ce96b91371a",- "frontend-modern/src/utils/status.ts": "45b965582f025894b47bfa9d9fae43f6ef2308f71f481474138b84c548f97f50"+ "frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx": "f181a1003f6f40dc33413c32a31223cc562997284e0314a0224f28b126f70eac",+ "frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx": "8531a197f43d429501c2daadb80229624611f637db5f3b489d944c708b52cb77",+ "frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx": "a619652c69da5e0d6a8ca21cde9c3e0e18449a241a53b6ebcd87b9f1ea83d474",+ "frontend-modern/src/features/proxmox/proxmoxBackupsTablePresentation.ts": "e7c323af3e58d6dc027e6f5dfc56be95efbd37d8e2eb7f3dad6c91645f7b90dc"},- "routes": ["/proxmox/overview"],+ "routes": [+ "/proxmox/backups?view=coverage",+ "/proxmox/backups?view=date"+ ],"viewports": [- { "width": 1440, "height": 900 },- { "width": 390, "height": 844 }+ {+ "width": 375,+ "height": 900+ },+ {+ "width": 480,+ "height": 900+ },+ {+ "width": 640,+ "height": 900+ },+ {+ "width": 800,+ "height": 900+ },+ {+ "width": 1024,+ "height": 900+ },+ {+ "width": 1280,+ "height": 900+ },+ {+ "width": 1536,+ "height": 900+ },+ {+ "width": 1920,+ "height": 900+ },+ {+ "width": 2560,+ "height": 900+ }],"states": [- "Proxmox Overview against the live backend with 34 guest rows, 24 running and 10 stopped, and 36 attached availability checks none of which are currently failing",- "Every guest row status dot resolved through the new health indicator, reporting only Running or Stopped with no probe-degraded rows",- "Narrow 390px layout with the same 34 rows and the same dot resolution"+ "Coverage and By date views across compact, basic, operational, expanded, and full container-aware table layouts",+ "Compact 375px view showing operator-priority columns with workload identity details folded into the primary cell and no horizontal page or table overflow",+ "Intermediate 480px, 640px, 800px, and 1024px layouts progressively adding node, source, resource, capacity, and task context only when the measured table container can support it",+ "Wide 1280px, 1536px, 1920px, and 2560px layouts restoring the full operational detail set with readable, unclipped headings",+ "Assistant open at 1280px, 1536px, and 1920px viewport widths, verifying layouts respond to the reduced content container rather than the browser viewport",+ "Expanded coverage evidence for a protected workload and the independently measured orphaned-backup nested table at reduced container widths",+ "Server summary, protection coverage, dated recoverable backups, expanded evidence, and provider detail grids all with scrollWidth equal to clientWidth and zero document overflow"],"interactions": [- "Reloaded /proxmox after the change and read every guest row status dot by aria-label, counting 24 Running and 10 Stopped against a live payload of exactly 24 running and 10 stopped guests",- "Confirmed zero rows resolved to the new not-responding state, so consolidating the dot onto the health indicator introduces no false positives on a fleet whose probes all pass",- "Resized to 390x844 and confirmed the same 34 dots and labels with no horizontal document overflow",- "Read console messages filtered to errors at both viewports and found none",- "The degraded path is proven by unit test rather than in the browser because no attached check is currently failing on this instance; the new getGuestHealthIndicator cases were confirmed red with the degradation branch disabled and green with it restored",- "Verification ran in the shared checkout against this exact staged file content; the commit was assembled in an isolated worktree because another agent held the shared index and had receipt edits in flight"+ "Switched repeatedly between Coverage and By date views while resizing through the full viewport matrix",+ "Searched for bazarr and confirmed the filtered 1 of 35 workload result",+ "Sorted the coverage table by Workload and exercised the Unknown posture filter before restoring All",+ "Expanded and collapsed the bazarr coverage row to inspect backup evidence, provider detail grids, wrapped explanations, and compact task accessibility text",+ "Expanded the orphaned-backups group and verified its nested table chooses a layout from its own narrower container",+ "Filtered the dated feed to PVE file source and confirmed two of 862 backups, then restored all sources",+ "Selected Tue 4 Aug in the date navigator and confirmed 42 of 862 backups in the dated group, then cleared the date filter",+ "Opened and closed the Assistant while checking responsive column selection, header clipping, shell overflow, and document overflow"]}diff --git a/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsxindex c7da9ac490..c882acf93f 100644--- a/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx+++ b/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx@@ -1,4 +1,4 @@-import { For, Show, type JSX } from 'solid-js';+import { For, Show, createMemo, type Accessor, type JSX } from 'solid-js';import { StatusDot } from '@/components/shared/StatusDot';import { TableCell, TableHead, TableRow } from '@/components/shared/Table';@@ -16,6 +16,14 @@ import {import type { PBSBackup } from '@/types/api';import type { Resource, ResourcePBSDatastore } from '@/types/resource';import type { StatusIndicatorVariant } from '@/utils/status';+import { useObservedElementWidth } from '@/hooks/useObservedElementWidth';++import {+ getBackupServerColumns,+ getBackupServerColumnWidthStyle,+ getBackupServerLayoutForContainer,+ type BackupServerColumnId,+} from './proxmoxBackupsTablePresentation';// "Backup servers" answers the two questions the coverage table can't: is my// PBS reachable, and is its datastore about to fill? Datastore fill is the@@ -143,169 +151,233 @@ export function ProxmoxBackupServersTable(props: {servers: readonly Resource[];backups?: readonly PBSBackup[];emptyIcon?: JSX.Element;+ layoutWidth?: Accessor<number | null | undefined>;}) {const rows = () => buildBackupServerRows(props.servers, props.backups ?? []);+ const observedWidth = useObservedElementWidth();+ const layoutMode = createMemo(() => {+ const width = props.layoutWidth?.() ?? observedWidth.width();+ return typeof width === 'number' && width > 0+ ? getBackupServerLayoutForContainer(width)+ : 'full';+ });+ const visibleColumns = createMemo(() => getBackupServerColumns(layoutMode()));+ const columnVisible = (column: BackupServerColumnId) =>+ visibleColumns().some((candidate) => candidate.id === column);return (<Show when={rows().length > 0}>- <PlatformTableShell- tableClass="min-w-[1020px] table-fixed text-xs"- colgroup={- <colgroup>- <col style={{ width: '16%' }} />- <col style={{ width: '10%' }} />- <col style={{ width: '8%' }} />- <col style={{ width: '6%' }} />- <col style={{ width: '11%' }} />- <col style={{ width: '7%' }} />- <col style={{ width: '13%' }} />- <col style={{ width: '15%' }} />- <col style={{ width: '7%' }} />- <col style={{ width: '7%' }} />- </colgroup>- }- header={- <>- <TableHead class={getPlatformTableHeadClassForKind('name')}>Backup server</TableHead>- <TableHead class={getPlatformTableHeadClassForKind('text')}>Status</TableHead>- <TableHead class={getPlatformTableHeadClassForKind('text')}>Version</TableHead>- <TableHead class={getPlatformTableHeadClassForKind('numeric-value')}>CPU</TableHead>- <TableHead class={getPlatformTableHeadClassForKind('numeric-value')}>Memory</TableHead>- <TableHead class={getPlatformTableHeadClassForKind('numeric-value')}>Uptime</TableHead>- <TableHead class={getPlatformTableHeadClassForKind('text')}>Datastore</TableHead>- <TableHead class={getPlatformTableHeadClassForKind('numeric-value')}>Used</TableHead>- <TableHead class={getPlatformTableHeadClassForKind('numeric-value')}>Backups</TableHead>- <TableHead class={getPlatformTableHeadClassForKind('numeric-value')}>Dedup</TableHead>- </>- }- body={- <>- <For each={rows()}>- {(row) => {- const pct = () => (row.datastore ? usagePercent(row.datastore) : undefined);- return (- <TableRow class="hover:bg-surface-hover">- <TableCell- class={`${getPlatformTableCellClassForKind('name')} text-base-content truncate font-medium`}- >- {row.serverName}- </TableCell>- <TableCell class={getPlatformTableCellClassForKind('text')}>- <div class="flex items-center gap-2">- <StatusDot- size="sm"- variant={row.online ? 'success' : 'danger'}- title={row.connectionLabel}- ariaHidden- />- <span class="truncate text-[11px] text-base-content">- {row.connectionLabel}- </span>- </div>- </TableCell>- <TableCell- class={`${getPlatformTableCellClassForKind('text')} text-muted truncate text-[11px]`}- >- {row.version || '—'}- </TableCell>- <TableCell- class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content`}- >- <Show- when={row.online && row.cpuPercent !== undefined}- fallback={<span class="text-muted">—</span>}- >- <PlatformTablePercentValue value={row.cpuPercent} />- </Show>- </TableCell>- <TableCell class={getPlatformTableCellClassForKind('numeric-value')}>- <Show- when={row.online && row.memoryPercent !== undefined}- fallback={<span class="text-muted">—</span>}+ <div+ ref={observedWidth.setElement}+ data-proxmox-backups-table="servers"+ data-proxmox-backups-layout={layoutMode()}+ >+ <PlatformTableShell+ tableClass="min-w-[0px] table-fixed text-xs"+ colgroup={+ <colgroup>+ <For each={visibleColumns()}>+ {(column) => (+ <col+ style={getBackupServerColumnWidthStyle(column.id, layoutMode())}+ data-proxmox-backups-column={column.id}+ />+ )}+ </For>+ </colgroup>+ }+ header={+ <>+ <TableHead class={getPlatformTableHeadClassForKind('name')}>Backup server</TableHead>+ <TableHead class={getPlatformTableHeadClassForKind('text')}>Status</TableHead>+ <Show when={columnVisible('version')}>+ <TableHead class={getPlatformTableHeadClassForKind('text')}>Version</TableHead>+ </Show>+ <Show when={columnVisible('cpu')}>+ <TableHead class={getPlatformTableHeadClassForKind('numeric-value')}>CPU</TableHead>+ </Show>+ <Show when={columnVisible('memory')}>+ <TableHead class={getPlatformTableHeadClassForKind('numeric-value')}>+ Memory+ </TableHead>+ </Show>+ <Show when={columnVisible('uptime')}>+ <TableHead class={getPlatformTableHeadClassForKind('numeric-value')}>+ Uptime+ </TableHead>+ </Show>+ <Show when={columnVisible('datastore')}>+ <TableHead class={getPlatformTableHeadClassForKind('text')}>Datastore</TableHead>+ </Show>+ <TableHead class={getPlatformTableHeadClassForKind('numeric-value')}>Used</TableHead>+ <Show when={columnVisible('backups')}>+ <TableHead+ class={getPlatformTableHeadClassForKind('numeric-value')}+ aria-label="Backups"+ title="Backups"+ >+ {layoutMode() === 'full' ? 'Backups' : 'Count'}+ </TableHead>+ </Show>+ <Show when={columnVisible('dedup')}>+ <TableHead class={getPlatformTableHeadClassForKind('numeric-value')}>+ Dedup+ </TableHead>+ </Show>+ </>+ }+ body={+ <>+ <For each={rows()}>+ {(row) => {+ const pct = () => (row.datastore ? usagePercent(row.datastore) : undefined);+ return (+ <TableRow class="hover:bg-surface-hover">+ <TableCell+ class={`${getPlatformTableCellClassForKind('name')} text-base-content truncate font-medium`}>- <span- class="text-base-content"- title={- row.memoryTotal- ? `${formatPlatformTableBytesValue(row.memoryUsed, '0 B')} / ${formatPlatformTableBytesValue(row.memoryTotal)}`- : undefined- }- >- <PlatformTablePercentValue value={row.memoryPercent} />- </span>- <Show when={row.memoryTotal}>- <span class="ml-1 text-[10px] text-muted tabular-nums">- {`(${formatPlatformTableBytesValue(row.memoryUsed, '0 B')}/${formatPlatformTableBytesValue(row.memoryTotal)})`}- </span>+ <div class="min-w-0 truncate">{row.serverName}</div>+ <Show when={layoutMode() === 'compact' && row.datastore}>+ {(datastore) => (+ <div class="min-w-0 truncate font-mono text-[10px] font-normal text-muted">+ {datastore().name}+ </div>+ )}</Show>+ </TableCell>+ <TableCell class={getPlatformTableCellClassForKind('text')}>+ <div class="flex items-center gap-2">+ <StatusDot+ size="sm"+ variant={row.online ? 'success' : 'danger'}+ title={row.connectionLabel}+ ariaHidden+ />+ <span class="truncate text-[11px] text-base-content">+ {row.connectionLabel}+ </span>+ </div>+ </TableCell>+ <Show when={columnVisible('version')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('text')} text-muted truncate text-[11px]`}+ >+ {row.version || '—'}+ </TableCell></Show>- </TableCell>- <TableCell- class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content tabular-nums`}- >- <Show- when={row.online && (row.uptimeSeconds ?? 0) > 0}- fallback={<span class="text-muted">—</span>}- >- {formatPlatformTableUptimeValue(row.uptimeSeconds)}+ <Show when={columnVisible('cpu')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content`}+ >+ <Show+ when={row.online && row.cpuPercent !== undefined}+ fallback={<span class="text-muted">—</span>}+ >+ <PlatformTablePercentValue value={row.cpuPercent} />+ </Show>+ </TableCell></Show>- </TableCell>- <TableCell- class={`${getPlatformTableCellClassForKind('text')} text-base-content truncate font-mono text-[11px]`}- >- {row.datastore?.name ?? '—'}- </TableCell>- <TableCell class={getPlatformTableCellClassForKind('numeric-value')}>- <Show- when={row.datastore}- fallback={<span class="text-muted">No datastore data</span>}- >- {(datastore) => (- <div class="flex items-center justify-end gap-2">- <StatusDot- size="sm"- variant={usageVariant(pct())}- title={`Datastore ${formatPlatformTablePercentValue(pct())} used`}- ariaHidden- />- <span class={`tabular-nums font-medium ${usageToneClass(pct())}`}>- <PlatformTablePercentValue value={pct()} />+ <Show when={columnVisible('memory')}>+ <TableCell class={getPlatformTableCellClassForKind('numeric-value')}>+ <Show+ when={row.online && row.memoryPercent !== undefined}+ fallback={<span class="text-muted">—</span>}+ >+ <span+ class="text-base-content"+ title={+ row.memoryTotal+ ? `${formatPlatformTableBytesValue(row.memoryUsed, '0 B')} / ${formatPlatformTableBytesValue(row.memoryTotal)}`+ : undefined+ }+ >+ <PlatformTablePercentValue value={row.memoryPercent} /></span>- <span class="text-[10px] text-muted tabular-nums">- {formatPlatformTableBytesValue(datastore().used, '0 B')} /{' '}- {formatPlatformTableBytesValue(datastore().total)}- </span>- </div>- )}+ <Show when={row.memoryTotal && layoutMode() === 'full'}>+ <span class="ml-1 text-[10px] text-muted tabular-nums">+ {`(${formatPlatformTableBytesValue(row.memoryUsed, '0 B')}/${formatPlatformTableBytesValue(row.memoryTotal)})`}+ </span>+ </Show>+ </Show>+ </TableCell></Show>- </TableCell>- <TableCell- class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content`}- >- <Show when={row.datastore} fallback={<span class="text-muted">—</span>}>- <PlatformTableNumberValue- value={row.backupCount}- format={formatPlatformTableIntegerValue}- />+ <Show when={columnVisible('uptime')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content tabular-nums`}+ >+ <Show+ when={row.online && (row.uptimeSeconds ?? 0) > 0}+ fallback={<span class="text-muted">—</span>}+ >+ {formatPlatformTableUptimeValue(row.uptimeSeconds)}+ </Show>+ </TableCell></Show>- </TableCell>- <TableCell- class={`${getPlatformTableCellClassForKind('numeric-value')} text-muted tabular-nums text-[11px]`}- >- <Show- when={row.datastore?.deduplicationFactor}- fallback={<span class="text-muted">—</span>}- >- {(factor) => <>{factor().toFixed(1)}×</>}+ <Show when={columnVisible('datastore')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('text')} text-base-content truncate font-mono text-[11px]`}+ >+ {row.datastore?.name ?? '—'}+ </TableCell>+ </Show>+ <TableCell class={getPlatformTableCellClassForKind('numeric-value')}>+ <Show+ when={row.datastore}+ fallback={<span class="text-muted">No datastore data</span>}+ >+ {(datastore) => (+ <div class="flex items-center justify-end gap-2">+ <StatusDot+ size="sm"+ variant={usageVariant(pct())}+ title={`Datastore ${formatPlatformTablePercentValue(pct())} used`}+ ariaHidden+ />+ <span class={`tabular-nums font-medium ${usageToneClass(pct())}`}>+ <PlatformTablePercentValue value={pct()} />+ </span>+ <Show when={layoutMode() !== 'compact'}>+ <span class="truncate text-[10px] text-muted tabular-nums">+ {formatPlatformTableBytesValue(datastore().used, '0 B')} /{' '}+ {formatPlatformTableBytesValue(datastore().total)}+ </span>+ </Show>+ </div>+ )}+ </Show>+ </TableCell>+ <Show when={columnVisible('backups')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content`}+ >+ <Show when={row.datastore} fallback={<span class="text-muted">—</span>}>+ <PlatformTableNumberValue+ value={row.backupCount}+ format={formatPlatformTableIntegerValue}+ />+ </Show>+ </TableCell>+ </Show>+ <Show when={columnVisible('dedup')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('numeric-value')} text-muted tabular-nums text-[11px]`}+ >+ <Show+ when={row.datastore?.deduplicationFactor}+ fallback={<span class="text-muted">—</span>}+ >+ {(factor) => <>{factor().toFixed(1)}×</>}+ </Show>+ </TableCell></Show>- </TableCell>- </TableRow>- );- }}- </For>- </>- }- />+ </TableRow>+ );+ }}+ </For>+ </>+ }+ />+ </div></Show>);}diff --git a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsxindex 61e4da6bfe..a53e4e7751 100644--- a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx+++ b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx@@ -1,4 +1,4 @@-import { For, Show, type Accessor, type JSX } from 'solid-js';+import { For, Show, createMemo, type Accessor, type JSX } from 'solid-js';import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';import { StatusDot } from '@/components/shared/StatusDot';@@ -12,6 +12,7 @@ import {} from '@/features/platformPage/sharedPlatformPage';import { PlatformResourceDetailToggleButton } from '@/features/platformPage/PlatformResourceDetailTableRow';import type { StatusIndicatorVariant } from '@/utils/status';+import { useObservedElementWidth } from '@/hooks/useObservedElementWidth';import {getWorkloadRecoveryPostureLabel,@@ -28,6 +29,14 @@ import {SortableHead,artifactStateLabel,} from './proxmoxBackupsTableShared';+import {+ getCoverageColumns,+ getCoverageColumnWidthStyle,+ getCoverageLayoutForContainer,+ isCompactBackupIdentityLayout,+ isCoverageEvidenceColumnVisible,+ type CoverageColumnId,+} from './proxmoxBackupsTablePresentation';const coveragePostureVariant = (posture: WorkloadCoverageRow['posture'],@@ -92,22 +101,23 @@ export function ProxmoxCoverageTable(props: {showArchiveColumn: boolean;showSnapshotColumn: boolean;showTaskColumn: boolean;+ layoutWidth?: Accessor<number | null | undefined>;}) {- // Weighted column set; the conditional source/task columns drop out when- // empty fleet-wide, and table-fixed re-normalizes the rest.- const visibleColumns = () => [- { id: 'workload', weight: 18 },- { id: 'type', weight: 6 },- { id: 'targetId', weight: 7 },- { id: 'node', weight: 9 },- { id: 'posture', weight: 11 },- { id: 'latest', weight: 10 },- ...(props.showPbsColumn ? [{ id: 'pbs', weight: 11 }] : []),- ...(props.showArchiveColumn ? [{ id: 'archive', weight: 10 }] : []),- ...(props.showSnapshotColumn ? [{ id: 'snapshot', weight: 11 }] : []),- ...(props.showTaskColumn ? [{ id: 'task', weight: 8 }] : []),- ];- const totalColumnWeight = () => visibleColumns().reduce((sum, c) => sum + c.weight, 0);+ const observedWidth = useObservedElementWidth();+ const layoutMode = createMemo(() => {+ const width = props.layoutWidth?.() ?? observedWidth.width();+ return typeof width === 'number' && width > 0 ? getCoverageLayoutForContainer(width) : 'full';+ });+ const visibleColumns = createMemo(() =>+ getCoverageColumns(layoutMode(), {+ pbs: props.showPbsColumn,+ archive: props.showArchiveColumn,+ snapshot: props.showSnapshotColumn,+ task: props.showTaskColumn,+ }),+ );+ const visibleColumnIds = createMemo(() => visibleColumns().map((column) => column.id));+ const columnVisible = (column: CoverageColumnId) => visibleColumnIds().includes(column);const columnCount = () => visibleColumns().length;const pbsSource = getProxmoxBackupSourcePresentation('pbs');const archiveSource = getProxmoxBackupSourcePresentation('archive');@@ -130,388 +140,482 @@ export function ProxmoxCoverageTable(props: {/>}>- <PlatformTableShell- tableClass="min-w-[1080px] table-fixed text-xs"- colgroup={- <colgroup>- <For each={visibleColumns()}>- {(column) => (- <col style={{ width: `${(column.weight / totalColumnWeight()) * 100}%` }} />- )}- </For>- </colgroup>- }- header={- <>- <SortableHead- label="Workload"- sortKey="workload"- currentSort={props.sortKey}- direction={props.sortDirection}- onSort={props.onSort}- align="left"- headClass={getPlatformTableHeadClassForKind('name')}- />- <TableHead class={getPlatformTableHeadClassForKind('text')}>Type</TableHead>- <TableHead class={getPlatformTableHeadClassForKind('text')}>- {PROXMOX_BACKUP_COLUMN_LABELS.targetId}- </TableHead>- <TableHead class={getPlatformTableHeadClassForKind('text')}>Node</TableHead>- <SortableHead- label="Posture"- sortKey="posture"- currentSort={props.sortKey}- direction={props.sortDirection}- onSort={props.onSort}- align="left"- headClass={getPlatformTableHeadClassForKind('text')}- />- <SortableHead- label="Restore"- sortKey="latest"- currentSort={props.sortKey}- direction={props.sortDirection}- onSort={props.onSort}- align="right"- headClass={getPlatformTableHeadClassForKind('numeric-value')}- />- <Show when={props.showPbsColumn}>- <SortableHead- label="PBS snapshot"- sortKey="pbs"- currentSort={props.sortKey}- direction={props.sortDirection}- onSort={props.onSort}- align="left"- headClass={getPlatformTableHeadClassForKind('text')}- />- </Show>- <Show when={props.showArchiveColumn}>+ <div+ ref={observedWidth.setElement}+ data-proxmox-backups-table="coverage"+ data-proxmox-backups-layout={layoutMode()}+ >+ <PlatformTableShell+ tableClass="min-w-[0px] table-fixed text-xs"+ colgroup={+ <colgroup>+ <For each={visibleColumns()}>+ {(column) => (+ <col+ style={getCoverageColumnWidthStyle(column.id, layoutMode(), visibleColumnIds())}+ data-proxmox-backups-column={column.id}+ />+ )}+ </For>+ </colgroup>+ }+ header={+ <><SortableHead- label="PVE file"- sortKey="archive"+ label="Workload"+ sortKey="workload"currentSort={props.sortKey}direction={props.sortDirection}onSort={props.onSort}align="left"- headClass={getPlatformTableHeadClassForKind('text')}+ headClass={getPlatformTableHeadClassForKind('name')}/>- </Show>- <Show when={props.showSnapshotColumn}>+ <Show when={columnVisible('type')}>+ <TableHead class={getPlatformTableHeadClassForKind('text')}>Type</TableHead>+ </Show>+ <Show when={columnVisible('targetId')}>+ <TableHead class={getPlatformTableHeadClassForKind('text')}>+ {PROXMOX_BACKUP_COLUMN_LABELS.targetId}+ </TableHead>+ </Show>+ <Show when={columnVisible('node')}>+ <TableHead class={getPlatformTableHeadClassForKind('text')}>Node</TableHead>+ </Show><SortableHead- label="Guest snapshot"- sortKey="snapshot"+ label="Posture"+ sortKey="posture"currentSort={props.sortKey}direction={props.sortDirection}onSort={props.onSort}align="left"headClass={getPlatformTableHeadClassForKind('text')}/>- </Show>- <Show when={props.showTaskColumn}><SortableHead- label="Task"- sortKey="task"+ label={layoutMode() === 'compact' ? 'Age' : 'Restore'}+ sortKey="latest"currentSort={props.sortKey}direction={props.sortDirection}onSort={props.onSort}- align="left"- headClass={getPlatformTableHeadClassForKind('text')}+ align="right"+ headClass={getPlatformTableHeadClassForKind('numeric-value')}/>- </Show>- </>- }- body={- <>- <For each={props.rows}>- {(row) => {- const isExpanded = () => props.expandedKeys.has(row.key);- const evidence = () =>- [...row.artifacts]- .sort((left, right) => (right.createdMs ?? 0) - (left.createdMs ?? 0))- .slice(0, 8);- const detailRowId = () => `proxmox-coverage-evidence-${row.key}`;- return (- <>- <TableRow class="hover:bg-surface-hover">- <TableCell- class={`${getPlatformTableCellClassForKind('name')} text-base-content`}- >- <div class="flex min-w-0 items-center gap-2">- <PlatformResourceDetailToggleButton- expanded={isExpanded()}- resourceLabel={row.workload.label}- controlsId={detailRowId()}- onToggle={() => props.onToggleExpand(row.key)}- />- <span class="min-w-0 truncate font-semibold">- {row.workload.name || row.workload.label}- </span>- </div>- </TableCell>- <TableCell- class={`${getPlatformTableCellClassForKind('text')} text-base-content`}- >- <ProxmoxBackupWorkloadTypeBadge- type={row.workload.type}- label={row.workload.typeLabel}- />- </TableCell>- <TableCell- class={`${getPlatformTableCellClassForKind('text')} text-muted font-mono text-[11px] tabular-nums`}- >- {row.workload.vmid || '—'}- </TableCell>- <TableCell- class={`${getPlatformTableCellClassForKind('text')} text-base-content`}- >- <Show when={row.workload.node} fallback={<span class="text-muted">—</span>}>- {(node) => (- <span class="inline-block max-w-full truncate" title={node()}>- {node()}- </span>- )}+ <Show when={columnVisible('pbs')}>+ <SortableHead+ label={layoutMode() === 'expanded' ? 'PBS' : 'PBS snapshot'}+ sortKey="pbs"+ currentSort={props.sortKey}+ direction={props.sortDirection}+ onSort={props.onSort}+ align="left"+ headClass={getPlatformTableHeadClassForKind('text')}+ />+ </Show>+ <Show when={columnVisible('archive')}>+ <SortableHead+ label="PVE file"+ sortKey="archive"+ currentSort={props.sortKey}+ direction={props.sortDirection}+ onSort={props.onSort}+ align="left"+ headClass={getPlatformTableHeadClassForKind('text')}+ />+ </Show>+ <Show when={columnVisible('snapshot')}>+ <SortableHead+ label={layoutMode() === 'expanded' ? 'Snapshot' : 'Guest snapshot'}+ sortKey="snapshot"+ currentSort={props.sortKey}+ direction={props.sortDirection}+ onSort={props.onSort}+ align="left"+ headClass={getPlatformTableHeadClassForKind('text')}+ />+ </Show>+ <Show when={columnVisible('task')}>+ <SortableHead+ label={layoutMode() === 'compact' ? 'Job' : 'Task'}+ sortKey="task"+ currentSort={props.sortKey}+ direction={props.sortDirection}+ onSort={props.onSort}+ align="left"+ headClass={getPlatformTableHeadClassForKind('text')}+ />+ </Show>+ </>+ }+ body={+ <>+ <For each={props.rows}>+ {(row) => {+ const isExpanded = () => props.expandedKeys.has(row.key);+ const evidence = () =>+ [...row.artifacts]+ .sort((left, right) => (right.createdMs ?? 0) - (left.createdMs ?? 0))+ .slice(0, 8);+ const detailRowId = () => `proxmox-coverage-evidence-${row.key}`;+ return (+ <>+ <TableRow class="hover:bg-surface-hover">+ <TableCell+ class={`${getPlatformTableCellClassForKind('name')} text-base-content`}+ >+ <div class="flex min-w-0 items-center gap-2">+ <PlatformResourceDetailToggleButton+ expanded={isExpanded()}+ resourceLabel={row.workload.label}+ controlsId={detailRowId()}+ onToggle={() => props.onToggleExpand(row.key)}+ />+ <div class="min-w-0">+ <div class="truncate font-semibold">+ {row.workload.name || row.workload.label}+ </div>+ <Show when={isCompactBackupIdentityLayout(layoutMode())}>+ <div class="truncate text-[10px] font-normal text-muted">+ {row.workload.typeLabel}+ <Show when={row.workload.vmid}> {row.workload.vmid}</Show>+ <Show when={layoutMode() === 'compact' && row.workload.node}>+ {(node) => <> · {node()}</>}+ </Show>+ </div>+ </Show>+ </div>+ </div>+ </TableCell>+ <Show when={columnVisible('type')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('text')} text-base-content`}+ >+ <ProxmoxBackupWorkloadTypeBadge+ type={row.workload.type}+ label={row.workload.typeLabel}+ />+ </TableCell></Show>- </TableCell>- <TableCell class={getPlatformTableCellClassForKind('text')}>- <div class="flex items-center gap-2">- <StatusDot- size="sm"- variant={coveragePostureVariant(row.posture)}- title={- row.protectionPosture?.explanation ??- 'Pulse does not have enough provider evidence to determine protection.'- }- ariaHidden- />- <span- title={row.protectionPosture?.explanation}- class={`truncate text-[11px] font-medium ${statusWordToneClass(- coveragePostureVariant(row.posture),- )}`}+ <Show when={columnVisible('targetId')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('text')} text-muted font-mono text-[11px] tabular-nums`}>- {getWorkloadRecoveryPostureLabel(row.posture)}- </span>- </div>- </TableCell>- <TableCell- class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content`}- >- <Show- when={row.latestRecovery}- fallback={<span class="text-muted">No restore point</span>}- >- {(artifact) => <ProxmoxBackupAgeText artifact={artifact()} />}+ {row.workload.vmid || '—'}+ </TableCell></Show>- </TableCell>- <Show when={props.showPbsColumn}>- <TableCell- class={`${getPlatformTableCellClassForKind('text')} text-base-content`}- >- <Show- when={row.latestPBS}- fallback={- <span class="text-muted">{pbsSource.coverageFallbackLabel}</span>- }+ <Show when={columnVisible('node')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>- {(artifact) => <ProxmoxBackupAgeText artifact={artifact()} />}- </Show>+ <Show+ when={row.workload.node}+ fallback={<span class="text-muted">—</span>}+ >+ {(node) => (+ <span class="inline-block max-w-full truncate" title={node()}>+ {node()}+ </span>+ )}+ </Show>+ </TableCell>+ </Show>+ <TableCell class={getPlatformTableCellClassForKind('text')}>+ <div class="flex items-center gap-2">+ <StatusDot+ size="sm"+ variant={coveragePostureVariant(row.posture)}+ title={+ row.protectionPosture?.explanation ??+ 'Pulse does not have enough provider evidence to determine protection.'+ }+ ariaHidden+ />+ <span+ title={row.protectionPosture?.explanation}+ class={`truncate text-[11px] font-medium ${statusWordToneClass(+ coveragePostureVariant(row.posture),+ )}`}+ >+ {getWorkloadRecoveryPostureLabel(row.posture)}+ </span>+ </div></TableCell>- </Show>- <Show when={props.showArchiveColumn}><TableCell- class={`${getPlatformTableCellClassForKind('text')} text-base-content`}+ class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content`}><Show- when={row.latestArchive}- fallback={- <span class="text-muted">{archiveSource.coverageFallbackLabel}</span>- }+ when={row.latestRecovery}+ fallback={<span class="text-muted">No restore point</span>}>{(artifact) => <ProxmoxBackupAgeText artifact={artifact()} />}</Show></TableCell>- </Show>- <Show when={props.showSnapshotColumn}>- <TableCell- class={`${getPlatformTableCellClassForKind('text')} text-base-content`}- >- <Show- when={row.latestSnapshot}- fallback={- <span class="text-muted">{snapshotSource.coverageFallbackLabel}</span>- }+ <Show when={columnVisible('pbs')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>- {(artifact) => <ProxmoxBackupAgeText artifact={artifact()} />}- </Show>- </TableCell>- </Show>- <Show when={props.showTaskColumn}>- <TableCell- class={`${getPlatformTableCellClassForKind('text')} text-base-content`}- >- <Show- when={row.latestTask}- fallback={<span class="text-muted">No recent task</span>}+ <Show+ when={row.latestPBS}+ fallback={+ <span class="text-muted">{pbsSource.coverageFallbackLabel}</span>+ }+ >+ {(artifact) => <ProxmoxBackupAgeText artifact={artifact()} />}+ </Show>+ </TableCell>+ </Show>+ <Show when={columnVisible('archive')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>- {(task) => (- <div class="flex items-center gap-2">- <StatusDot- size="sm"- variant={- task().label === 'Failed'- ? 'danger'- : task().label === 'OK'- ? 'success'- : 'warning'+ <Show+ when={row.latestArchive}+ fallback={+ <span class="text-muted">+ {archiveSource.coverageFallbackLabel}+ </span>+ }+ >+ {(artifact) => <ProxmoxBackupAgeText artifact={artifact()} />}+ </Show>+ </TableCell>+ </Show>+ <Show when={columnVisible('snapshot')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('text')} text-base-content`}+ >+ <Show+ when={row.latestSnapshot}+ fallback={+ <span class="text-muted">+ {snapshotSource.coverageFallbackLabel}+ </span>+ }+ >+ {(artifact) => <ProxmoxBackupAgeText artifact={artifact()} />}+ </Show>+ </TableCell>+ </Show>+ <Show when={columnVisible('task')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('text')} text-base-content`}+ >+ <Show+ when={row.latestTask}+ fallback={+ <Show+ when={layoutMode() !== 'compact'}+ fallback={<span class="block text-center text-muted">—</span>}+ >+ <span class="text-muted">No recent task</span>+ </Show>+ }+ >+ {(task) => (+ <Show+ when={layoutMode() !== 'compact'}+ fallback={+ <div class="flex justify-center">+ <StatusDot+ size="sm"+ variant={taskWordVariant(task().label)}+ title={`Latest task: ${task().label}`}+ ariaHidden+ />+ <span class="sr-only">Latest task: {task().label}</span>+ </div>}- title={task().label}- ariaHidden- />- <span- class={`truncate ${statusWordToneClass(- taskWordVariant(task().label),- )}`}>- {task().label}- </span>- </div>- )}- </Show>- </TableCell>- </Show>- </TableRow>- <Show when={isExpanded()}>- <InlineDetailTableRow- cellId={detailRowId()}- class="bg-surface-alt/40"- cellClass="px-3 py-2"- contentClass=""- colspan={columnCount()}- data-inline-detail-for={row.key}- >- <div class="mb-2 rounded-md border border-border-subtle bg-surface px-2 py-1.5 text-[11px] text-base-content">- <span class="font-medium">- {getWorkloadRecoveryPostureLabel(row.posture)}:- </span>{' '}- {row.protectionPosture?.explanation ??- 'Pulse cannot determine this workload’s protection because no complete provider evidence is linked to it.'}- </div>- <Show when={(row.protectionPosture?.providerStates.length ?? 0) > 0}>- <div class="mb-2 overflow-hidden rounded-md border border-border-subtle">- <div class="bg-surface-alt px-2 py-1 text-[11px] font-medium text-base-content">- Provider evidence- </div>- <div class="divide-y divide-border-subtle">- <For each={row.protectionPosture?.providerStates ?? []}>- {(provider) => (- <div class="grid grid-cols-2 gap-x-3 gap-y-0.5 px-2 py-1.5 text-[11px] sm:grid-cols-4">- <span class="font-medium text-base-content">- {providerLabel(provider.provider)}- </span>- <span class="text-muted">- Job {evidenceQualityLabel(provider.jobState)}- </span>- <span class="text-muted">- History {evidenceQualityLabel(provider.historyCompleteness)}- </span>- <span class="text-muted">- Access {evidenceQualityLabel(provider.permissions)}+ <div class="flex items-center gap-2">+ <StatusDot+ size="sm"+ variant={taskWordVariant(task().label)}+ title={task().label}+ ariaHidden+ />+ <span+ class={`truncate ${statusWordToneClass(+ taskWordVariant(task().label),+ )}`}+ >+ {task().label}</span></div>- )}- </For>- </div>- </div>+ </Show>+ )}+ </Show>+ </TableCell></Show>- <Show- when={evidence().length > 0}- fallback={- <div class="text-xs text-muted">- No restore evidence has been discovered for this workload.- </div>- }+ </TableRow>+ <Show when={isExpanded()}>+ <InlineDetailTableRow+ cellId={detailRowId()}+ class="bg-surface-alt/40"+ cellClass="px-3 py-2 whitespace-normal"+ contentClass="min-w-0 whitespace-normal"+ colspan={columnCount()}+ data-inline-detail-for={row.key}>- <div class="overflow-hidden">- <div class="mb-1 flex items-center justify-between gap-2 text-[11px]">- <span class="font-medium text-base-content">Restore evidence</span>- <Show when={row.artifacts.length > evidence().length}>- <span class="text-muted">- Showing {evidence().length} of {row.artifacts.length}- </span>- </Show>+ <div class="mb-2 rounded-md border border-border-subtle bg-surface px-2 py-1.5 text-[11px] text-base-content">+ <span class="font-medium">+ {getWorkloadRecoveryPostureLabel(row.posture)}:+ </span>{' '}+ {row.protectionPosture?.explanation ??+ 'Pulse cannot determine this workload’s protection because no complete provider evidence is linked to it.'}+ </div>+ <Show when={(row.protectionPosture?.providerStates.length ?? 0) > 0}>+ <div class="mb-2 overflow-hidden rounded-md border border-border-subtle">+ <div class="bg-surface-alt px-2 py-1 text-[11px] font-medium text-base-content">+ Provider evidence+ </div>+ <div class="divide-y divide-border-subtle">+ <For each={row.protectionPosture?.providerStates ?? []}>+ {(provider) => (+ <div class="grid grid-cols-2 gap-x-3 gap-y-0.5 px-2 py-1.5 text-[11px] sm:grid-cols-4">+ <span class="font-medium text-base-content">+ {providerLabel(provider.provider)}+ </span>+ <span class="text-muted">+ Job {evidenceQualityLabel(provider.jobState)}+ </span>+ <span class="text-muted">+ History {evidenceQualityLabel(provider.historyCompleteness)}+ </span>+ <span class="text-muted">+ Access {evidenceQualityLabel(provider.permissions)}+ </span>+ </div>+ )}+ </For>+ </div></div>- <table class="w-full text-[11px]">- <thead>- <tr class="bg-surface-alt text-muted">- <th class="px-2 py-0.5 text-left font-medium">Source</th>- <th class="px-2 py-0.5 text-left font-medium">Location</th>- <th class="px-2 py-0.5 text-right font-medium">- {PROXMOX_BACKUP_COLUMN_LABELS.created}- </th>- <th class="px-2 py-0.5 text-right font-medium">Size</th>- <th class="px-2 py-0.5 text-left font-medium">State</th>- <th class="px-2 py-0.5 text-left font-medium">- {PROXMOX_BACKUP_COLUMN_LABELS.details}- </th>- </tr>- </thead>- <tbody class="divide-y divide-border-subtle">- <For each={evidence()}>- {(artifact) => (- <tr class="hover:bg-surface-hover">- <td class="px-2 py-1">- <ArtifactSourceBadge artifact={artifact} />- </td>- <td class="px-2 py-1 text-base-content">- <span- class="inline-block max-w-[18rem] truncate"- title={artifact.location}+ </Show>+ <Show+ when={evidence().length > 0}+ fallback={+ <div class="text-xs text-muted">+ No restore evidence has been discovered for this workload.+ </div>+ }+ >+ <div class="overflow-hidden">+ <div class="mb-1 flex items-center justify-between gap-2 text-[11px]">+ <span class="font-medium text-base-content">Restore evidence</span>+ <Show when={row.artifacts.length > evidence().length}>+ <span class="text-muted">+ Showing {evidence().length} of {row.artifacts.length}+ </span>+ </Show>+ </div>+ <table class="w-full text-[11px]">+ <thead>+ <tr class="bg-surface-alt text-muted">+ <th class="px-2 py-0.5 text-left font-medium">Source</th>+ <Show+ when={isCoverageEvidenceColumnVisible(+ layoutMode(),+ 'location',+ )}+ >+ <th class="px-2 py-0.5 text-left font-medium">Location</th>+ </Show>+ <th class="px-2 py-0.5 text-right font-medium">+ {PROXMOX_BACKUP_COLUMN_LABELS.created}+ </th>+ <Show+ when={isCoverageEvidenceColumnVisible(layoutMode(), 'size')}+ >+ <th class="px-2 py-0.5 text-right font-medium">Size</th>+ </Show>+ <th class="px-2 py-0.5 text-left font-medium">State</th>+ <Show+ when={isCoverageEvidenceColumnVisible(+ layoutMode(),+ 'details',+ )}+ >+ <th class="px-2 py-0.5 text-left font-medium">+ {PROXMOX_BACKUP_COLUMN_LABELS.details}+ </th>+ </Show>+ </tr>+ </thead>+ <tbody class="divide-y divide-border-subtle">+ <For each={evidence()}>+ {(artifact) => (+ <tr class="hover:bg-surface-hover">+ <td class="px-2 py-1">+ <ArtifactSourceBadge artifact={artifact} />+ </td>+ <Show+ when={isCoverageEvidenceColumnVisible(+ layoutMode(),+ 'location',+ )}>- {artifact.location}- </span>- </td>- <td class="px-2 py-1 text-right text-base-content">- <ProxmoxBackupAgeText artifact={artifact} />- </td>- <td class="px-2 py-1 text-right tabular-nums text-base-content">+ <td class="px-2 py-1 text-base-content">+ <span+ class="inline-block max-w-[18rem] truncate"+ title={artifact.location}+ >+ {artifact.location}+ </span>+ </td>+ </Show>+ <td class="px-2 py-1 text-right text-base-content">+ <ProxmoxBackupAgeText artifact={artifact} />+ </td><Show- when={artifact.size && artifact.size > 0}- fallback={<span class="text-muted">No size</span>}+ when={isCoverageEvidenceColumnVisible(+ layoutMode(),+ 'size',+ )}>- {formatPlatformTableBytesValue(artifact.size)}+ <td class="px-2 py-1 text-right tabular-nums text-base-content">+ <Show+ when={artifact.size && artifact.size > 0}+ fallback={<span class="text-muted">No size</span>}+ >+ {formatPlatformTableBytesValue(artifact.size)}+ </Show>+ </td></Show>- </td>- <td class="px-2 py-1">- <ArtifactStateBadge- artifact={artifact}- label={artifactStateLabel(artifact)}- />- </td>- <td class="px-2 py-1 text-base-content">- <span- class="inline-block max-w-[24rem] truncate"- title={artifact.detail}+ <td class="px-2 py-1">+ <ArtifactStateBadge+ artifact={artifact}+ label={artifactStateLabel(artifact)}+ />+ </td>+ <Show+ when={isCoverageEvidenceColumnVisible(+ layoutMode(),+ 'details',+ )}>- {artifact.detail || '—'}- </span>- </td>- </tr>- )}- </For>- </tbody>- </table>- </div>- </Show>- </InlineDetailTableRow>- </Show>- </>- );- }}- </For>- </>- }- />+ <td class="px-2 py-1 text-base-content">+ <span+ class="inline-block max-w-[24rem] truncate"+ title={artifact.detail}+ >+ {artifact.detail || '—'}+ </span>+ </td>+ </Show>+ </tr>+ )}+ </For>+ </tbody>+ </table>+ </div>+ </Show>+ </InlineDetailTableRow>+ </Show>+ </>+ );+ }}+ </For>+ </>+ }+ />+ </div></Show>);}diff --git a/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsxindex e15dfadeb4..f757220b5e 100644--- a/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx+++ b/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx@@ -1,4 +1,4 @@-import { For, Show, type Accessor, type JSX } from 'solid-js';+import { For, Show, createMemo, type Accessor, type JSX } from 'solid-js';import { TableCell, TableHead, TableRow } from '@/components/shared/Table';import {@@ -12,6 +12,7 @@ import {PlatformTableEmptyState,PlatformTableShell,} from '@/features/platformPage/sharedPlatformPage';+import { useObservedElementWidth } from '@/hooks/useObservedElementWidth';import type { RecoverableArtifact } from './proxmoxBackupRecoveryModel';import type { RecoverableSortKey } from './proxmoxBackupsTableModel';@@ -25,12 +26,17 @@ import {SortableHead,artifactStateLabel,} from './proxmoxBackupsTableShared';+import {+ getRecoverableColumns,+ getRecoverableColumnWidthStyle,+ getRecoverableLayoutForContainer,+ isCompactBackupIdentityLayout,+ type RecoverableColumnId,+} from './proxmoxBackupsTablePresentation';// Flat recoverable-artifact table. Parent state owns filtering, sorting, and// date/source facets; optional day grouping is presentation only.-const COLUMN_COUNT = 9;-interface DayGroup {key: string;label: string;@@ -69,7 +75,18 @@ export function ProxmoxRecoverableTable(props: {onSort: (key: RecoverableSortKey) => void;sizeMaxBytes: number;groupByDay?: boolean;+ layoutWidth?: Accessor<number | null | undefined>;}) {+ const observedWidth = useObservedElementWidth();+ const layoutMode = createMemo(() => {+ const width = props.layoutWidth?.() ?? observedWidth.width();+ return typeof width === 'number' && width > 0+ ? getRecoverableLayoutForContainer(width)+ : 'full';+ });+ const visibleColumns = createMemo(() => getRecoverableColumns(layoutMode()));+ const columnVisible = (column: RecoverableColumnId) =>+ visibleColumns().some((candidate) => candidate.id === column);const showDayGroups = () => props.groupByDay && props.sortKey() === 'created';const renderRow = (artifact: RecoverableArtifact): JSX.Element => (@@ -79,55 +96,71 @@ export function ProxmoxRecoverableTable(props: {<div class="truncate font-semibold">{artifact.workload.name || artifact.workload.label}</div>+ <Show when={isCompactBackupIdentityLayout(layoutMode())}>+ <div class="truncate text-[10px] text-muted">+ {artifact.workload.typeLabel}+ <Show when={artifact.workload.vmid}> {artifact.workload.vmid}</Show>+ </div>+ </Show></div></TableCell>- <TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>- <ProxmoxBackupWorkloadTypeBadge- type={artifact.workload.type}- label={artifact.workload.typeLabel}- />- </TableCell>- <TableCell- class={`${getPlatformTableCellClassForKind('text')} text-muted font-mono text-[11px] tabular-nums`}- >- {artifact.workload.vmid || '—'}- </TableCell>+ <Show when={columnVisible('type')}>+ <TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>+ <ProxmoxBackupWorkloadTypeBadge+ type={artifact.workload.type}+ label={artifact.workload.typeLabel}+ />+ </TableCell>+ </Show>+ <Show when={columnVisible('targetId')}>+ <TableCell+ class={`${getPlatformTableCellClassForKind('text')} text-muted font-mono text-[11px] tabular-nums`}+ >+ {artifact.workload.vmid || '—'}+ </TableCell>+ </Show><TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}><ArtifactSourceBadge artifact={artifact} /></TableCell>- <TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>- <span class="inline-block max-w-[16rem] truncate" title={artifact.location}>- {artifact.location}- </span>- </TableCell>+ <Show when={columnVisible('location')}>+ <TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>+ <span class="inline-block max-w-[16rem] truncate" title={artifact.location}>+ {artifact.location}+ </span>+ </TableCell>+ </Show><TableCell class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content`}><ProxmoxBackupAgeText artifact={artifact} /></TableCell>- <TableCell class={`${getPlatformTableCellClassForKind('metric-bar')} text-base-content`}>- <Show- when={artifact.size && artifact.size > 0}- fallback={<span class="text-muted">No size</span>}- >- <RowMetricBar- valuePct={- props.sizeMaxBytes > 0 && artifact.size- ? (artifact.size / props.sizeMaxBytes) * 100- : 0- }- fillClass="bg-blue-500/40 dark:bg-blue-500/40"- label={formatPlatformTableBytesValue(artifact.size)}- tooltip={`${formatPlatformTableBytesValue(artifact.size)} (relative to largest artifact in view)`}- />- </Show>- </TableCell>+ <Show when={columnVisible('size')}>+ <TableCell class={`${getPlatformTableCellClassForKind('metric-bar')} text-base-content`}>+ <Show+ when={artifact.size && artifact.size > 0}+ fallback={<span class="text-muted">No size</span>}+ >+ <RowMetricBar+ valuePct={+ props.sizeMaxBytes > 0 && artifact.size+ ? (artifact.size / props.sizeMaxBytes) * 100+ : 0+ }+ fillClass="bg-blue-500/40 dark:bg-blue-500/40"+ label={formatPlatformTableBytesValue(artifact.size)}+ tooltip={`${formatPlatformTableBytesValue(artifact.size)} (relative to largest artifact in view)`}+ />+ </Show>+ </TableCell>+ </Show><TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}><ArtifactStateBadge artifact={artifact} label={artifactStateLabel(artifact)} /></TableCell>- <TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>- <span class="inline-block max-w-[20rem] truncate" title={artifact.detail}>- {artifact.detail || '—'}- </span>- </TableCell>+ <Show when={columnVisible('details')}>+ <TableCell class={`${getPlatformTableCellClassForKind('text')} text-base-content`}>+ <span class="inline-block max-w-[20rem] truncate" title={artifact.detail}>+ {artifact.detail || '—'}+ </span>+ </TableCell>+ </Show></TableRow>);@@ -150,102 +183,130 @@ export function ProxmoxRecoverableTable(props: {/>}>- <PlatformTableShell- tableClass="min-w-[1080px] table-fixed text-xs"- header={- <>- <SortableHead- label="Workload"- sortKey="workload"- currentSort={props.sortKey}- direction={props.sortDirection}- onSort={props.onSort}- align="left"- headClass={getPlatformTableHeadClassForKind('name')}- />- <TableHead class={getPlatformTableHeadClassForKind('text')}>Type</TableHead>- <TableHead class={getPlatformTableHeadClassForKind('text')}>- {PROXMOX_BACKUP_COLUMN_LABELS.targetId}- </TableHead>- <SortableHead- label="Source"- sortKey="source"- currentSort={props.sortKey}- direction={props.sortDirection}- onSort={props.onSort}- align="left"- headClass={getPlatformTableHeadClassForKind('text')}- />- <SortableHead- label="Location"- sortKey="location"- currentSort={props.sortKey}- direction={props.sortDirection}- onSort={props.onSort}- align="left"- headClass={getPlatformTableHeadClassForKind('text')}- />- <SortableHead- label={PROXMOX_BACKUP_COLUMN_LABELS.created}- sortKey="created"- currentSort={props.sortKey}- direction={props.sortDirection}- onSort={props.onSort}- align="right"- headClass={getPlatformTableHeadClassForKind('numeric-value')}- />- <SortableHead- label="Size"- sortKey="size"- currentSort={props.sortKey}- direction={props.sortDirection}- onSort={props.onSort}- align="center"- headClass={getPlatformTableHeadClassForKind('metric-bar')}- />- <SortableHead- label="State"- sortKey="state"- currentSort={props.sortKey}- direction={props.sortDirection}- onSort={props.onSort}- align="left"- headClass={getPlatformTableHeadClassForKind('text')}- />- <TableHead class={getPlatformTableHeadClassForKind('text')}>- {PROXMOX_BACKUP_COLUMN_LABELS.details}- </TableHead>- </>- }- body={- <>- <Show- when={showDayGroups()}- fallback={<For each={props.artifacts}>{(artifact) => renderRow(artifact)}</For>}- >- <For each={groupByDay(props.artifacts)}>- {(group) => (- <>- <TableRow>- {/* Cell-level background is reliable across table layout engines. */}- <TableCell- colspan={COLUMN_COUNT}- class="border-t border-border bg-surface-alt px-3 py-1.5 text-[11px] font-semibold uppercase tracking-[0.14em] text-base-content"- >- {group.label}{' '}- <span class="ml-2 normal-case tracking-normal text-muted">- {group.items.length} {group.items.length === 1 ? 'backup' : 'backups'}- </span>- </TableCell>- </TableRow>- <For each={group.items}>{(artifact) => renderRow(artifact)}</For>- </>+ <div+ ref={observedWidth.setElement}+ data-proxmox-backups-table="recoverable"+ data-proxmox-backups-layout={layoutMode()}+ >+ <PlatformTableShell+ tableClass="min-w-[0px] table-fixed text-xs"+ colgroup={+ <colgroup>+ <For each={visibleColumns()}>+ {(column) => (+ <col+ style={getRecoverableColumnWidthStyle(column.id, layoutMode())}+ data-proxmox-backups-column={column.id}+ />)}</For>- </Show>- </>- }- />+ </colgroup>+ }+ header={+ <>+ <SortableHead+ label="Workload"+ sortKey="workload"+ currentSort={props.sortKey}+ direction={props.sortDirection}+ onSort={props.onSort}+ align="left"+ headClass={getPlatformTableHeadClassForKind('name')}+ />+ <Show when={columnVisible('type')}>+ <TableHead class={getPlatformTableHeadClassForKind('text')}>Type</TableHead>+ </Show>+ <Show when={columnVisible('targetId')}>+ <TableHead class={getPlatformTableHeadClassForKind('text')}>+ {PROXMOX_BACKUP_COLUMN_LABELS.targetId}+ </TableHead>+ </Show>+ <SortableHead+ label={layoutMode() === 'compact' ? 'Via' : 'Source'}+ sortKey="source"+ currentSort={props.sortKey}+ direction={props.sortDirection}+ onSort={props.onSort}+ align="left"+ headClass={getPlatformTableHeadClassForKind('text')}+ />+ <Show when={columnVisible('location')}>+ <SortableHead+ label="Location"+ sortKey="location"+ currentSort={props.sortKey}+ direction={props.sortDirection}+ onSort={props.onSort}+ align="left"+ headClass={getPlatformTableHeadClassForKind('text')}+ />+ </Show>+ <SortableHead+ label={layoutMode() === 'compact' ? 'Age' : PROXMOX_BACKUP_COLUMN_LABELS.created}+ sortKey="created"+ currentSort={props.sortKey}+ direction={props.sortDirection}+ onSort={props.onSort}+ align="right"+ headClass={getPlatformTableHeadClassForKind('numeric-value')}+ />+ <Show when={columnVisible('size')}>+ <SortableHead+ label="Size"+ sortKey="size"+ currentSort={props.sortKey}+ direction={props.sortDirection}+ onSort={props.onSort}+ align="center"+ headClass={getPlatformTableHeadClassForKind('metric-bar')}+ />+ </Show>+ <SortableHead+ label="State"+ sortKey="state"+ currentSort={props.sortKey}+ direction={props.sortDirection}+ onSort={props.onSort}+ align="left"+ headClass={getPlatformTableHeadClassForKind('text')}+ />+ <Show when={columnVisible('details')}>+ <TableHead class={getPlatformTableHeadClassForKind('text')}>+ {PROXMOX_BACKUP_COLUMN_LABELS.details}+ </TableHead>+ </Show>+ </>+ }+ body={+ <>+ <Show+ when={showDayGroups()}+ fallback={<For each={props.artifacts}>{(artifact) => renderRow(artifact)}</For>}+ >+ <For each={groupByDay(props.artifacts)}>+ {(group) => (+ <>+ <TableRow>+ {/* Cell-level background is reliable across table layout engines. */}+ <TableCell+ colspan={visibleColumns().length}+ class="border-t border-border bg-surface-alt px-3 py-1.5 text-[11px] font-semibold uppercase tracking-[0.14em] text-base-content"+ >+ {group.label}{' '}+ <span class="ml-2 normal-case tracking-normal text-muted">+ {group.items.length} {group.items.length === 1 ? 'backup' : 'backups'}+ </span>+ </TableCell>+ </TableRow>+ <For each={group.items}>{(artifact) => renderRow(artifact)}</For>+ </>+ )}+ </For>+ </Show>+ </>+ }+ />+ </div></Show>);}diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsxindex bf1c713ad5..37e6b066a0 100644--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxCoverageTable.test.tsx@@ -70,6 +70,7 @@ describe('ProxmoxCoverageTable column visibility', () => {showArchiveColumn={false}showSnapshotColumn={true}showTaskColumn={false}+ layoutWidth={() => 1_200}/>));@@ -92,6 +93,34 @@ describe('ProxmoxCoverageTable column visibility', () => {expect(document.body.textContent).not.toContain('Node pve1');});+ it('keeps the operator answer visible and folds identity context into compact rows', () => {+ render(() => (+ <ProxmoxCoverageTable+ rows={[row]}+ hasAnyRows+ emptyIcon={<span />}+ emptyTitle=""+ emptyDescription=""+ sortKey={(() => 'posture') as Accessor<CoverageSortKey>}+ sortDirection={() => 'asc'}+ onSort={() => {}}+ expandedKeys={new Set<string>()}+ onToggleExpand={() => {}}+ showPbsColumn={true}+ showArchiveColumn={true}+ showSnapshotColumn={true}+ showTaskColumn={true}+ layoutWidth={() => 330}+ />+ ));++ expect(headerTexts()).toEqual(['Workload', 'Posture', 'Age', 'Job']);+ expect(document.body.textContent).toContain('VM 100 · pve1');+ expect(document.body.textContent).not.toContain('PBS snapshot');+ expect(document.body.textContent).not.toContain('PVE file');+ expect(document.body.textContent).not.toContain('Guest snapshot');+ });+it('keeps provider evidence in the workload drill-down instead of every table row', () => {const { unmount } = render(() => (<ProxmoxCoverageTable@@ -109,6 +138,7 @@ describe('ProxmoxCoverageTable column visibility', () => {showArchiveColumn={false}showSnapshotColumn={false}showTaskColumn={false}+ layoutWidth={() => 1_200}/>));@@ -134,6 +164,7 @@ describe('ProxmoxCoverageTable column visibility', () => {showArchiveColumn={false}showSnapshotColumn={false}showTaskColumn={false}+ layoutWidth={() => 1_200}/>));diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxRecoverableTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxRecoverableTable.test.tsxnew file mode 100644index 0000000000..88fb9a4125--- /dev/null+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxRecoverableTable.test.tsx@@ -0,0 +1,83 @@+import { cleanup, render } from '@solidjs/testing-library';+import { afterEach, describe, expect, it } from 'vitest';+import type { Accessor } from 'solid-js';++import { ProxmoxRecoverableTable } from '../ProxmoxRecoverableTable';+import type { RecoverableArtifact } from '../proxmoxBackupRecoveryModel';+import type { RecoverableSortKey } from '../proxmoxBackupsTableModel';++const artifact: RecoverableArtifact = {+ id: 'pbs:web:100',+ nativeId: 'vm/100/2026-08-04T08:00:00Z',+ sourceKind: 'pbs',+ sourceLabel: 'PBS',+ sourceTitle: 'Proxmox Backup Server',+ workload: {+ key: 'vm:100',+ type: 'vm',+ typeLabel: 'VM',+ vmid: '100',+ label: 'web (VM 100)',+ name: 'web',+ node: 'pve1',+ },+ createdAt: '2026-08-04T08:00:00Z',+ createdMs: Date.parse('2026-08-04T08:00:00Z'),+ size: 4_000_000_000,+ location: 'main / pve1',+ detail: '5 PBS files',+ protected: true,+ verified: true,+};++const renderTable = (layoutWidth: number) =>+ render(() => (+ <ProxmoxRecoverableTable+ artifacts={[artifact]}+ hasAnyArtifacts+ emptyIcon={<span />}+ emptyTitle=""+ emptyDescription=""+ sortKey={(() => 'created') as Accessor<RecoverableSortKey>}+ sortDirection={() => 'desc'}+ onSort={() => {}}+ sizeMaxBytes={artifact.size ?? 0}+ layoutWidth={() => layoutWidth}+ />+ ));++afterEach(cleanup);++describe('ProxmoxRecoverableTable responsive columns', () => {+ it('keeps source, recovery age, and state visible in compact containers', () => {+ renderTable(330);++ expect([...document.querySelectorAll('thead th')].map((th) => th.textContent?.trim())).toEqual([+ 'Workload',+ 'Via',+ 'Age',+ 'State',+ ]);+ expect(document.body.textContent).toContain('VM 100');+ expect(document.body.textContent).not.toContain('main / pve1');+ expect(document.body.textContent).not.toContain('5 PBS files');+ });++ it('restores every metadata column when the table has full width', () => {+ renderTable(1_200);++ expect([...document.querySelectorAll('thead th')].map((th) => th.textContent?.trim())).toEqual([+ 'Workload',+ 'Type',+ 'Target ID',+ 'Source',+ 'Location',+ 'Created',+ 'Size',+ 'State',+ 'Details',+ ]);+ expect(document.body.textContent).toContain('main / pve1');+ expect(document.body.textContent).toContain('5 PBS files');+ });+});diff --git a/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupsTablePresentation.test.ts b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupsTablePresentation.test.tsnew file mode 100644index 0000000000..a590afd8ed--- /dev/null+++ b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupsTablePresentation.test.ts@@ -0,0 +1,128 @@+import { describe, expect, it } from 'vitest';++import {+ getBackupServerColumns,+ getBackupServerLayoutForContainer,+ getCoverageColumns,+ getCoverageLayoutForContainer,+ getRecoverableColumns,+ getRecoverableLayoutForContainer,+ isCoverageEvidenceColumnVisible,+} from '../proxmoxBackupsTablePresentation';++const ids = <T extends { id: string }>(columns: readonly T[]) => columns.map((column) => column.id);++describe('Proxmox backups responsive table presentation', () => {+ it('selects layouts from the table container instead of the viewport', () => {+ expect(getBackupServerLayoutForContainer(519)).toBe('compact');+ expect(getBackupServerLayoutForContainer(520)).toBe('basic');+ expect(getBackupServerLayoutForContainer(719)).toBe('basic');+ expect(getBackupServerLayoutForContainer(720)).toBe('operational');+ expect(getBackupServerLayoutForContainer(899)).toBe('operational');+ expect(getBackupServerLayoutForContainer(900)).toBe('expanded');+ expect(getBackupServerLayoutForContainer(1119)).toBe('expanded');+ expect(getBackupServerLayoutForContainer(1120)).toBe('full');++ for (const resolver of [getCoverageLayoutForContainer, getRecoverableLayoutForContainer]) {+ expect(resolver(479)).toBe('compact');+ expect(resolver(480)).toBe('basic');+ expect(resolver(719)).toBe('basic');+ expect(resolver(720)).toBe('operational');+ expect(resolver(879)).toBe('operational');+ expect(resolver(880)).toBe('expanded');+ expect(resolver(1119)).toBe('expanded');+ expect(resolver(1120)).toBe('full');+ }+ });++ it('keeps server reachability and datastore exhaustion risk visible first', () => {+ expect(ids(getBackupServerColumns('compact'))).toEqual(['server', 'status', 'used']);+ expect(ids(getBackupServerColumns('basic'))).toEqual([+ 'server',+ 'status',+ 'datastore',+ 'used',+ 'backups',+ ]);+ expect(ids(getBackupServerColumns('operational'))).toEqual([+ 'server',+ 'status',+ 'cpu',+ 'memory',+ 'datastore',+ 'used',+ 'backups',+ ]);+ expect(ids(getBackupServerColumns('full'))).toHaveLength(10);+ });++ it('prioritizes workload posture, restore freshness, and task failures in coverage', () => {+ const everySource = { pbs: true, archive: true, snapshot: true, task: true };+ expect(ids(getCoverageColumns('compact', everySource))).toEqual([+ 'workload',+ 'posture',+ 'latest',+ 'task',+ ]);+ expect(ids(getCoverageColumns('operational', everySource))).toEqual([+ 'workload',+ 'type',+ 'node',+ 'posture',+ 'latest',+ 'task',+ ]);+ expect(ids(getCoverageColumns('expanded', everySource))).toEqual([+ 'workload',+ 'type',+ 'node',+ 'posture',+ 'latest',+ 'pbs',+ 'archive',+ 'snapshot',+ 'task',+ ]);+ expect(ids(getCoverageColumns('full', everySource))).toHaveLength(10);+ });++ it('does not reserve empty optional coverage columns', () => {+ expect(+ ids(+ getCoverageColumns('full', {+ pbs: true,+ archive: false,+ snapshot: false,+ task: true,+ }),+ ),+ ).toEqual(['workload', 'type', 'targetId', 'node', 'posture', 'latest', 'pbs', 'task']);+ });++ it('keeps the recovery-point answer visible before verbose metadata', () => {+ expect(ids(getRecoverableColumns('compact'))).toEqual([+ 'workload',+ 'source',+ 'created',+ 'state',+ ]);+ expect(ids(getRecoverableColumns('basic'))).toEqual([+ 'workload',+ 'source',+ 'location',+ 'created',+ 'state',+ ]);+ expect(ids(getRecoverableColumns('expanded'))).not.toContain('details');+ expect(ids(getRecoverableColumns('full'))).toHaveLength(9);+ });++ it('progressively reveals restore-evidence detail columns', () => {+ expect(isCoverageEvidenceColumnVisible('compact', 'location')).toBe(false);+ expect(isCoverageEvidenceColumnVisible('basic', 'location')).toBe(true);+ expect(isCoverageEvidenceColumnVisible('basic', 'size')).toBe(false);+ expect(isCoverageEvidenceColumnVisible('operational', 'size')).toBe(true);+ expect(isCoverageEvidenceColumnVisible('operational', 'details')).toBe(false);+ expect(isCoverageEvidenceColumnVisible('expanded', 'details')).toBe(true);+ });+});diff --git a/frontend-modern/src/features/proxmox/proxmoxBackupsTablePresentation.ts b/frontend-modern/src/features/proxmox/proxmoxBackupsTablePresentation.tsnew file mode 100644index 0000000000..69ff7c4c04--- /dev/null+++ b/frontend-modern/src/features/proxmox/proxmoxBackupsTablePresentation.ts@@ -0,0 +1,329 @@+import type { JSX } from 'solid-js';++import type { PlatformTableColumnKind } from '@/features/platformPage/columnAlignment';+import { getPlatformTableWeightedColumnWidthStyle } from '@/features/platformPage/sharedPlatformPage';++export type ProxmoxBackupsTableLayoutMode =+ 'compact' | 'basic' | 'operational' | 'expanded' | 'full';++export type BackupServerColumnId =+ | 'server'+ | 'status'+ | 'version'+ | 'cpu'+ | 'memory'+ | 'uptime'+ | 'datastore'+ | 'used'+ | 'backups'+ | 'dedup';++export type CoverageColumnId =+ | 'workload'+ | 'type'+ | 'targetId'+ | 'node'+ | 'posture'+ | 'latest'+ | 'pbs'+ | 'archive'+ | 'snapshot'+ | 'task';++export type RecoverableColumnId =+ | 'workload'+ | 'type'+ | 'targetId'+ | 'source'+ | 'location'+ | 'created'+ | 'size'+ | 'state'+ | 'details';++export type BackupTableColumn<Id extends string> = {+ id: Id;+ label: string;+ kind: PlatformTableColumnKind;+};++const layoutForWidth = (+ width: number,+ breakpoints: readonly [number, number, number, number],+): ProxmoxBackupsTableLayoutMode => {+ if (!Number.isFinite(width) || width < breakpoints[0]) return 'compact';+ if (width < breakpoints[1]) return 'basic';+ if (width < breakpoints[2]) return 'operational';+ if (width < breakpoints[3]) return 'expanded';+ return 'full';+};++// These are table-container breakpoints, not viewport breakpoints. A 1536px+// browser with Pulse Assistant open leaves roughly 886px for the page and must+// select the same columns as any other 886px container.+export const getBackupServerLayoutForContainer = (width: number): ProxmoxBackupsTableLayoutMode =>+ layoutForWidth(width, [520, 720, 900, 1120]);++export const getCoverageLayoutForContainer = (width: number): ProxmoxBackupsTableLayoutMode =>+ layoutForWidth(width, [480, 720, 880, 1120]);++export const getRecoverableLayoutForContainer = (width: number): ProxmoxBackupsTableLayoutMode =>+ layoutForWidth(width, [480, 720, 880, 1120]);++export const BACKUP_SERVER_COLUMNS: readonly BackupTableColumn<BackupServerColumnId>[] = [+ { id: 'server', label: 'Backup server', kind: 'name' },+ { id: 'status', label: 'Status', kind: 'text' },+ { id: 'version', label: 'Version', kind: 'text' },+ { id: 'cpu', label: 'CPU', kind: 'numeric-value' },+ { id: 'memory', label: 'Memory', kind: 'numeric-value' },+ { id: 'uptime', label: 'Uptime', kind: 'numeric-value' },+ { id: 'datastore', label: 'Datastore', kind: 'text' },+ { id: 'used', label: 'Used', kind: 'numeric-value' },+ { id: 'backups', label: 'Backups', kind: 'numeric-value' },+ { id: 'dedup', label: 'Dedup', kind: 'numeric-value' },+];++const BACKUP_SERVER_VISIBLE: Record<+ ProxmoxBackupsTableLayoutMode,+ readonly BackupServerColumnId[]+> = {+ // Reachability and datastore exhaustion are the two risks that can stop all+ // future backups. Host telemetry and space-efficiency context return only as+ // the table gains enough room to keep those headline answers readable.+ compact: ['server', 'status', 'used'],+ basic: ['server', 'status', 'datastore', 'used', 'backups'],+ operational: ['server', 'status', 'cpu', 'memory', 'datastore', 'used', 'backups'],+ expanded: ['server', 'status', 'cpu', 'memory', 'uptime', 'datastore', 'used', 'backups'],+ full: BACKUP_SERVER_COLUMNS.map((column) => column.id),+};++const BACKUP_SERVER_WEIGHTS: Record<+ ProxmoxBackupsTableLayoutMode,+ Partial<Record<BackupServerColumnId, number>>+> = {+ compact: { server: 43, status: 23, used: 34 },+ basic: { server: 24, status: 14, datastore: 20, used: 28, backups: 14 },+ operational: {+ server: 20,+ status: 12,+ cpu: 10,+ memory: 12,+ datastore: 16,+ used: 20,+ backups: 10,+ },+ expanded: {+ server: 18,+ status: 11,+ cpu: 8,+ memory: 11,+ uptime: 9,+ datastore: 16,+ used: 18,+ backups: 9,+ },+ full: {+ server: 15,+ status: 10,+ version: 8,+ cpu: 6,+ memory: 11,+ uptime: 7,+ datastore: 13,+ used: 15,+ backups: 8,+ dedup: 7,+ },+};++export const getBackupServerColumns = (+ layout: ProxmoxBackupsTableLayoutMode,+): BackupTableColumn<BackupServerColumnId>[] => {+ const visible = new Set(BACKUP_SERVER_VISIBLE[layout]);+ return BACKUP_SERVER_COLUMNS.filter((column) => visible.has(column.id));+};++export const getBackupServerColumnWidthStyle = (+ columnId: BackupServerColumnId,+ layout: ProxmoxBackupsTableLayoutMode,+): JSX.CSSProperties =>+ getPlatformTableWeightedColumnWidthStyle(+ columnId,+ BACKUP_SERVER_WEIGHTS[layout],+ BACKUP_SERVER_VISIBLE[layout],+ );++export const COVERAGE_COLUMNS: readonly BackupTableColumn<CoverageColumnId>[] = [+ { id: 'workload', label: 'Workload', kind: 'name' },+ { id: 'type', label: 'Type', kind: 'text' },+ { id: 'targetId', label: 'Target ID', kind: 'text' },+ { id: 'node', label: 'Node', kind: 'text' },+ { id: 'posture', label: 'Posture', kind: 'text' },+ { id: 'latest', label: 'Restore', kind: 'numeric-value' },+ { id: 'pbs', label: 'PBS snapshot', kind: 'text' },+ { id: 'archive', label: 'PVE file', kind: 'text' },+ { id: 'snapshot', label: 'Guest snapshot', kind: 'text' },+ { id: 'task', label: 'Task', kind: 'text' },+];++const COVERAGE_VISIBLE: Record<ProxmoxBackupsTableLayoutMode, readonly CoverageColumnId[]> = {+ // On narrow surfaces answer: which workload, what posture, how recent is the+ // newest restore point, and did the latest task succeed? Provider-by-provider+ // evidence is progressive detail; target identity folds beneath the name.+ compact: ['workload', 'posture', 'latest', 'task'],+ basic: ['workload', 'node', 'posture', 'latest', 'task'],+ operational: ['workload', 'type', 'node', 'posture', 'latest', 'task'],+ expanded: ['workload', 'type', 'node', 'posture', 'latest', 'pbs', 'archive', 'snapshot', 'task'],+ full: COVERAGE_COLUMNS.map((column) => column.id),+};++const COVERAGE_WEIGHTS: Record<+ ProxmoxBackupsTableLayoutMode,+ Partial<Record<CoverageColumnId, number>>+> = {+ compact: { workload: 34.5, posture: 26, latest: 23, task: 16.5 },+ basic: { workload: 31, node: 18, posture: 19, latest: 20, task: 12 },+ operational: { workload: 28, type: 9, node: 14, posture: 17, latest: 17, task: 15 },+ expanded: {+ workload: 17,+ type: 7,+ node: 10,+ posture: 13,+ latest: 12,+ pbs: 11,+ archive: 10.5,+ snapshot: 11.5,+ task: 8,+ },+ full: {+ workload: 14.5,+ type: 6,+ targetId: 8.5,+ node: 9,+ posture: 11,+ latest: 10,+ pbs: 11.5,+ archive: 10,+ snapshot: 12.5,+ task: 8,+ },+};++export interface CoverageSourceVisibility {+ pbs: boolean;+ archive: boolean;+ snapshot: boolean;+ task: boolean;+}++export const getCoverageColumns = (+ layout: ProxmoxBackupsTableLayoutMode,+ sourceVisibility: CoverageSourceVisibility,+): BackupTableColumn<CoverageColumnId>[] => {+ const layoutColumns = new Set(COVERAGE_VISIBLE[layout]);+ return COVERAGE_COLUMNS.filter((column) => {+ if (!layoutColumns.has(column.id)) return false;+ if (column.id === 'pbs') return sourceVisibility.pbs;+ if (column.id === 'archive') return sourceVisibility.archive;+ if (column.id === 'snapshot') return sourceVisibility.snapshot;+ if (column.id === 'task') return sourceVisibility.task;+ return true;+ });+};++export const getCoverageColumnWidthStyle = (+ columnId: CoverageColumnId,+ layout: ProxmoxBackupsTableLayoutMode,+ visibleColumnIds: readonly CoverageColumnId[],+): JSX.CSSProperties =>+ getPlatformTableWeightedColumnWidthStyle(columnId, COVERAGE_WEIGHTS[layout], visibleColumnIds);++export const RECOVERABLE_COLUMNS: readonly BackupTableColumn<RecoverableColumnId>[] = [+ { id: 'workload', label: 'Workload', kind: 'name' },+ { id: 'type', label: 'Type', kind: 'text' },+ { id: 'targetId', label: 'Target ID', kind: 'text' },+ { id: 'source', label: 'Source', kind: 'text' },+ { id: 'location', label: 'Location', kind: 'text' },+ { id: 'created', label: 'Created', kind: 'numeric-value' },+ { id: 'size', label: 'Size', kind: 'metric-bar' },+ { id: 'state', label: 'State', kind: 'text' },+ { id: 'details', label: 'Details', kind: 'text' },+];++const RECOVERABLE_VISIBLE: Record<ProxmoxBackupsTableLayoutMode, readonly RecoverableColumnId[]> = {+ // A recovery-point feed starts with identity, source, age, and verification.+ // Location, size, and verbose details progressively return with usable room.+ compact: ['workload', 'source', 'created', 'state'],+ basic: ['workload', 'source', 'location', 'created', 'state'],+ operational: ['workload', 'type', 'source', 'location', 'created', 'size', 'state'],+ expanded: ['workload', 'type', 'targetId', 'source', 'location', 'created', 'size', 'state'],+ full: RECOVERABLE_COLUMNS.map((column) => column.id),+};++const RECOVERABLE_WEIGHTS: Record<+ ProxmoxBackupsTableLayoutMode,+ Partial<Record<RecoverableColumnId, number>>+> = {+ compact: { workload: 40, source: 17, created: 22, state: 21 },+ basic: { workload: 28, source: 14, location: 23, created: 18, state: 17 },+ operational: {+ workload: 24,+ type: 8,+ source: 13,+ location: 20,+ created: 14,+ size: 12,+ state: 9,+ },+ expanded: {+ workload: 18,+ type: 7,+ targetId: 10,+ source: 11,+ location: 18,+ created: 13,+ size: 13,+ state: 10,+ },+ full: {+ workload: 16.5,+ type: 6,+ targetId: 8.5,+ source: 10,+ location: 18,+ created: 11,+ size: 12,+ state: 8,+ details: 10,+ },+};++export const getRecoverableColumns = (+ layout: ProxmoxBackupsTableLayoutMode,+): BackupTableColumn<RecoverableColumnId>[] => {+ const visible = new Set(RECOVERABLE_VISIBLE[layout]);+ return RECOVERABLE_COLUMNS.filter((column) => visible.has(column.id));+};++export const getRecoverableColumnWidthStyle = (+ columnId: RecoverableColumnId,+ layout: ProxmoxBackupsTableLayoutMode,+): JSX.CSSProperties =>+ getPlatformTableWeightedColumnWidthStyle(+ columnId,+ RECOVERABLE_WEIGHTS[layout],+ RECOVERABLE_VISIBLE[layout],+ );++export const isCompactBackupIdentityLayout = (layout: ProxmoxBackupsTableLayoutMode): boolean =>+ layout === 'compact' || layout === 'basic';++export const isCoverageEvidenceColumnVisible = (+ layout: ProxmoxBackupsTableLayoutMode,+ column: 'location' | 'size' | 'details',+): boolean => {+ if (column === 'location') return layout !== 'compact';+ if (column === 'size')+ return layout === 'operational' || layout === 'expanded' || layout === 'full';+ return layout === 'expanded' || layout === 'full';+};