## Summary - replace the static Inventory Coverage HTML tables with a Filament native searchable, sortable, filterable table on the existing tenant page - normalize supported policy types and foundations into one runtime dataset while preserving centralized badge semantics and the documented read-only action-surface exemption - add the full spec kit artifact set for feature 124 and focused Pest coverage for rendering, search, sort, filters, empty state, and regression-sensitive page copy ## Testing - `vendor/bin/sail bin pint --dirty --format agent` - `vendor/bin/sail artisan test --compact tests/Feature/Filament/InventoryCoverageTableTest.php tests/Feature/Filament/InventoryPagesTest.php tests/Feature/Filament/InventoryHubDbOnlyTest.php` ## Filament Notes - Livewire v4.0+ compliance: yes, this uses Filament v5 table APIs on the existing page and does not introduce any Livewire v3 patterns - Provider registration: unchanged; Laravel 11+ provider registration remains in `bootstrap/providers.php` - Globally searchable resources: none changed in this feature; no Resource global-search behavior was added or modified - Destructive actions: none; the page remains read-only and only exposes a non-destructive clear-filters empty-state action - Asset strategy: no new panel or shared assets were added, so no `filament:assets` deployment change is required for this feature - Testing plan delivered: focused Filament/Pest coverage for the page table surface plus existing page-load regressions ## Follow-up - Manual dark-mode and badge-regression QA from task `T018` is still pending and should be completed before merge if that check remains mandatory in your review flow. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #151
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.