## Summary - standardize filter UX across key Filament resources with shared thin filter helpers for centralized option sourcing and archived/date-range presets - add persistence, essential filters, and OperationCatalog-aligned labels across the targeted resource tables - add and extend focused Pest coverage for guards, persistence, filter behavior, scope safety, and the new Spec 126 planning artifacts ## Spec 126 - add the full Spec 126 artifact set under `specs/126-filter-ux-standardization/` - align spec, plan, research, data model, quickstart, contract, checklist, and tasks for implementation readiness ## Validation - `vendor/bin/sail bin pint --dirty --format agent` - `vendor/bin/sail artisan test --compact tests/Feature/Guards/FilamentTableStandardsGuardTest.php tests/Feature/Filament/TableStatePersistenceTest.php tests/Feature/Findings/FindingsListFiltersTest.php tests/Feature/Findings/FindingsListDefaultsTest.php tests/Feature/Alerts/AlertDeliveryDeepLinkFiltersTest.php tests/Feature/Filament/Alerts/AlertDeliveryViewerTest.php tests/Feature/Filament/OperationRunListFiltersTest.php tests/Feature/Filament/PolicyVersionListFiltersTest.php tests/Feature/Filament/RestoreRunListFiltersTest.php tests/Feature/Filament/InventoryItemListFiltersTest.php tests/Feature/Filament/BaselineProfileListFiltersTest.php tests/Feature/ProviderConnections/TenantFilterOverrideTest.php tests/Feature/Rbac/InventoryItemResourceAuthorizationTest.php tests/Feature/Filament/BaselineTenantAssignmentsRelationManagerTest.php` ## Notes - no new OperationRun lifecycle or operational workflow behavior is introduced; only existing OperationRun table filter-label alignment and related coverage are in scope - existing authorization and action-surface semantics remain unchanged Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #154
3.1 KiB
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
- 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.
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
- 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.
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.