TenantAtlas/specs/124-inventory-coverage-table/quickstart.md
ahmido 3971c315d8 feat: add inventory coverage interactive table (#151)
## 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
2026-03-08 18:33:00 +00:00

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

  1. Update /Users/ahmeddarrazi/Documents/projects/TenantAtlas/app/Filament/Pages/InventoryCoverage.php to implement Filament table behavior for custom runtime data.
  2. Normalize supported policy types and foundation types into one runtime dataset with a segment field and source-derived filter option lists.
  3. Define Filament table columns for type, label, category, dependencies, restore mode, risk, and segment context as needed for scanability.
  4. Add native search on type and label, sorting on the main type or label column, category filtering, and conditional restore-mode filtering.
  5. Replace the raw table markup in /Users/ahmeddarrazi/Documents/projects/TenantAtlas/resources/views/filament/pages/inventory-coverage.blade.php with a Filament table render plus concise explanatory framing and an explicit zero-results reset CTA.
  6. Add a focused Pest test in /Users/ahmeddarrazi/Documents/projects/TenantAtlas/tests/Feature/Filament/InventoryCoverageTableTest.php and 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

  1. Open the tenant-scoped Inventory Coverage page.
  2. Search for a known policy type and verify non-matching rows disappear.
  3. Apply a category filter and confirm the dataset narrows correctly.
  4. If restore metadata exists, apply a restore filter and confirm it narrows correctly.
  5. Load or simulate a dataset without restore metadata and verify that no restore filter is exposed.
  6. Toggle dark mode and verify text, badges, filters, and empty states remain readable.
  7. 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.