2.4 KiB
2.4 KiB
Quickstart: Inventory Coverage Interactive Table
Goal
Upgrade the tenant-scoped Inventory Coverage page from duplicated Blade tables to a Filament-native interactive table while preserving existing coverage semantics.
Implementation Steps
- Update
/Users/ahmeddarrazi/Documents/projects/TenantAtlas/app/Filament/Pages/InventoryCoverage.phpto implement Filament table behavior for custom runtime data. - Normalize supported policy types and foundation types into one runtime dataset with a
segmentfield and source-derived filter option lists. - Define Filament table columns for type, label, category, dependencies, restore mode, risk, and segment context as needed for scanability.
- Add native search on type and label, sorting on the main type or label column, category filtering, and conditional restore-mode filtering.
- Replace the raw table markup in
/Users/ahmeddarrazi/Documents/projects/TenantAtlas/resources/views/filament/pages/inventory-coverage.blade.phpwith a Filament table render plus concise explanatory framing and an explicit zero-results reset CTA. - Add a focused Pest test in
/Users/ahmeddarrazi/Documents/projects/TenantAtlas/tests/Feature/Filament/InventoryCoverageTableTest.phpand keep the existing page-load coverage in/Users/ahmeddarrazi/Documents/projects/TenantAtlas/tests/Feature/Filament/InventoryPagesTest.php.
Verification
Automated
vendor/bin/sail up -d
vendor/bin/sail artisan test --compact tests/Feature/Filament/InventoryCoverageTableTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/InventoryPagesTest.php
vendor/bin/sail bin pint --dirty --format agent
Manual
- Open the tenant-scoped Inventory Coverage page.
- Search for a known policy type and verify non-matching rows disappear.
- Apply a category filter and confirm the dataset narrows correctly.
- If restore metadata exists, apply a restore filter and confirm it narrows correctly.
- Load or simulate a dataset without restore metadata and verify that no restore filter is exposed.
- Toggle dark mode and verify text, badges, filters, and empty states remain readable.
- Compare badge labels, colors, and icons against the previous page semantics.
Rollback
- Revert the page class, Blade view, and test changes for this feature.
- No database rollback or cache invalidation is required because the feature is read-only and runtime-derived.