4.1 KiB
4.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
- Review the current filter standard and comprehensive audit to confirm the Tier 1 and Tier 2 targets.
- Confirm the missing persistence trio on
InventoryItemResource,PolicyVersionResource,RestoreRunResource,AlertDeliveryResource, andEntraGroupResource. - Confirm the current central status vocabularies already available through enums, badge catalogs, or tag-badge catalogs.
- Confirm
OperationRunResourceas the reference implementation for the native date-range pattern. - Identify any resource with query-risk filters before extending search or filtering behavior.
First-Wave Implementation Steps
- Add
persistFiltersInSession(),persistSearchInSession(), andpersistSortInSession()to all missing Tier 1 and Tier 2 filtered resource lists. - Extend
FilamentTableStandardsGuardTestso Tier 1 and Tier 2 persistence is enforced consistently. - Add essential missing filters to
RestoreRunResource,PolicyVersionResource,InventoryItemResource,FindingResource,AlertDeliveryResource, andBaselineProfileResource. - Reuse the native
OperationRunResourcedate-range shape for new date-range filters and ensureindicateUsing()is present. - Normalize soft-delete behavior to the existing Archived/Active/All pattern on every in-scope soft-deletable resource list.
- Replace prioritized local status arrays with centralized option sources backed by the thin shared helper layer where needed.
- Keep domain-specific filter intent resource-local while using the thin shared helper layer only for repeated mechanical presets.
Approved Follow-up Surfaces
- Add the same persistence and filter treatment to
BaselineSnapshotResourcewhen governance review shows the missing filter gap in daily use. - Add type/restore/platform filtering to
BackupItemsRelationManagerwhen backup reviewers need to isolate specific foundations or RBAC entries inside a backup set. - Keep these follow-ups Filament-native and low-risk; they are extensions of the same standard, not a second filter framework.
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/BaselineSnapshotListFiltersTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/BackupItemsRelationManagerFiltersTest.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
- Narrow an in-scope resource list with search, sort, and filters, refresh the page, and confirm the same state remains.
- Navigate away from the same list and return within the session to confirm list-state persistence holds.
- Apply each new date-range filter and confirm the indicator summary shows the active window clearly.
- Verify Archived, Active, and All semantics on each changed soft-deletable surface.
- Verify workspace-scoped monitoring lists and tenant-scoped inventory/governance lists do not reveal records outside the current entitlement boundary.
- On
Baseline Snapshots, filter by baseline, state, and capture window, then clear the filters and confirm the full workspace-scoped list returns. - Inside a backup set, filter
Itemsby type, restore mode, and platform to isolate RBAC or foundation entries without losing the backup-set scope.
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.