Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix Proxmox backup saved views

rcourtman2402858e3c80
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index dd3fee4aac..9c3b8f0424 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -3919,6 +3919,13 @@ to `StandalonePageSurface`, and supplies the `standalone-machines` saved-view
scope to `AgentsMachinesTable`; it must not mix a local search signal with a
route-owned status facet or issue consecutive route writes that can resurrect
one cleared parameter.
+The Proxmox Backups surface follows the same saved-view boundary with
+`PROXMOX_BACKUPS_QUERY_PARAMS`: search, workspace, scope, per-workspace facet,
+and selected activity day are all route-owned before `savedViewsKey` is set.
+Its feature owner may clear incompatible hidden facets when the workspace
+changes and may preserve that workspace during a composite reset, but the
+shared `FilterBar` remains the sole owner of Saved, Clear, filter-menu, and
+popover chrome across desktop and narrow layouts.
Because that popover combines view application, default selection, removal,
and an inline naming form, it is a labelled non-modal dialog rather than an
ARIA menu. Its trigger exposes the dialog relationship, Escape returns focus
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 7ca74da1f9..ef0ed1afaf 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -432,6 +432,16 @@ meaningful for the backup-health row, while dense integer count presentation
belongs to `frontend-primitives`: backup count cells must compose
`PlatformTableNumberValue` with `formatPlatformTableIntegerValue` instead of
reintroducing local `toLocaleString()` formatting.
+The Proxmox Backups toolbar is durable recovery navigation, not transient
+component state. Search, active workspace, node, guest type, source, posture,
+and selected activity day use the canonical `PROXMOX_BACKUPS_QUERY_PARAMS`
+keys in `frontend-modern/src/routing/resourceLinks.ts` so reloads, shared links,
+and `proxmox-backups` saved views restore the same result set. Switching to
+`By date` clears the hidden coverage posture; switching to `Coverage` clears
+the hidden source and selected day in the same route write. Contextual
+`Clear filters` clears every narrowing parameter in one write while retaining
+the active workspace, so a reset cannot resurrect an earlier filter or move
+the operator to a different recovery workflow.
PBS server/datastore utilization follows the same split: storage/recovery owns
which datastore usage percentage is meaningful for backup-health risk, while
frontend-primitives owns one-decimal percent presentation through
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 5cc63dd7f0..d9d7d6dccc 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -1230,6 +1230,12 @@ AI-only summary payloads, or page-local heuristics.
set. Those query parameters must only narrow the already-owned agent
projection; they must not cause provider nodes or availability endpoints to
enter the Machines membership bucket.
+ `PROXMOX_BACKUPS_QUERY_PARAMS` in the same shared route-helper module is
+ storage/recovery-owned filter and workspace state for the Proxmox Backups
+ surface. Its query, view, node, type, source, posture, and day keys may
+ narrow already-correlated backup rows, but they do not add unified-resource
+ membership, change canonical workload identity, or turn recovery evidence
+ into a provider-resource projection.
The default tab for each platform path must point at a sub-tab whose
canonical unified-resource projection actually populates, and visible
workflow subtabs must stay evidence-gated by the same canonical row or
diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.json
index 42ae8c6ffe..0af7f58e9c 100644
--- a/frontend-modern/browser-verification.json
+++ b/frontend-modern/browser-verification.json
@@ -1,27 +1,21 @@
{
"version": 1,
- "base_sha": "d755c61f6a6c90b12cb662930ee8aee465cb9c1a",
- "verified_at": "2026-08-03T10:24:03Z",
+ "base_sha": "59eb6dd68f3f1f7ac58639c2b82099eb076c14bc",
+ "verified_at": "2026-08-03T10:53:05Z",
"result": "passed",
"changed_paths": [
- "frontend-modern/src/components/shared/FilterBar/FilterBar.tsx",
- "frontend-modern/src/features/standalone/AgentsMachinesTable.tsx",
- "frontend-modern/src/features/standalone/StandalonePageSurface.tsx",
+ "frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx",
"frontend-modern/src/routing/resourceLinks.ts"
],
"content_sha256": {
- "frontend-modern/src/components/shared/FilterBar/FilterBar.tsx": "e76b316e4335792819ddb3148f819618d342716da0f7e1cde5c3e3cb7eb52682",
- "frontend-modern/src/features/standalone/AgentsMachinesTable.tsx": "f3b12c4ad25647e28fa616893a9befe3fce7419b76cf142ea74bed3bdf15ffa6",
- "frontend-modern/src/features/standalone/StandalonePageSurface.tsx": "ead97d3c4f3554e6e5722ccef2e800562c54032130649b19538dc87229c7cde6",
- "frontend-modern/src/routing/resourceLinks.ts": "66d0ba02bbe31d0e840b933f8f47e80b1f05aa778e5e34127f3385339edc381e"
+ "frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx": "6c838d09098ea243c8368753ef0f00c80cf11b59c7cbcd5f62750bba75fbafb2",
+ "frontend-modern/src/routing/resourceLinks.ts": "c57c920355766f401923340b746614e02b6e6a40fbd871bfd3be47611d952e93"
},
- "routes": [
- "/standalone/machines"
- ],
+ "routes": ["/proxmox/backups"],
"viewports": [
{
"width": 1280,
- "height": 900
+ "height": 720
},
{
"width": 390,
@@ -29,22 +23,21 @@
}
],
"states": [
- "Desktop Machines toolbar with matching Saved and View triggers in the default state",
- "Desktop Machines filtered by URL-backed search and Healthy status with one matching row",
- "Saved view menu empty, named-view, default-view, and removed-view states",
- "Phone-width Machines toolbar collapsed and expanded with an active filter count",
- "Phone-width expanded action rail with Saved, Clear filters, and View kept together while the result count wraps separately",
- "Phone-width Saved views and View preferences popovers, including the expanded Columns disclosure"
+ "Desktop Proxmox Backups default Coverage workspace with Posture filtering",
+ "Desktop By date workspace with URL-backed search and PBS snapshots source filtering",
+ "Desktop Saved views empty, named-view, restored-view, and removed-view states",
+ "Phone-width filter shell collapsed and expanded in Coverage and By date workspaces",
+ "Phone-width Saved views dialog bounded within the viewport with active filter state"
],
"interactions": [
- "Entered Apollo search text, selected Healthy, and confirmed the route became ?q=Apollo&status=online",
- "Saved the filtered slice as Apollo healthy, applied it after clearing, set it as the default, and confirmed a fresh landing restored both URL parameters",
- "Loaded an explicit ?q=Meridian deep link and confirmed the default saved view did not override it",
- "Cleared the combined search and status state and confirmed one navigation returned the route to /standalone/machines without resurrecting q",
- "Expanded the phone-width filter shell and confirmed Saved, Clear filters, and View remain on one line with no horizontal document overflow",
- "Opened Saved, switched directly to View, expanded Columns, dismissed View by outside click, and verified the panels stayed viewport-bounded",
- "Dismissed the Saved naming prompt and menu with Escape and confirmed focus returned first to the save action and then to the Saved trigger",
- "Removed the temporary saved view and repeated the final desktop and phone-width layout, reset, overflow, and console checks",
- "Read the browser console after the final responsive interaction pass and confirmed no warnings or errors"
+ "Switched from Coverage to By date and confirmed the incompatible posture parameter was removed in the same navigation",
+ "Entered backup-vault search text, selected PBS snapshots, and confirmed the route became ?view=date&q=backup-vault&source=pbs",
+ "Saved the filtered slice as Backup URL audit, cleared it, reapplied it, and confirmed the exact query string and visible controls were restored",
+ "Reloaded the explicit deep link and confirmed search and source state remained selected",
+ "Cleared the combined filter state and confirmed one navigation retained ?view=date while removing every narrowing parameter",
+ "Removed the temporary saved view and confirmed the Saved count returned to zero",
+ "Expanded the phone-width filter shell, selected Unknown posture, switched to By date, and confirmed hidden posture state did not survive",
+ "Opened and dismissed the phone-width Saved dialog with Escape and confirmed it stayed viewport-bounded without document overflow",
+ "Read both browser consoles after the final responsive pass and confirmed no warnings or errors"
]
}
diff --git a/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx
index 99d7592b40..a9fc34d8fa 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxBackupsTable.tsx
@@ -7,6 +7,7 @@ import { FilterBar, type FilterDef, type FilterSelectOption } from '@/components
import { FilterSegmentedControl } from '@/components/shared/FilterToolbar';
import { useBreakpoint } from '@/hooks/useBreakpoint';
import { useProtectionPostures } from '@/hooks/useProtectionPostures';
+import { PROXMOX_BACKUPS_QUERY_PARAMS } from '@/routing/resourceLinks';
import { apiFetch } from '@/utils/apiClient';
import {
PlatformErrorState,
@@ -103,17 +104,65 @@ export const ProxmoxBackupsTable: Component<{
(props.workloads ?? []).map((workload) => workload.id),
);
- // Structured scope filters (node, type) live in the URL so the view is
- // shareable, survives reload, and can be captured by FilterBar saved views.
- // Search, the view toggle, and status facets stay ephemeral signals.
+ // Saved views persist the current route query, so every filter and the active
+ // backup workspace must share one URL owner. View changes also clear the
+ // incompatible per-view facet in the same navigation so hidden Posture,
+ // Source, or day filters cannot survive behind the other workspace.
const [searchParams, setSearchParams] = useSearchParams();
- const [search, setSearch] = createSignal('');
- const [selectedView, setSelectedView] = createSignal<BackupView | null>(null);
- const [coverageFilter, setCoverageFilter] = createSignal<CoverageFilterValue>('all');
- const [recoverableFilter, setRecoverableFilter] = createSignal<RecoverableFilterValue>('all');
+ const queryValue = (key: string): string => {
+ const value = searchParams[key];
+ return typeof value === 'string' ? value : '';
+ };
+ const search = (): string => queryValue(PROXMOX_BACKUPS_QUERY_PARAMS.query);
+ const setSearch = (value: string): void =>
+ setSearchParams({ [PROXMOX_BACKUPS_QUERY_PARAMS.query]: value || null }, { replace: true });
+ const selectedView = (): BackupView | null => {
+ const value = queryValue(PROXMOX_BACKUPS_QUERY_PARAMS.view);
+ return value === 'date' || value === 'coverage' ? value : null;
+ };
+ const coverageFilter = (): CoverageFilterValue => {
+ const value = queryValue(PROXMOX_BACKUPS_QUERY_PARAMS.posture);
+ return value === 'attention' ||
+ value === 'protected' ||
+ value === 'unprotected' ||
+ value === 'unknown'
+ ? value
+ : 'all';
+ };
+ const setCoverageFilter = (value: CoverageFilterValue): void =>
+ setSearchParams(
+ {
+ [PROXMOX_BACKUPS_QUERY_PARAMS.posture]: value === 'all' ? null : value,
+ },
+ { replace: true },
+ );
+ const recoverableFilter = (): RecoverableFilterValue => {
+ const value = queryValue(PROXMOX_BACKUPS_QUERY_PARAMS.source);
+ return value === 'pbs' ||
+ value === 'archive' ||
+ value === 'snapshot' ||
+ value === 'verified' ||
+ value === 'unverified'
+ ? value
+ : 'all';
+ };
+ const setRecoverableFilter = (value: RecoverableFilterValue): void =>
+ setSearchParams(
+ {
+ [PROXMOX_BACKUPS_QUERY_PARAMS.source]: value === 'all' ? null : value,
+ },
+ { replace: true },
+ );
+ const selectedDateKey = (): string | null => {
+ const value = queryValue(PROXMOX_BACKUPS_QUERY_PARAMS.day);
+ return /^\d{4}-\d{2}-\d{2}$/.test(value) ? value : null;
+ };
+ const setSelectedDateKey = (value: string | null): void =>
+ setSearchParams({ [PROXMOX_BACKUPS_QUERY_PARAMS.day]: value || null }, { replace: true });
- const nodeFilter = (): string => (typeof searchParams.node === 'string' ? searchParams.node : '');
- const setNodeFilter = (value: string): void => setSearchParams({ node: value || null });
+ const nodeFilter = (): string => queryValue(PROXMOX_BACKUPS_QUERY_PARAMS.node);
+ const setNodeFilter = (value: string): void =>
+ setSearchParams({ [PROXMOX_BACKUPS_QUERY_PARAMS.node]: value || null }, { replace: true });
const nodeMatches = (node: string | undefined): boolean => {
const selected = nodeFilter();
return !selected || node === selected;
@@ -121,8 +170,9 @@ export const ProxmoxBackupsTable: Component<{
// Type scope normalizes vm/qemu and ct/lxc to a canonical token before
// comparing, since the recovery model keeps PBS-native ct internally.
- const typeFilter = (): string => (typeof searchParams.type === 'string' ? searchParams.type : '');
- const setTypeFilter = (value: string): void => setSearchParams({ type: value || null });
+ const typeFilter = (): string => queryValue(PROXMOX_BACKUPS_QUERY_PARAMS.type);
+ const setTypeFilter = (value: string): void =>
+ setSearchParams({ [PROXMOX_BACKUPS_QUERY_PARAMS.type]: value || null }, { replace: true });
const canonicalGuestType = (raw: string | undefined): string => {
const t = (raw ?? '').toLowerCase();
if (t === 'vm' || t === 'qemu') return 'vm';
@@ -157,7 +207,6 @@ export const ProxmoxBackupsTable: Component<{
'desc',
);
const [chartRange, setChartRange] = createSignal<BackupActivityRangeDays>(30);
- const [selectedDateKey, setSelectedDateKey] = createSignal<string | null>(null);
const [recoverableMetricMode, setRecoverableMetricMode] =
createSignal<BackupActivityMetricMode>('count');
@@ -184,8 +233,7 @@ export const ProxmoxBackupsTable: Component<{
else next.add(key);
return next;
});
- const toggleDay = (key: string) =>
- setSelectedDateKey((current) => (current === key ? null : key));
+ const toggleDay = (key: string) => setSelectedDateKey(selectedDateKey() === key ? null : key);
const pbsArtifacts = createMemo<PBSBackup[]>(() => pbsBackups()?.backups ?? []);
const snapshots = createMemo<GuestSnapshot[]>(() => backups()?.guestSnapshots ?? []);
@@ -311,7 +359,24 @@ export const ProxmoxBackupsTable: Component<{
? 'coverage'
: 'date');
const setView = (next: BackupView): void => {
- setSelectedView(next);
+ if (next === 'date') {
+ setSearchParams(
+ {
+ [PROXMOX_BACKUPS_QUERY_PARAMS.view]: next,
+ [PROXMOX_BACKUPS_QUERY_PARAMS.posture]: null,
+ },
+ { replace: true },
+ );
+ return;
+ }
+ setSearchParams(
+ {
+ [PROXMOX_BACKUPS_QUERY_PARAMS.view]: next,
+ [PROXMOX_BACKUPS_QUERY_PARAMS.source]: null,
+ [PROXMOX_BACKUPS_QUERY_PARAMS.day]: null,
+ },
+ { replace: true },
+ );
};
// Recoverable artifact feed: PBS snapshots, PVE backup files, and guest snapshot rows.
@@ -447,6 +512,27 @@ export const ProxmoxBackupsTable: Component<{
}
return filters;
};
+ const hasActiveBackupsFilters = (): boolean =>
+ Boolean(
+ search().trim() ||
+ nodeFilter() ||
+ typeFilter() ||
+ coverageFilter() !== 'all' ||
+ recoverableFilter() !== 'all' ||
+ selectedDateKey(),
+ );
+ const resetBackupsFilters = (): void =>
+ setSearchParams(
+ {
+ [PROXMOX_BACKUPS_QUERY_PARAMS.query]: null,
+ [PROXMOX_BACKUPS_QUERY_PARAMS.node]: null,
+ [PROXMOX_BACKUPS_QUERY_PARAMS.type]: null,
+ [PROXMOX_BACKUPS_QUERY_PARAMS.source]: null,
+ [PROXMOX_BACKUPS_QUERY_PARAMS.posture]: null,
+ [PROXMOX_BACKUPS_QUERY_PARAMS.day]: null,
+ },
+ { replace: true },
+ );
return (
<Show
@@ -613,6 +699,8 @@ export const ProxmoxBackupsTable: Component<{
}}
filters={buildBackupsFilters()}
savedViewsKey="proxmox-backups"
+ showClearAll={hasActiveBackupsFilters}
+ onClearAll={resetBackupsFilters}
searchTrailing={
<Show when={view() === 'date' && selectedDateKey() !== null}>
<button
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx
index c1d09de014..986907d7b5 100644
--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx
@@ -1,4 +1,4 @@
-import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';
+import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';
import { Route, Router } from '@solidjs/router';
import type { JSX } from 'solid-js';
import { afterEach, describe, expect, it, vi } from 'vitest';
@@ -196,6 +196,7 @@ const expectCanonicalPlatformTableShell = (table: HTMLElement): void => {
afterEach(() => {
cleanup();
+ window.history.replaceState({}, '', '/');
apiFetchMock.mockReset();
apiFetchJSONMock.mockReset();
});
@@ -288,6 +289,75 @@ describe('ProxmoxBackupsTable', () => {
expect(screen.queryByRole('button', { name: /pbs artifacts/i })).not.toBeInTheDocument();
});
+ it('hydrates the complete saved-view filter state from the URL and clears it atomically', async () => {
+ mockBackupAPIs();
+ window.history.replaceState(
+ {},
+ '',
+ '/?view=date&q=pbs-docker&source=pbs&node=pve-a&type=ct&day=2026-05-25',
+ );
+
+ renderInRouter(() => (
+ <ProxmoxBackupsTable emptyIcon={<span />} workloads={[workloadResource]} />
+ ));
+
+ await screen.findAllByText('pbs-docker');
+ expect(screen.getByRole('button', { name: /by date/i })).toHaveAttribute(
+ 'aria-pressed',
+ 'true',
+ );
+ expect(screen.getByPlaceholderText(/search backups by workload/i)).toHaveValue('pbs-docker');
+ expect(screen.getByRole('button', { name: /pbs snapshots/i })).toHaveAttribute(
+ 'aria-pressed',
+ 'true',
+ );
+ expect(screen.getByRole('button', { name: /clear date filter/i })).toBeInTheDocument();
+
+ await fireEvent.click(screen.getByRole('button', { name: /clear filters/i }));
+
+ await waitFor(() => {
+ const params = new URLSearchParams(window.location.search);
+ expect(params.get('view')).toBe('date');
+ expect(params.get('q')).toBeNull();
+ expect(params.get('source')).toBeNull();
+ expect(params.get('node')).toBeNull();
+ expect(params.get('type')).toBeNull();
+ expect(params.get('day')).toBeNull();
+ });
+ expect(screen.getByPlaceholderText(/search backups by workload/i)).toHaveValue('');
+ });
+
+ it('clears incompatible URL facets when switching backup views', async () => {
+ mockBackupAPIs();
+ window.history.replaceState({}, '', '/?view=date&source=pbs&day=2026-05-25');
+
+ renderInRouter(() => (
+ <ProxmoxBackupsTable emptyIcon={<span />} workloads={[workloadResource]} />
+ ));
+
+ await screen.findAllByText('pbs-docker');
+ await fireEvent.click(screen.getByRole('button', { name: /coverage/i }));
+
+ await waitFor(() => {
+ const params = new URLSearchParams(window.location.search);
+ expect(params.get('view')).toBe('coverage');
+ expect(params.get('source')).toBeNull();
+ expect(params.get('day')).toBeNull();
+ });
+
+ await fireEvent.click(screen.getByRole('button', { name: /^protected$/i }));
+ await waitFor(() =>
+ expect(new URLSearchParams(window.location.search).get('posture')).toBe('protected'),
+ );
+
+ await fireEvent.click(screen.getByRole('button', { name: /by date/i }));
+ await waitFor(() => {
+ const params = new URLSearchParams(window.location.search);
+ expect(params.get('view')).toBe('date');
+ expect(params.get('posture')).toBeNull();
+ });
+ });
+
it('switches to Coverage showing posture, and keeps per-source evidence in the row expansion', async () => {
mockBackupAPIs();
diff --git a/frontend-modern/src/routing/__tests__/resourceLinks.test.ts b/frontend-modern/src/routing/__tests__/resourceLinks.test.ts
index ee6f91f415..2e242fe71b 100644
--- a/frontend-modern/src/routing/__tests__/resourceLinks.test.ts
+++ b/frontend-modern/src/routing/__tests__/resourceLinks.test.ts
@@ -34,6 +34,7 @@ import {
SETTINGS_PULSE_INTELLIGENCE_DISCOVERY_PATH,
SETTINGS_PULSE_INTELLIGENCE_PATH,
isExternalAgentSetupHash,
+ PROXMOX_BACKUPS_QUERY_PARAMS,
PROXMOX_DEFAULT_TAB,
PROXMOX_PATH,
RECOVERY_QUERY_PARAMS,
@@ -161,6 +162,15 @@ describe('resource link routing contract', () => {
it('builds canonical Proxmox platform tab paths', () => {
expect(PROXMOX_PATH).toBe('/proxmox');
expect(PROXMOX_DEFAULT_TAB).toBe('overview');
+ expect(PROXMOX_BACKUPS_QUERY_PARAMS).toEqual({
+ query: 'q',
+ view: 'view',
+ node: 'node',
+ type: 'type',
+ source: 'source',
+ posture: 'posture',
+ day: 'day',
+ });
expect(buildProxmoxPath()).toBe('/proxmox/overview');
expect(buildProxmoxPath('/storage/')).toBe('/proxmox/storage');
expect(buildProxmoxPath('')).toBe('/proxmox');
diff --git a/frontend-modern/src/routing/resourceLinks.ts b/frontend-modern/src/routing/resourceLinks.ts
index 3f517aae62..832afc2839 100644
--- a/frontend-modern/src/routing/resourceLinks.ts
+++ b/frontend-modern/src/routing/resourceLinks.ts
@@ -24,6 +24,15 @@ export const STANDALONE_QUERY_PARAMS = {
} as const;
export const PROXMOX_PATH = '/proxmox';
export const PROXMOX_DEFAULT_TAB = 'overview';
+export const PROXMOX_BACKUPS_QUERY_PARAMS = {
+ query: 'q',
+ view: 'view',
+ node: 'node',
+ type: 'type',
+ source: 'source',
+ posture: 'posture',
+ day: 'day',
+} as const;
export const DOCKER_PATH = '/docker';
export const DOCKER_DEFAULT_TAB = 'overview';
export const KUBERNETES_PATH = '/kubernetes';