Files
pulse/docs/release-control
rcourtman 57acaba142 Add saved views to FilterBar so power users can recall named filter combos
Operators that look at the same filtered slice repeatedly (stopped
containers on a specific cluster, stale backups in last 30 days,
TrueNAS pools needing attention) now save the current filter state as
a named view and recall it with one click.

The view is the page's URL query string at save time, so saved views
double as shareable URLs: copying the bar URL after applying a view
gives someone else the exact filtered state. Storage is per-browser
localStorage under `pulse:filterbar:saved-views:<key>`. Each catalog
opts in by passing `savedViewsKey` to FilterBar:

  Infrastructure: 'infrastructure'
  Workloads: 'workloads'
  Storage: 'storage'
  Recovery Protected items: 'recovery-protected'
  Recovery events: 'recovery-events'

The menu lives next to "+ Filter" on the search row. Empty state
prompts the user to save the active filters; populated state lists
saved views with hover-to-reveal X buttons for delete. The save flow
is a small inline dialog (name input + Save / Cancel) so users never
leave the menu.

The hook (useSavedViews) owns localStorage IO, JSON parse hardening,
and URL navigation through @solidjs/router. The menu (SavedViewsMenu)
owns dropdown chrome and click-outside / Escape lifecycle. WorkloadsFilter
unit tests mock @solidjs/router so the menu can render outside a Router
context in test setup.

Implicit "remember last filters" is intentionally not added: defaulting
to yesterday's `Status: Failed` would hide real problems on a monitoring
page. Recently-used auto-tracking and pinned quick-buttons remain
deferred until we see whether named views is enough.

Subsystem contracts updated to reflect the new primitive and the
per-page opt-ins:
- frontend-primitives.md: adds SavedViewsMenu + useSavedViews to
  Canonical Files; describes the shared saved-views primitive in
  Extension Points.
- performance-and-scalability.md, storage-recovery.md,
  unified-resources.md: note that Workloads / Storage / Recovery /
  Infrastructure each opt into shared saved views by passing
  savedViewsKey.
- Recovery.test.tsx: regression assertion that the events controls
  group renders the Saved views menu trigger (verification artifact
  for the storage-recovery contract change).
2026-05-01 11:13:43 +01:00
..