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
Add saved views to FilterBar so power users can recall named filter combos
rcourtman57acaba1421d
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex a93b218ccf..8608ad702b 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -83,6 +83,8 @@ work extends shared components instead of creating new local variants.57. `frontend-modern/src/components/shared/FilterBar/AddFilterMenu.tsx`58. `frontend-modern/src/components/shared/FilterBar/filterCatalog.ts`59. `frontend-modern/src/components/shared/FilterBar/index.ts`+59a. `frontend-modern/src/components/shared/FilterBar/SavedViewsMenu.tsx`+59b. `frontend-modern/src/components/shared/FilterBar/useSavedViews.ts`56. `frontend-modern/src/components/shared/TypeColumn.guardrails.test.ts`57. `frontend-modern/src/features/`58. `frontend-modern/src/components/SetupWizard/SetupWizard.tsx`@@ -1657,6 +1659,15 @@ Pages that have not yet migrated (the alert-history filter card,Kubernetes deployments drawer) keep using `PageControls` and`LabeledFilterSelect`, but new resource-list filter surfaces should reach for`FilterBar` with a catalog rather than reintroducing a per-page select row.++Pages may opt into saved views by passing `savedViewsKey` to+`FilterBar`. The `useSavedViews` hook owns the localStorage IO + URL+navigation (`pulse:filterbar:saved-views:<key>`); `SavedViewsMenu` owns+the dropdown chrome. A "view" is the page's URL query string at save+time, so saved views double as shareable links: copying the bar URL+after applying a view gives someone else the exact filtered state.+Implicit "remember last filters" is intentionally not added — defaulting+to yesterday's filter state on a monitoring page hides real problems.That same shared filter-toolbar boundary also owns controlled select continuitywhen filter options materialize asynchronously. `LabeledFilterSelect` must keepthe caller-owned `value` visibly selected after option children arrive sodiff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex 56eae83e97..c88f3260c0 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -826,7 +826,9 @@ usage math, threshold-color routing, and fallback handling must extendthrough those owners instead of accreting back into the shell.The Workloads filter now follows that same ownership rule: the shellstays in `frontend-modern/src/components/Workloads/WorkloadsFilter.tsx`, which-composes the shared `FilterBar` chip primitive, while toolbar defaults,+composes the shared `FilterBar` chip primitive (with `savedViewsKey="workloads"`+so operators can save and recall named filter combos through the shared+`SavedViewsMenu`), while toolbar defaults,active-filter counting, and reset semantics live in`frontend-modern/src/components/Workloads/workloadsFilterModel.ts`. The legacy`useWorkloadsFilterState.ts` hook retired with the FilterBar migration; itsdiff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 7dd423fc21..7aa2c23634 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -79,6 +79,11 @@ state.`overflow-x-auto` div around the shared table. Storage pools and physicaldisks inherit the surrounding `StorageContentCard` frame and must not adda nested `Card` or second scroll wrapper.+ Recovery's Protected items and Recovery events sub-tabs each opt into+ shared saved views (`savedViewsKey="recovery-protected"` and+ `"recovery-events"`) so operators can save and recall named filter+ combos through the shared `SavedViewsMenu`. The same pattern applies to+ Storage (`savedViewsKey="storage"`).Recovery event filters now compose the shared chip-based `FilterBar`(`frontend-modern/src/components/shared/FilterBar/FilterBar.tsx`) with a`FilterDef[]` catalog. The legacy "advanced filter popover" retired: scope,diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex d4bdec47c6..7ef6b510e5 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -370,6 +370,10 @@ AI-only summary payloads, or page-local heuristics.may hide or restore the summary section through the shared`ChartVisibilityToggleButton`, but that control must not mutate resourceidentity, table membership, route-backed focus, or summary-hover scope.+ Infrastructure may also opt into the shared saved-views primitive+ (`savedViewsKey="infrastructure"`) so operators can save and recall named+ filter combos through `SavedViewsMenu`; saved views are URL query+ snapshots and must not introduce a parallel resource-identity path.13. Keep infrastructure cluster headers as canonical summary scope. Groupedheaders in `frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsx`must publish cluster scope from the same `ResourceGroup` / unified-resourcediff --git a/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx b/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsxindex 7a1aa4a5e6..6fc0a6c6a3 100644--- a/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx+++ b/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx@@ -342,6 +342,7 @@ export const RecoveryHistorySection: Component<RecoveryHistorySectionProps> = (prole="group"ariaLabel="Recovery events controls"isMobile={isMobileAccessor}+ savedViewsKey="recovery-events"search={{value: props.queryFilter,setValue: (value: string) => {diff --git a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsxindex c16fb8fb47..abb77db26e 100644--- a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx+++ b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx@@ -245,6 +245,7 @@ export const RecoveryProtectedInventorySection: Component<role="group"ariaLabel="Protected items controls"isMobile={isMobileAccessor}+ savedViewsKey="recovery-protected"search={{value: props.queryFilter,setValue: props.setQueryFilter,diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsxindex 486b5c61d9..bb9ae2f3b0 100644--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx@@ -1101,6 +1101,10 @@ describe('Recovery', () => {expect(within(controls).getByRole('button', { name: 'Filter' })).toBeInTheDocument();expect(within(controls).getByRole('button', { name: /columns/i })).toBeInTheDocument();expect(within(controls).getByTestId('recovery-history-item-filter-trigger')).toBeInTheDocument();+ // Recovery events opted into shared saved views — the bookmark menu+ // sits next to "+ Filter" and persists named filter combos under the+ // canonical localStorage key.+ expect(within(controls).getByRole('button', { name: 'Saved views' })).toBeInTheDocument();});it('lets operators create and clear the item filter from the recovery events controls', async () => {diff --git a/frontend-modern/src/components/Storage/StoragePageControls.tsx b/frontend-modern/src/components/Storage/StoragePageControls.tsxindex 30235e7c27..5b870c7b92 100644--- a/frontend-modern/src/components/Storage/StoragePageControls.tsx+++ b/frontend-modern/src/components/Storage/StoragePageControls.tsx@@ -230,6 +230,7 @@ export const StoragePageControls: Component<StoragePageControlsProps> = (props)role="group"ariaLabel="Storage filters"isMobile={isMobile}+ savedViewsKey="storage"search={{value: props.search,setValue: props.setSearch,diff --git a/frontend-modern/src/components/Workloads/WorkloadsFilter.tsx b/frontend-modern/src/components/Workloads/WorkloadsFilter.tsxindex 02a286bc53..524b97ce39 100644--- a/frontend-modern/src/components/Workloads/WorkloadsFilter.tsx+++ b/frontend-modern/src/components/Workloads/WorkloadsFilter.tsx@@ -142,6 +142,7 @@ export const WorkloadsFilter: Component<WorkloadsFilterProps> = (props) => {role="group"ariaLabel="Workloads filters"isMobile={isMobile}+ savedViewsKey="workloads"search={{value: props.search,setValue: props.setSearch,diff --git a/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx b/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsxindex ac166ac34c..969027d688 100644--- a/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx+++ b/frontend-modern/src/components/Workloads/__tests__/WorkloadsFilter.test.tsx@@ -21,6 +21,13 @@ vi.mock('@/hooks/useBreakpoint', () => ({}),}));+// Mock @solidjs/router so the saved-views menu can call useNavigate /+// useLocation outside a Router context. The tests don't exercise navigation.+vi.mock('@solidjs/router', () => ({+ useNavigate: () => () => undefined,+ useLocation: () => ({ pathname: '/workloads', search: '', hash: '', state: null, query: {} }),+}));+vi.mock('@/components/shared/SearchInput', () => ({SearchInput: (props: {value: () => string;diff --git a/frontend-modern/src/components/shared/FilterBar/FilterBar.tsx b/frontend-modern/src/components/shared/FilterBar/FilterBar.tsxindex 22c64598de..fd671dbe92 100644--- a/frontend-modern/src/components/shared/FilterBar/FilterBar.tsx+++ b/frontend-modern/src/components/shared/FilterBar/FilterBar.tsx@@ -4,6 +4,7 @@ import { FilterMobileToggleButton } from '@/components/shared/FilterToolbar';import { SearchInput } from '@/components/shared/SearchInput';import { AddFilterMenu } from './AddFilterMenu';import { FilterChip } from './FilterChip';+import { SavedViewsMenu } from './SavedViewsMenu';import {clearFilter,isFilterSet,@@ -64,6 +65,9 @@ export const FilterBar: Component<FilterBarProps> = (props) => {{props.searchTrailing}<Show when={!props.isMobile()}><AddFilterMenu filters={props.filters} />+ <Show when={props.savedViewsKey}>+ {(key) => <SavedViewsMenu storageKey={key()} />}+ </Show><Show when={props.viewOptionsTrailing}><divaria-hidden="true"diff --git a/frontend-modern/src/components/shared/FilterBar/SavedViewsMenu.tsx b/frontend-modern/src/components/shared/FilterBar/SavedViewsMenu.tsxnew file mode 100644index 0000000000..44fda4a920--- /dev/null+++ b/frontend-modern/src/components/shared/FilterBar/SavedViewsMenu.tsx@@ -0,0 +1,189 @@+import { Component, For, Show, createEffect, createSignal, onCleanup } from 'solid-js';+import BookmarkIcon from 'lucide-solid/icons/bookmark';+import PlusIcon from 'lucide-solid/icons/plus';+import XIcon from 'lucide-solid/icons/x';+import { useSavedViews, type SavedView } from './useSavedViews';++interface SavedViewsMenuProps {+ storageKey: string;+}++export const SavedViewsMenu: Component<SavedViewsMenuProps> = (props) => {+ const { views, saveCurrent, removeView, applyView } = useSavedViews(props.storageKey);+ const [open, setOpen] = createSignal(false);+ const [savePromptOpen, setSavePromptOpen] = createSignal(false);+ const [name, setName] = createSignal('');+ let containerRef: HTMLDivElement | undefined;+ let nameInputRef: HTMLInputElement | undefined;++ const close = () => {+ setOpen(false);+ setSavePromptOpen(false);+ setName('');+ };++ const handleClickOutside = (event: MouseEvent) => {+ if (containerRef && !containerRef.contains(event.target as Node)) {+ close();+ }+ };++ const handleEscape = (event: KeyboardEvent) => {+ if (event.key !== 'Escape') return;+ if (savePromptOpen()) {+ setSavePromptOpen(false);+ setName('');+ return;+ }+ close();+ };++ createEffect(() => {+ if (!open()) return;+ document.addEventListener('mousedown', handleClickOutside);+ document.addEventListener('keydown', handleEscape);+ onCleanup(() => {+ document.removeEventListener('mousedown', handleClickOutside);+ document.removeEventListener('keydown', handleEscape);+ });+ });++ // Auto-focus the name input when entering save mode so the user can type+ // immediately after clicking "Save current view as...".+ createEffect(() => {+ if (savePromptOpen()) {+ queueMicrotask(() => nameInputRef?.focus());+ }+ });++ const submitSave = () => {+ const view = saveCurrent(name());+ if (view) close();+ };++ const handleApply = (view: SavedView) => {+ applyView(view);+ close();+ };++ return (+ <div ref={containerRef} class="relative inline-flex">+ <button+ type="button"+ onClick={() => setOpen((value) => !value)}+ aria-haspopup="menu"+ aria-expanded={open()}+ aria-label="Saved views"+ class="inline-flex items-center gap-1 rounded-md border border-border px-2 py-0.5 text-xs text-muted transition-colors hover:bg-surface-hover hover:text-base-content"+ >+ <BookmarkIcon class="h-3 w-3" />+ Saved+ <Show when={views().length > 0}>+ <span class="ml-0.5 rounded-full bg-surface-hover px-1.5 py-px text-[10px] font-medium text-base-content">+ {views().length}+ </span>+ </Show>+ </button>++ <Show when={open()}>+ <div+ role="menu"+ class="absolute right-0 top-[calc(100%+0.25rem)] z-50 w-64 max-w-[calc(100vw-2rem)] rounded-md border border-border bg-surface shadow-lg"+ >+ <Show+ when={savePromptOpen()}+ fallback={+ <>+ <button+ type="button"+ role="menuitem"+ onClick={() => setSavePromptOpen(true)}+ class="flex w-full items-center gap-1.5 border-b border-border-subtle px-3 py-1.5 text-left text-xs text-base-content hover:bg-surface-hover"+ >+ <PlusIcon class="h-3 w-3" />+ Save current view as...+ </button>+ <Show when={views().length === 0}>+ <div class="px-3 py-3 text-xs text-muted">+ No saved views yet. Set the filters you want, then click+ "Save current view as..." to name and recall this slice+ later.+ </div>+ </Show>+ <Show when={views().length > 0}>+ <div class="max-h-64 overflow-y-auto py-1">+ <For each={views()}>+ {(view) => (+ <div class="group flex items-center justify-between gap-1 hover:bg-surface-hover">+ <button+ type="button"+ onClick={() => handleApply(view)}+ class="min-w-0 flex-1 truncate px-3 py-1.5 text-left text-xs text-base-content"+ title={view.name}+ >+ {view.name}+ </button>+ <button+ type="button"+ onClick={(event) => {+ event.stopPropagation();+ removeView(view.id);+ }}+ aria-label={`Remove view "${view.name}"`}+ class="mr-2 rounded-full p-0.5 text-muted opacity-0 transition-opacity hover:bg-surface hover:text-base-content group-hover:opacity-100 focus-visible:opacity-100"+ >+ <XIcon class="h-3 w-3" />+ </button>+ </div>+ )}+ </For>+ </div>+ </Show>+ </>+ }+ >+ <div class="p-3">+ <label class="block text-[10px] font-semibold uppercase tracking-wide text-muted">+ Name this view+ </label>+ <input+ ref={nameInputRef}+ type="text"+ value={name()}+ onInput={(event) => setName(event.currentTarget.value)}+ onKeyDown={(event) => {+ if (event.key === 'Enter') {+ event.preventDefault();+ submitSave();+ }+ }}+ placeholder="Stopped containers, Stale backups..."+ class="mt-1 w-full rounded-md border border-border bg-surface px-2 py-1 text-xs text-base-content outline-none focus:border-blue-500 focus:ring-2 focus:ring-blue-500"+ />+ <div class="mt-2 flex justify-end gap-2">+ <button+ type="button"+ onClick={() => {+ setSavePromptOpen(false);+ setName('');+ }}+ class="rounded-md px-2 py-1 text-xs text-muted hover:text-base-content"+ >+ Cancel+ </button>+ <button+ type="button"+ onClick={submitSave}+ disabled={name().trim() === ''}+ class="rounded-md bg-blue-500 px-2 py-1 text-xs font-medium text-white hover:bg-blue-600 disabled:cursor-not-allowed disabled:opacity-50"+ >+ Save+ </button>+ </div>+ </div>+ </Show>+ </div>+ </Show>+ </div>+ );+};diff --git a/frontend-modern/src/components/shared/FilterBar/filterCatalog.ts b/frontend-modern/src/components/shared/FilterBar/filterCatalog.tsindex bf3dbf0cab..f8b008a1f9 100644--- a/frontend-modern/src/components/shared/FilterBar/filterCatalog.ts+++ b/frontend-modern/src/components/shared/FilterBar/filterCatalog.ts@@ -39,6 +39,13 @@ export interface FilterBarProps {ariaLabel?: string;onClearAll?: () => void;showClearAll?: Accessor<boolean>;+ /**+ * When set, render a "Saved views" menu next to "+ Filter" that persists+ * named filter combinations (URL query strings) to localStorage under+ * `pulse:filterbar:saved-views:<savedViewsKey>`. Pages opt in per surface+ * because the saved-view storage scope follows the page's URL state model.+ */+ savedViewsKey?: string;}export const isFilterSet = (filter: FilterDef): boolean =>diff --git a/frontend-modern/src/components/shared/FilterBar/index.ts b/frontend-modern/src/components/shared/FilterBar/index.tsindex 27f0a97567..7414e36c6b 100644--- a/frontend-modern/src/components/shared/FilterBar/index.ts+++ b/frontend-modern/src/components/shared/FilterBar/index.ts@@ -1,6 +1,9 @@export { FilterBar } from './FilterBar';export { FilterChip } from './FilterChip';export { AddFilterMenu } from './AddFilterMenu';+export { SavedViewsMenu } from './SavedViewsMenu';+export { useSavedViews } from './useSavedViews';+export type { SavedView, UseSavedViewsResult } from './useSavedViews';export {clearFilter,formatFilterChipValue,diff --git a/frontend-modern/src/components/shared/FilterBar/useSavedViews.ts b/frontend-modern/src/components/shared/FilterBar/useSavedViews.tsnew file mode 100644index 0000000000..03ca88894b--- /dev/null+++ b/frontend-modern/src/components/shared/FilterBar/useSavedViews.ts@@ -0,0 +1,97 @@+import { useLocation, useNavigate } from '@solidjs/router';+import { Accessor, createSignal, onMount } from 'solid-js';++export interface SavedView {+ id: string;+ name: string;+ query: string;+ savedAt: number;+}++const STORAGE_PREFIX = 'pulse:filterbar:saved-views:';++const storageKeyFor = (key: string): string => `${STORAGE_PREFIX}${key}`;++const isSavedView = (entry: unknown): entry is SavedView =>+ Boolean(entry) &&+ typeof entry === 'object' &&+ typeof (entry as SavedView).id === 'string' &&+ typeof (entry as SavedView).name === 'string' &&+ typeof (entry as SavedView).query === 'string' &&+ typeof (entry as SavedView).savedAt === 'number';++const readStored = (key: string): SavedView[] => {+ if (typeof window === 'undefined') return [];+ try {+ const raw = window.localStorage.getItem(storageKeyFor(key));+ if (!raw) return [];+ const parsed = JSON.parse(raw);+ if (!Array.isArray(parsed)) return [];+ return parsed.filter(isSavedView);+ } catch {+ return [];+ }+};++const writeStored = (key: string, views: SavedView[]): void => {+ if (typeof window === 'undefined') return;+ try {+ window.localStorage.setItem(storageKeyFor(key), JSON.stringify(views));+ } catch {+ // localStorage full / blocked: ignore so the UI still renders+ }+};++const generateId = (): string => {+ if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {+ return crypto.randomUUID();+ }+ return `view-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;+};++export interface UseSavedViewsResult {+ views: Accessor<SavedView[]>;+ saveCurrent: (name: string) => SavedView | null;+ removeView: (id: string) => void;+ applyView: (view: SavedView) => void;+}++export function useSavedViews(key: string): UseSavedViewsResult {+ const navigate = useNavigate();+ const location = useLocation();+ const [views, setViews] = createSignal<SavedView[]>([]);++ onMount(() => {+ setViews(readStored(key));+ });++ const saveCurrent = (name: string): SavedView | null => {+ const trimmed = name.trim();+ if (trimmed === '') return null;+ const query =+ typeof window !== 'undefined' ? window.location.search.replace(/^\?/, '') : '';+ const view: SavedView = {+ id: generateId(),+ name: trimmed,+ query,+ savedAt: Date.now(),+ };+ const next = [...views(), view];+ setViews(next);+ writeStored(key, next);+ return view;+ };++ const removeView = (id: string): void => {+ const next = views().filter((entry) => entry.id !== id);+ setViews(next);+ writeStored(key, next);+ };++ const applyView = (view: SavedView): void => {+ const path = `${location.pathname}${view.query ? `?${view.query}` : ''}`;+ navigate(path, { replace: false });+ };++ return { views, saveCurrent, removeView, applyView };+}diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.tsindex 167f66b435..a438742857 100644--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts@@ -179,6 +179,8 @@ import filterChipSource from '@/components/shared/FilterBar/FilterChip.tsx?raw';import addFilterMenuSource from '@/components/shared/FilterBar/AddFilterMenu.tsx?raw';import filterCatalogSource from '@/components/shared/FilterBar/filterCatalog.ts?raw';import filterBarIndexSource from '@/components/shared/FilterBar/index.ts?raw';+import savedViewsMenuSource from '@/components/shared/FilterBar/SavedViewsMenu.tsx?raw';+import useSavedViewsSource from '@/components/shared/FilterBar/useSavedViews.ts?raw';import storagePageControlsSource from '@/components/Storage/StoragePageControls.tsx?raw';const sharedSources = import.meta.glob(['./*.tsx', './cards/*.tsx', './responsive/*.tsx'], {@@ -1528,6 +1530,8 @@ describe('shared primitive guardrails', () => {expect(filterBarIndexSource).toContain("export { FilterBar } from './FilterBar';");expect(filterBarIndexSource).toContain("export { FilterChip } from './FilterChip';");expect(filterBarIndexSource).toContain("export { AddFilterMenu } from './AddFilterMenu';");+ expect(filterBarIndexSource).toContain("export { SavedViewsMenu } from './SavedViewsMenu';");+ expect(filterBarIndexSource).toContain("export { useSavedViews } from './useSavedViews';");expect(filterBarIndexSource).toContain('isFilterSet');expect(filterBarIndexSource).toContain('clearFilter');expect(filterBarIndexSource).toContain('formatFilterChipValue');@@ -1600,6 +1604,28 @@ describe('shared primitive guardrails', () => {expect(addFilterMenuSource).toContain('commitActive');expect(addFilterMenuSource).toContain('queueMicrotask(() => searchInputRef?.focus())');+ // Saved views: per-page named filter combos persist to+ // localStorage under `pulse:filterbar:saved-views:<key>`. The hook owns+ // storage IO + URL navigation; the menu owns the dropdown chrome.+ expect(useSavedViewsSource).toContain("import { useLocation, useNavigate } from '@solidjs/router';");+ expect(useSavedViewsSource).toContain("'pulse:filterbar:saved-views:'");+ expect(useSavedViewsSource).toContain('export interface SavedView');+ expect(useSavedViewsSource).toContain('saveCurrent');+ expect(useSavedViewsSource).toContain('removeView');+ expect(useSavedViewsSource).toContain('applyView');+ expect(useSavedViewsSource).toContain('navigate(path,');+ expect(useSavedViewsSource).toContain('writeStored');+ expect(useSavedViewsSource).toContain('readStored');+ // Hook is robust to malformed localStorage and SSR.+ expect(useSavedViewsSource).toContain("typeof window === 'undefined'");+ expect(useSavedViewsSource).toContain('JSON.parse');++ expect(savedViewsMenuSource).toContain("from './useSavedViews';");+ expect(savedViewsMenuSource).toContain('aria-label="Saved views"');+ expect(savedViewsMenuSource).toContain('Save current view as...');+ expect(savedViewsMenuSource).toContain("event.key === 'Enter'");+ expect(savedViewsMenuSource).toContain('queueMicrotask(() => nameInputRef?.focus())');+// FilterBar consumers — each migrated page should declare a catalog of// FilterDef entries rather than rendering the labelled-select row from// PageControls. Guards against regression to the old layout-per-pagediff --git a/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx b/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsxindex 9d16588fa8..ca5282a8a3 100644--- a/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx+++ b/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx@@ -173,6 +173,7 @@ export function InfrastructurePageSurface() {<div data-summary-clear-ignore><FilterBarisMobile={isMobile}+ savedViewsKey="infrastructure"search={{value: searchQuery,setValue: setSearchQuery,