TenantAtlas/specs/126-filter-ux-standardization/quickstart.md
2026-03-09 07:25:40 +01:00

3.1 KiB

Quickstart: Filter UX Standardization

Goal

Bring Tier 1 and Tier 2 Filament resource lists onto a single filter UX standard using native Filament filters, native session persistence, and focused guard coverage.

Foundation Steps

  1. Review the current filter standard and comprehensive audit to confirm the Tier 1 and Tier 2 targets.
  2. Confirm the missing persistence trio on InventoryItemResource, PolicyVersionResource, RestoreRunResource, AlertDeliveryResource, and EntraGroupResource.
  3. Confirm the current central status vocabularies already available through enums, badge catalogs, or tag-badge catalogs.
  4. Confirm OperationRunResource as the reference implementation for the native date-range pattern.
  5. Identify any resource with query-risk filters before extending search or filtering behavior.

First-Wave Implementation Steps

  1. Add persistFiltersInSession(), persistSearchInSession(), and persistSortInSession() to all missing Tier 1 and Tier 2 filtered resource lists.
  2. Extend FilamentTableStandardsGuardTest so Tier 1 and Tier 2 persistence is enforced consistently.
  3. Add essential missing filters to RestoreRunResource, PolicyVersionResource, InventoryItemResource, FindingResource, AlertDeliveryResource, and BaselineProfileResource.
  4. Reuse the native OperationRunResource date-range shape for new date-range filters and ensure indicateUsing() is present.
  5. Normalize soft-delete behavior to the existing Archived/Active/All pattern on every in-scope soft-deletable resource list.
  6. Replace prioritized local status arrays with centralized option sources backed by the thin shared helper layer where needed.
  7. Keep domain-specific filter intent resource-local while using the thin shared helper layer only for repeated mechanical presets.

Verification

Automated

vendor/bin/sail up -d
vendor/bin/sail artisan test --compact tests/Feature/Guards/FilamentTableStandardsGuardTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/TableStatePersistenceTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/Findings
vendor/bin/sail artisan test --compact tests/Feature/Filament/Alerts
vendor/bin/sail bin pint --dirty --format agent

Manual

  1. Narrow an in-scope resource list with search, sort, and filters, refresh the page, and confirm the same state remains.
  2. Navigate away from the same list and return within the session to confirm list-state persistence holds.
  3. Apply each new date-range filter and confirm the indicator summary shows the active window clearly.
  4. Verify Archived, Active, and All semantics on each changed soft-deletable surface.
  5. Verify workspace-scoped monitoring lists and tenant-scoped inventory/governance lists do not reveal records outside the current entitlement boundary.

Rollback

  • Revert the affected resource table() filter definitions and any guard updates that enforce the new standard.
  • Keep the thin shared helper layer mechanically scoped and remove only pieces that stop serving repeated archived, date-range, or centralized-option use cases.
  • No database rollback is required because the feature introduces no schema changes.