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
Keep unavailable backup sizes distinct from zero activity
pulse-triage[bot]8ca12542d4cd
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex b07f7d9b2d..cb517ca4a5 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -10256,3 +10256,24 @@ The reserve derives from the full keyed measured-height map plus table chrome,not a DOM height sampled while a window retires. Offscreen detail measurementsremain in that map until the owning item is remeasured or removed, so a transientDOM extent cannot lower the reserve before its compensating spacer settles.++### Backup activity distinguishes unknown size from absent restore points++The By date activity view keeps completed, in-window entries even when their+sizes are unavailable. Count and day selection remain usable in Volume mode.+Volume bars and axes measure known positive finite sizes only; unknown sizes+have a separate amber day marker, explicit notice, day label and source tooltip.+Mixed totals are labelled as known volume, never a complete total, and source+percentages are omitted when any size for that day is unknown. An all-unknown+window has no numeric volume scale. Empty days remain distinct from unknown size.++The existing source, search, node, type, location and local-calendar window scope+applies to both known and unknown sizes. Running/failed artifacts and unknown or+future dates do not become completed activity. Posture, backup completion,+permissions, guest operations and actual recovery are unchanged.++`ProxmoxBackupsTable.test.tsx` exercises unknown-only and mixed inventories,+Count/Volume switching, selection and source scope through the HTTP consumer.+`proxmoxBackupActivityPresentation.test.ts` checks separate unknown counts,+excluded dates, labels and per-source tooltips. Browser verification must inspect+the real table/chart with safe inventory at desktop and narrow viewports.diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 7c27558b45..7c63c0d9ee 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -7705,3 +7705,24 @@ The reserve derives from the full keyed measured-height map plus table chrome,not a DOM height sampled while a window retires. Offscreen detail measurementsremain in that map until the owning item is remeasured or removed, so a transientDOM extent cannot lower the reserve before its compensating spacer settles.++### Backup activity distinguishes unknown size from absent restore points++The By date activity view keeps completed, in-window entries even when their+sizes are unavailable. Count and day selection remain usable in Volume mode.+Volume bars and axes measure known positive finite sizes only; unknown sizes+have a separate amber day marker, explicit notice, day label and source tooltip.+Mixed totals are labelled as known volume, never a complete total, and source+percentages are omitted when any size for that day is unknown. An all-unknown+window has no numeric volume scale. Empty days remain distinct from unknown size.++The existing source, search, node, type, location and local-calendar window scope+applies to both known and unknown sizes. Running/failed artifacts and unknown or+future dates do not become completed activity. Posture, backup completion,+permissions, guest operations and actual recovery are unchanged.++`ProxmoxBackupsTable.test.tsx` exercises unknown-only and mixed inventories,+Count/Volume switching, selection and source scope through the HTTP consumer.+`proxmoxBackupActivityPresentation.test.ts` checks separate unknown counts,+excluded dates, labels and per-source tooltips. Browser verification must inspect+the real table/chart with safe inventory at desktop and narrow viewports.diff --git a/frontend-modern/src/features/proxmox/BackupActivityChart.tsx b/frontend-modern/src/features/proxmox/BackupActivityChart.tsxindex 26df986c89..4bf562d052 100644--- a/frontend-modern/src/features/proxmox/BackupActivityChart.tsx+++ b/frontend-modern/src/features/proxmox/BackupActivityChart.tsx@@ -31,6 +31,7 @@ import {getBackupActivityPointTotalLabel,getBackupActivitySegmentPresentation,getBackupActivityTooltipRows,+ getBackupActivityUnknownCount,type BackupActivityMetricMode,type BackupActivityNoun,type BackupActivityPoint,@@ -72,6 +73,12 @@ export const BackupActivityChart: Component<BackupActivityChartProps> = (props)const hasSelection = () => props.selectedDateKey() !== null;const metricMode = (): BackupActivityMetricMode =>props.metricMode?.() ?? props.metricToggle?.mode() ?? 'count';+ const unknownCount = (point: BackupActivityPoint) =>+ metricMode() === 'volume' ? getBackupActivityUnknownCount(point) : 0;+ const onlyUnknownVolume = () =>+ metricMode() === 'volume' &&+ points().some((point) => unknownCount(point) > 0) &&+ !points().some((point) => point.total > 0);const axisTicks = () =>getRecoveryTimelineAxisTicks(points().length, false, props.timeline().labelEvery);@@ -185,7 +192,13 @@ export const BackupActivityChart: Component<BackupActivityChartProps> = (props)<For each={[0, 1, 2]}>{(step) => {const value = () => (axisMax() * (2 - step)) / 2;- return <span>{getBackupActivityAxisLabel(value(), metricMode())}</span>;+ return (+ <span>+ {onlyUnknownVolume()+ ? '—'+ : getBackupActivityAxisLabel(value(), metricMode())}+ </span>+ );}}</For></div>@@ -221,6 +234,7 @@ export const BackupActivityChart: Component<BackupActivityChartProps> = (props)isSelected(),props.noun,metricMode(),+ unknownCount(point),)}aria-pressed={isSelected() ? 'true' : 'false'}onClick={() => props.onToggleDay(point.key)}@@ -267,6 +281,13 @@ export const BackupActivityChart: Component<BackupActivityChartProps> = (props)</For></div></Show>+ <Show when={unknownCount(point) > 0}>+ <div+ data-unknown-volume+ aria-hidden="true"+ class="absolute inset-x-0 bottom-0 h-1 rounded-xs bg-amber-500"+ />+ </Show></div></button></div>@@ -325,6 +346,7 @@ export const BackupActivityChart: Component<BackupActivityChartProps> = (props)t().point.total,props.noun,metricMode(),+ unknownCount(t().point),)}</div></div>diff --git a/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsxindex 9f625a1c3d..07560f8c32 100644--- a/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx+++ b/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx@@ -36,6 +36,7 @@ import type { Resource } from '@/types/resource';import { BackupActivityChart } from './BackupActivityChart';import {buildBackupActivityTimeline,+ getBackupActivityUnknownCount,type BackupActivityMetricMode,type BackupActivityRangeDays,type BackupActivitySegmentKind,@@ -554,7 +555,15 @@ export const ProxmoxBackupsTable: Component<{),);const hasRecoverableActivityInRange = createMemo(() =>- recoverableTimeline().points.some((point) => point.total > 0),+ recoverableTimeline().points.some(+ (point) => point.total > 0 || getBackupActivityUnknownCount(point) > 0,+ ),+ );+ const unknownVolumeCount = createMemo(() =>+ recoverableTimeline().points.reduce(+ (sum, point) => sum + getBackupActivityUnknownCount(point),+ 0,+ ),);const filteredRecoverableArtifacts = createMemo(() => {@@ -897,10 +906,17 @@ export const ProxmoxBackupsTable: Component<{<p class="text-xs text-muted">Activity follows the backup filters. Selecting a day narrows only the list.</p>+ <Show when={recoverableMetricMode() === 'volume' && unknownVolumeCount() > 0}>+ <p class="text-xs text-amber-700 dark:text-amber-300" role="status">+ Sizes are unavailable for {unknownVolumeCount()} completed restore{' '}+ {unknownVolumeCount() === 1 ? 'point' : 'points'} in this window. Bars show+ known volume only; amber marks days with unknown sizes, not zero volume.+ </p>+ </Show><BackupActivityCharttitle={recoverableMetricMode() === 'volume'- ? 'Completed restore volume per day'+ ? 'Known restore volume per day': 'Completed restore points per day'}noun="restore point"diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsxindex 6581f21277..3cdeb21d34 100644--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx@@ -1787,8 +1787,10 @@ describe('completed restore-point summary and activity', () => {expect(screen.queryByRole('button', { name: /: 5 restore points$/ })).not.toBeInTheDocument();expect(screen.getByText('Completed restore points per day')).toBeInTheDocument();await fireEvent.click(screen.getByRole('button', { name: 'Volume' }));- expect(screen.getByText('Completed restore volume per day')).toBeInTheDocument();- expect(screen.getByRole('button', { name: /: 3.00 KB$/ })).toBeInTheDocument();+ expect(screen.getByText('Known restore volume per day')).toBeInTheDocument();+ expect(+ screen.getByRole('button', { name: /: 3.00 KB known; 1 size unknown$/ }),+ ).toBeInTheDocument();expect(screen.getAllByText('Running').length).toBeGreaterThan(0);expect(screen.getAllByText('Failed').length).toBeGreaterThan(0);});@@ -1839,7 +1841,13 @@ describe('restore volume with unavailable sizes', () => {backups: [identityPBS({ size: mixed ? 2048 : 0 }),...(mixed- ? [identityPBS({ id: 'yesterday', size: 0, backupTime: '2026-10-03T10:00:00Z' })]+ ? [+ identityPBS({+ id: 'yesterday',+ size: 0,+ backupTime: '2026-10-03T10:00:00Z',+ }),+ ]: []),identityPBS({ id: 'running', size: 0, inProgress: true }),identityPBS({ id: 'old', size: 0, backupTime: '2025-01-01T10:00:00Z' }),@@ -1857,7 +1865,10 @@ describe('restore volume with unavailable sizes', () => {apiFetchJSONMock.mockResolvedValue({ data: [], policy: protectionPolicy });window.history.replaceState({}, '', '/proxmox/backups/date');return renderInRouter(() => (- <ProxmoxBackupsTable emptyIcon={<span />} workloads={[identityGuest('east-100', 'east', 'pve-1')]} />+ <ProxmoxBackupsTable+ emptyIcon={<span />}+ workloads={[identityGuest('east-100', 'east', 'pve-1')]}+ />));};@@ -1867,14 +1878,22 @@ describe('restore volume with unavailable sizes', () => {await fireEvent.click(screen.getByRole('button', { name: 'Volume' }));expect(screen.getByRole('button', { name: 'Count' })).toBeInTheDocument();expect(screen.getByText('Known restore volume per day')).toBeInTheDocument();- expect(screen.queryByText(/No completed restore points with known dates/)).not.toBeInTheDocument();- expect(screen.getByText(/Sizes are unavailable for 3 completed restore points in this window/)).toBeInTheDocument();+ expect(+ screen.queryByText(/No completed restore points with known dates/),+ ).not.toBeInTheDocument();+ expect(+ screen.getByText(/Sizes are unavailable for 3 completed restore points in this window/),+ ).toBeInTheDocument();const day = screen.getByRole('button', { name: /: 3 sizes unknown$/ });expect(day.querySelector('[data-unknown-volume]')).not.toBeNull();await fireEvent.click(day);- expect(screen.getByRole('button', { name: /: 3 sizes unknown, selected$/ })).toBeInTheDocument();+ expect(+ screen.getByRole('button', { name: /: 3 sizes unknown, selected$/ }),+ ).toBeInTheDocument();await fireEvent.click(screen.getByRole('button', { name: 'Count' }));- expect(screen.getByRole('button', { name: /: 3 restore points, selected$/ })).toBeInTheDocument();+ expect(+ screen.getByRole('button', { name: /: 3 restore points, selected$/ }),+ ).toBeInTheDocument();expect(screen.queryByText(/Sizes are unavailable for/)).not.toBeInTheDocument();});@@ -1882,7 +1901,9 @@ describe('restore volume with unavailable sizes', () => {mountVolumeInventory(true);await screen.findByRole('button', { name: /: 3 restore points$/ });await fireEvent.click(screen.getByRole('button', { name: 'Volume' }));- expect(screen.getByText(/Sizes are unavailable for 2 completed restore points in this window/)).toBeInTheDocument();+ expect(+ screen.getByText(/Sizes are unavailable for 2 completed restore points in this window/),+ ).toBeInTheDocument();const today = screen.getByRole('button', { name: /: 3.00 KB known; 1 size unknown$/ });const yesterday = screen.getByRole('button', { name: /: 1 size unknown$/ });expect(screen.getAllByRole('button', { name: /: 0 B$/ }).length).toBeGreaterThan(0);@@ -1892,16 +1913,24 @@ describe('restore volume with unavailable sizes', () => {expect(screen.queryByText('1.00 KB (33%)')).not.toBeInTheDocument();await fireEvent.click(yesterday);expect(document.querySelectorAll('[data-proxmox-backup-row="recoverable"]')).toHaveLength(1);- expect(screen.getByRole('button', { name: /: 3.00 KB known; 1 size unknown$/ })).toBeInTheDocument();+ expect(+ screen.getByRole('button', { name: /: 3.00 KB known; 1 size unknown$/ }),+ ).toBeInTheDocument();await fireEvent.click(screen.getByRole('button', { name: 'Count' }));- expect(screen.getByRole('button', { name: /: 1 restore point, selected$/ })).toBeInTheDocument();+ expect(+ screen.getByRole('button', { name: /: 1 restore point, selected$/ }),+ ).toBeInTheDocument();});it('[volume-size] follows source scope without counting incomplete or out-of-window unknown sizes', async () => {mountVolumeInventory(true);await screen.findByRole('button', { name: /: 3 restore points$/ });await fireEvent.click(screen.getByRole('button', { name: 'Volume' }));- await fireEvent.click(within(screen.getByRole('group', { name: 'Source' })).getByRole('button', { name: 'PVE backup files' }));+ await fireEvent.click(+ within(screen.getByRole('group', { name: 'Source' })).getByRole('button', {+ name: 'PVE backup files',+ }),+ );expect(screen.getByRole('button', { name: /: 1.00 KB$/ })).toBeInTheDocument();expect(screen.queryByText(/Sizes are unavailable for/)).not.toBeInTheDocument();expect(document.querySelector('[data-unknown-volume]')).toBeNull();diff --git a/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupActivityPresentation.test.ts b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupActivityPresentation.test.tsindex 0f7621e220..5bb88ade56 100644--- a/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupActivityPresentation.test.ts+++ b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupActivityPresentation.test.ts@@ -12,6 +12,7 @@ import {getBackupActivityPointTotalLabel,getBackupActivitySegmentPresentation,getBackupActivityTooltipRows,+ getBackupActivityUnknownCount,type BackupActivityMetricMode,type BackupActivityNoun,type BackupActivityPoint,@@ -244,7 +245,7 @@ describe('proxmoxBackupActivityPresentation', () => {expect(timeline.points.at(-1)!.total).toBe(3);});- it('accumulates per-item byte values in volume mode and rejects non-positive/non-finite values', () => {+ it('keeps known byte totals separate from non-positive/non-finite sizes', () => {const items: ActivityItem[] = [{ ts: localMs(2026, 1, 13, 9, 0), kind: 'ok', bytes: 1073741824 },{ ts: localMs(2026, 1, 13, 10, 0), kind: 'failed', bytes: 2147483648 },@@ -262,6 +263,33 @@ describe('proxmoxBackupActivityPresentation', () => {expect(today.counts.ok).toBe(1073741824);expect(today.counts.failed).toBe(2147483648);expect(today.total).toBe(1073741824 + 2147483648);+ expect(today.unknownCounts).toEqual({ ok: 4 });+ expect(getBackupActivityUnknownCount(today)).toBe(4);+ });++ it('retains unknown-only days without inventing byte volume or counting excluded entries', () => {+ const items: ActivityItem[] = [+ { ts: localMs(2026, 1, 13, 9), kind: 'pbs' },+ { ts: localMs(2026, 1, 13, 10), kind: 'snapshot', bytes: 0 },+ { ts: localMs(2026, 1, 12, 10), kind: 'archive', bytes: 2048 },+ { ts: localMs(2026, 1, 13, 11), kind: null },+ { ts: localMs(2026, 1, 6), kind: 'pbs' },+ { ts: NOW.getTime() + 1, kind: 'pbs' },+ { kind: 'pbs' },+ ];+ const volume = buildBackupActivityTimeline(7, items, itemMs, classify, {+ now: NOW,+ getValue: (item) => item.bytes ?? 0,+ });+ expect(volume.points.at(-1)!.total).toBe(0);+ expect(volume.points.at(-1)!.unknownCounts).toEqual({ pbs: 1, snapshot: 1 });+ expect(+ volume.points.reduce((sum, point) => sum + getBackupActivityUnknownCount(point), 0),+ ).toBe(2);+ expect(volume.points.reduce((sum, point) => sum + point.total, 0)).toBe(2048);+ const counts = buildBackupActivityTimeline(7, items, itemMs, classify, { now: NOW });+ expect(counts.points.reduce((sum, point) => sum + point.total, 0)).toBe(3);+ expect(counts.points.every((point) => getBackupActivityUnknownCount(point) === 0)).toBe(true);});it('keeps fractional positive values in volume mode', () => {@@ -426,6 +454,33 @@ describe('proxmoxBackupActivityPresentation', () => {});describe('getBackupActivityPointTotalLabel', () => {+ it('never presents unavailable sizes as a zero or a complete volume', () => {+ expect(getBackupActivityPointTotalLabel(0, 'restore point', 'volume', 1)).toBe(+ '1 size unknown',+ );+ expect(getBackupActivityPointTotalLabel(1024, 'restore point', 'volume', 2)).toBe(+ '1.00 KB known; 2 sizes unknown',+ );+ expect(getBackupActivityPointTotalLabel(3, 'restore point', 'count', 2)).toBe(+ '3 restore points',+ );+ expect(+ getBackupActivityColumnAriaLabel('Feb 13', 0, true, 'restore point', 'volume', 2),+ ).toBe('Feb 13: 2 sizes unknown, selected');+ });++ it('does not give unknown-only sources zero or partial-byte sources exact percentages', () => {+ const point: BackupActivityPoint = {+ key: '2026-02-13',+ total: 3072,+ counts: { ...emptyCounts(), pbs: 2048, archive: 1024 },+ unknownCounts: { archive: 1, snapshot: 1 },+ };+ const rows = getBackupActivityTooltipRows(point, ['pbs', 'archive', 'snapshot'], 'volume');+ expect(rows.map((row) => row.value)).toEqual(['2.00 KB', '≥ 1.00 KB', 'Unknown size']);+ expect(rows.every((row) => !row.muted)).toBe(true);+ expect(getBackupActivityTooltipRows(point, ['snapshot'], 'count')[0].value).toBe('0');+ });it.each([[0, 'backup', '0 backups'],[1, 'backup', '1 backup'],diff --git a/frontend-modern/src/features/proxmox/proxmoxBackupActivityPresentation.ts b/frontend-modern/src/features/proxmox/proxmoxBackupActivityPresentation.tsindex 0f8744c891..a2216210e4 100644--- a/frontend-modern/src/features/proxmox/proxmoxBackupActivityPresentation.ts+++ b/frontend-modern/src/features/proxmox/proxmoxBackupActivityPresentation.ts@@ -69,6 +69,12 @@ export interface BackupActivityPoint {key: string;total: number;counts: Record<BackupActivitySegmentKind, number>;+ /** In-window completed entries without a positive finite metric value. Not zero volume. */+ unknownCounts?: Partial<Record<BackupActivitySegmentKind, number>>;+}++export function getBackupActivityUnknownCount(point: BackupActivityPoint): number {+ return Object.values(point.unknownCounts ?? {}).reduce((sum, count) => sum + count, 0);}export interface BackupActivityTimeline {@@ -121,7 +127,11 @@ export function buildBackupActivityTimeline<T>(const kind = classify(item);if (!kind) continue;const value = getValue(item);- if (!Number.isFinite(value) || value <= 0) continue;+ if (!Number.isFinite(value) || value <= 0) {+ bucket.unknownCounts ??= {};+ bucket.unknownCounts[kind] = (bucket.unknownCounts[kind] ?? 0) + 1;+ continue;+ }bucket.counts[kind] += value;bucket.total += value;}@@ -160,15 +170,25 @@ export function getBackupActivityTooltipRows(return kinds.map((kind) => {const presentation = SEGMENT_PRESENTATION[kind];const count = Math.max(0, point.counts[kind] ?? 0);+ const unknown = mode === 'volume' ? (point.unknownCounts?.[kind] ?? 0) : 0;const percentage = total > 0 && count > 0 ? Math.round((count / total) * 100) : 0;const formatted = formatActivityValue(count, mode);return {kind,label: presentation.label,count,- value: percentage > 0 && kinds.length > 1 ? `${formatted} (${percentage}%)` : formatted,+ value:+ unknown > 0+ ? count > 0+ ? `≥ ${formatted}`+ : 'Unknown size'+ : percentage > 0 &&+ kinds.length > 1 &&+ !(mode === 'volume' && getBackupActivityUnknownCount(point) > 0)+ ? `${formatted} (${percentage}%)`+ : formatted,segmentClassName: presentation.segmentClassName,- muted: count === 0,+ muted: count === 0 && unknown === 0,};});}@@ -177,8 +197,13 @@ export function getBackupActivityPointTotalLabel(total: number,noun: BackupActivityNoun,mode: BackupActivityMetricMode = 'count',+ unknownCount = 0,): string {if (mode === 'volume') {+ if (unknownCount > 0) {+ const unknown = `${unknownCount} ${unknownCount === 1 ? 'size' : 'sizes'} unknown`;+ return total > 0 ? `${formatBytes(total)} known; ${unknown}` : unknown;+ }return formatBytes(Math.max(0, total));}const normalized = Math.max(0, Math.round(total));@@ -192,8 +217,9 @@ export function getBackupActivityColumnAriaLabel(selected: boolean,noun: BackupActivityNoun,mode: BackupActivityMetricMode = 'count',+ unknownCount = 0,): string {- const countLabel = getBackupActivityPointTotalLabel(total, noun, mode);+ const countLabel = getBackupActivityPointTotalLabel(total, noun, mode, unknownCount);return selected ? `${dateLabel}: ${countLabel}, selected` : `${dateLabel}: ${countLabel}`;}