12 KiB
Tasks: Inventory Coverage Interactive Table
Input: Design documents from /specs/124-inventory-coverage-table/
Prerequisites: plan.md (required), spec.md (required for user stories), research.md, data-model.md, contracts/
Tests: Tests are REQUIRED for this runtime behavior change. Pest feature/component coverage must verify table rendering, search, filtering, and regression-sensitive presentation.
Operations: No OperationRun work is required because this feature is read-only and does not introduce long-running, remote, queued, or scheduled behavior.
RBAC: No new authorization behavior is introduced. Existing tenant membership and tenant-view capability checks on the page remain the enforcement path.
Filament UI Action Surfaces: This feature modifies a Filament page and keeps the explicit inspection-affordance exemption documented in the spec because coverage rows are runtime-derived metadata, not first-class records.
Filament UI UX-001: This feature must deliver a native Filament table, an explicit zero-results empty state with exactly one reset CTA, and dark-mode-safe presentation.
Badges: Badge semantics must stay centralized through the existing badge catalogs; no ad-hoc mappings are allowed.
Organization: Tasks are grouped by user story to enable independent implementation and testing of each story.
Phase 1: Setup (Shared Alignment)
Purpose: Confirm implementation boundaries and target files before refactoring the page
- T001 Reconcile the explicit table-surface exemption and page contract in
specs/124-inventory-coverage-table/spec.mdandspecs/124-inventory-coverage-table/contracts/inventory-coverage-page.openapi.yamlagainst the final target filesapp/Filament/Pages/InventoryCoverage.phpandresources/views/filament/pages/inventory-coverage.blade.php - T002 [P] Review existing coverage page and regression-test touchpoints in
app/Filament/Pages/InventoryCoverage.php,resources/views/filament/pages/inventory-coverage.blade.php, andtests/Feature/Filament/InventoryPagesTest.php
Phase 2: Foundational (Blocking Prerequisites)
Purpose: Introduce the shared table infrastructure that all user stories build on
⚠️ CRITICAL: No user story work can begin until this phase is complete
- T003 Refactor
app/Filament/Pages/InventoryCoverage.phpto implementHasTable/InteractsWithTableand build a unified runtime coverage dataset from supported policy types and foundation types - T004 Update
resources/views/filament/pages/inventory-coverage.blade.phpto replace duplicated raw HTML tables with a Filament page shell that renders the native table surface
Checkpoint: Foundation ready - search, filters, and polish can now be added to the shared table surface
Phase 3: User Story 1 - Find Supported Policy Types Quickly (Priority: P1) 🎯 MVP
Goal: Deliver an interactive coverage table that supports first-class rendering, type-name search, and primary-column sorting
Independent Test: Load the Inventory Coverage page as a Livewire table, verify rows render, search by type or label narrows the table correctly, and sorting reorders the main column deterministically
Tests for User Story 1 ⚠️
- T005 [P] [US1] Create table-rendering, search, and sort tests in
tests/Feature/Filament/InventoryCoverageTableTest.php - T006 [P] [US1] Update tenant coverage page-load assertions for the interactive table surface in
tests/Feature/Filament/InventoryPagesTest.php
Implementation for User Story 1
- T007 [US1] Implement searchable and sortable primary columns, default ordering, and custom-data pagination in
app/Filament/Pages/InventoryCoverage.php - T008 [P] [US1] Add first-load table framing and search-oriented summary copy in
resources/views/filament/pages/inventory-coverage.blade.php
Checkpoint: User Story 1 should now provide a credible searchable coverage table that can be demoed independently
Phase 4: User Story 2 - Filter Coverage by Meaningful Dimensions (Priority: P2)
Goal: Add category filtering and conditional restore-mode filtering without changing the current coverage data model
Independent Test: Apply a category filter and verify only matching rows remain; when restore metadata exists, apply a restore filter and verify the filtered result set updates correctly; when restore metadata is absent, verify the restore filter is not exposed
Tests for User Story 2 ⚠️
- T009 [US2] Extend
tests/Feature/Filament/InventoryCoverageTableTest.phpwith category-filter assertions plus deterministic restore-mode-present and restore-mode-absent coverage branches
Implementation for User Story 2
- T010 [US2] Implement source-driven category filter options and conditional restore-mode filter registration in
app/Filament/Pages/InventoryCoverage.php - T011 [P] [US2] Add explicit zero-results empty-state copy and a single reset CTA in
resources/views/filament/pages/inventory-coverage.blade.php
Checkpoint: User Story 2 should now let users narrow coverage by the dimensions called out in the spec without weakening existing semantics
Phase 5: User Story 3 - Present Coverage as a Product-Grade Surface (Priority: P3)
Goal: Preserve badge semantics and upgrade the page presentation so it reads like a finished Filament product surface in light and dark mode
Independent Test: Verify badge labels, colors, icons, and dependency indicators still render from shared semantics; verify the page loads with polished table framing and no dark-mode readability regressions
Tests for User Story 3 ⚠️
- T012 [P] [US3] Extend
tests/Feature/Filament/InventoryCoverageTableTest.phpwith badge and dependency-indicator regression assertions - T013 [P] [US3] Add interactive-surface regression coverage in
tests/Feature/Filament/InventoryPagesTest.phpfor polished page framing and dark-mode-safe markup expectations
Implementation for User Story 3
- T014 [US3] Move type, category, restore, risk, dependency, and segment presentation into Filament table columns in
app/Filament/Pages/InventoryCoverage.phpusing the shared badge catalogs and existing dependency semantics - T015 [P] [US3] Polish
resources/views/filament/pages/inventory-coverage.blade.phpfor enterprise-grade section framing, scannable explanatory copy, and dark-mode-safe spacing around the Filament table
Checkpoint: All user stories should now be independently functional, and the page should read as a finished product surface instead of a raw implementation table
Phase 6: Polish & Cross-Cutting Concerns
Purpose: Validate the complete feature and finish cross-story verification
- T016 [P] Run focused verification from
specs/124-inventory-coverage-table/quickstart.mdwithvendor/bin/sail artisan test --compact tests/Feature/Filament/InventoryCoverageTableTest.phpandvendor/bin/sail artisan test --compact tests/Feature/Filament/InventoryPagesTest.php - T017 Run
vendor/bin/sail bin pint --dirty --format agentafter the page and test changes affectingapp/Filament/Pages/InventoryCoverage.php,resources/views/filament/pages/inventory-coverage.blade.php, andtests/Feature/Filament/ - T018 [P] Complete manual dark-mode QA and badge-regression review using
specs/124-inventory-coverage-table/quickstart.mdand record any follow-up fixes before merge
Dependencies & Execution Order
Phase Dependencies
- Setup (Phase 1): No dependencies - can start immediately
- Foundational (Phase 2): Depends on Setup completion - blocks all user stories
- User Stories (Phases 3-5): Depend on Foundational completion
- Polish (Phase 6): Depends on all desired user stories being complete
User Story Dependencies
- User Story 1 (P1): Starts immediately after Foundational and is the MVP slice
- User Story 2 (P2): Starts after Foundational and reuses the shared table infrastructure from Phase 2
- User Story 3 (P3): Starts after Foundational and layers presentation polish on the same table surface
Within Each User Story
- Tests must be written and fail before implementation changes are considered complete
app/Filament/Pages/InventoryCoverage.phpchanges land before final view polish when a story spans both files- Existing regression coverage in
tests/Feature/Filament/InventoryPagesTest.phpstays green while new story-specific assertions are added
Parallel Opportunities
T001andT002can run in parallel once the branch is readyT005andT006can run in parallel because they touch different test filesT007andT008can run in parallel after Phase 2 because they touch different filesT010andT011can run in parallel afterT009T012andT013can run in parallel because they touch different test filesT014andT015can run in parallel after the test expectations for US3 are establishedT016andT018can run in parallel once implementation is complete
Parallel Example: User Story 1
# Launch both regression updates for the MVP slice together:
Task: "T005 [US1] Create table-rendering, search, and sort tests in tests/Feature/Filament/InventoryCoverageTableTest.php"
Task: "T006 [US1] Update tenant coverage page-load assertions in tests/Feature/Filament/InventoryPagesTest.php"
# After the foundation is in place, split code changes across page class and view:
Task: "T007 [US1] Implement searchable and sortable primary columns in app/Filament/Pages/InventoryCoverage.php"
Task: "T008 [US1] Add first-load table framing and search-oriented summary copy in resources/views/filament/pages/inventory-coverage.blade.php"
Parallel Example: User Story 2
# After filter tests are defined, split page logic and empty-state polish:
Task: "T010 [US2] Implement source-driven category and restore filters in app/Filament/Pages/InventoryCoverage.php"
Task: "T011 [US2] Add zero-results empty-state reset CTA in resources/views/filament/pages/inventory-coverage.blade.php"
Parallel Example: User Story 3
# Split regression coverage and final polish work across test and UI files:
Task: "T012 [US3] Extend badge and dependency regression assertions in tests/Feature/Filament/InventoryCoverageTableTest.php"
Task: "T013 [US3] Add polished-surface regression coverage in tests/Feature/Filament/InventoryPagesTest.php"
Task: "T014 [US3] Move badge and dependency presentation into Filament table columns in app/Filament/Pages/InventoryCoverage.php"
Task: "T015 [US3] Polish section framing and dark-mode-safe copy in resources/views/filament/pages/inventory-coverage.blade.php"
Implementation Strategy
MVP First (User Story 1 Only)
- Complete Phase 1: Setup
- Complete Phase 2: Foundational
- Complete Phase 3: User Story 1
- Validate table rendering, search, and sort independently
- Demo the searchable Filament-native coverage table before adding filters and polish
Incremental Delivery
- Finish Setup + Foundational to establish the native table surface
- Add User Story 1 and validate the searchable MVP
- Add User Story 2 and validate filter behavior independently
- Add User Story 3 and validate badge semantics and polish independently
- Finish with focused automated verification, formatting, and manual QA
Suggested MVP Scope
- Deliver through Phase 3 / User Story 1 for the first merge candidate
- Defer advanced filtering and final polish until the searchable table foundation is accepted
Notes
- All tasks follow the required checklist format: checkbox, task ID, optional
[P], required story label for story phases, and exact file paths - No database, API, queue, or Graph work is included because the feature is read-only and runtime-derived
- The explicit Filament inspection-affordance exemption stays documented in the spec because coverage rows do not map to navigable records