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.

Lock in that saved views capture the page search query

rcourtman449c02cf29df
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index a438742857..160a7b121d 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -1619,6 +1619,12 @@ describe('shared primitive guardrails', () => {
// Hook is robust to malformed localStorage and SSR.
expect(useSavedViewsSource).toContain("typeof window === 'undefined'");
expect(useSavedViewsSource).toContain('JSON.parse');
+ // saveCurrent must snapshot the full URL search string so saved views
+ // capture every URL-synced state (active filter chips AND the page's
+ // search query, which every page URL-syncs through `?q=...`). A future
+ // refactor that narrows the snapshot to a curated subset would silently
+ // strip search from saved views.
+ expect(useSavedViewsSource).toContain("window.location.search.replace(/^\\?/, '')");
expect(savedViewsMenuSource).toContain("from './useSavedViews';");
expect(savedViewsMenuSource).toContain('aria-label="Saved views"');