## Summary - add the complete Spec 196 artifact set for hard Filament nativity cleanup - include spec, requirements checklist, plan, research, data model, logical contract, quickstart, and executable tasks - update agent context after planning - resolve all cross-artifact consistency issues so the feature package is implementation-ready ## Included artifacts - specs/196-hard-filament-nativity-cleanup/spec.md - specs/196-hard-filament-nativity-cleanup/checklists/requirements.md - specs/196-hard-filament-nativity-cleanup/plan.md - specs/196-hard-filament-nativity-cleanup/research.md - specs/196-hard-filament-nativity-cleanup/data-model.md - specs/196-hard-filament-nativity-cleanup/contracts/filament-nativity-cleanup.logical.openapi.yaml - specs/196-hard-filament-nativity-cleanup/quickstart.md - specs/196-hard-filament-nativity-cleanup/tasks.md ## Notes - no runtime code paths were changed - no application tests were run because this change set is spec and planning documentation only - the artifact set was re-analyzed until no consistency issues remained Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #231
14 KiB
| description |
|---|
| Task list for Spec 196 hard Filament nativity cleanup implementation |
Tasks: Hard Filament Nativity Cleanup
Input: Design documents from /Users/ahmeddarrazi/Documents/projects/TenantAtlas/specs/196-hard-filament-nativity-cleanup/
Prerequisites: plan.md, spec.md, research.md, data-model.md, quickstart.md, contracts/filament-nativity-cleanup.logical.openapi.yaml
Tests: Runtime behavior changes on existing Filament v5 / Livewire v4 operator surfaces require Pest feature, Livewire, RBAC, unit, and guard coverage. This task list adds or extends only the focused tests needed for the three in-scope surfaces.
Operations: This cleanup does not introduce new queued work or OperationRun flows. Existing linked follow-up paths remain unchanged.
RBAC: Tenant-context, route-tenant, workspace-membership, and entitled-tenant boundaries remain authoritative. Non-members stay 404, and no new destructive action is added.
UI Naming: Keep existing operator terms stable: Dependencies, Direction, Relationship, Required permissions, Status, Type, Search, Evidence overview, Artifact truth, Freshness, and Next step.
Filament UI Action Surfaces: The feature replaces pseudo-native controls and a hand-built report table with native Filament or Livewire contracts without changing the current inspect destinations or adding new actions.
Proportionality / Anti-Bloat: Stay inside the three named surfaces plus one embedded TableComponent. Do not add new persistence, enums, presenters, or shared UI frameworks.
Phase 1: Setup (Shared Review Inputs)
Purpose: Confirm the exact implementation entry points, native reference patterns, and focused regression baselines before editing the three in-scope surfaces.
- T001 Audit the current nativity-bypass entry points and native reference implementations in
apps/platform/app/Filament/Resources/InventoryItemResource.php,apps/platform/resources/views/filament/components/dependency-edges.blade.php,apps/platform/app/Filament/Pages/TenantRequiredPermissions.php,apps/platform/resources/views/filament/pages/tenant-required-permissions.blade.php,apps/platform/app/Filament/Pages/Monitoring/EvidenceOverview.php,apps/platform/resources/views/filament/pages/monitoring/evidence-overview.blade.php,apps/platform/app/Filament/Pages/Reviews/ReviewRegister.php,apps/platform/app/Filament/Pages/InventoryCoverage.php, andapps/platform/app/Livewire/BackupSetPolicyPickerTable.php - T002 [P] Audit the focused regression baselines in
apps/platform/tests/Feature/InventoryItemDependenciesTest.php,apps/platform/tests/Feature/Rbac/TenantRequiredPermissionsTrustedStateTest.php,apps/platform/tests/Feature/Evidence/EvidenceOverviewPageTest.php,apps/platform/tests/Feature/Filament/EvidenceOverviewDerivedStateMemoizationTest.php,apps/platform/tests/Unit/TenantRequiredPermissionsFilteringTest.php,apps/platform/tests/Unit/TenantRequiredPermissionsOverallStatusTest.php,apps/platform/tests/Unit/TenantRequiredPermissionsFeatureImpactTest.php,apps/platform/tests/Unit/TenantRequiredPermissionsFreshnessTest.php,apps/platform/tests/Unit/TenantRequiredPermissionsCopyPayloadTest.php, andapps/platform/tests/Feature/Guards/FilamentTableStandardsGuardTest.php
Phase 2: Foundational (Blocking Prerequisites)
Purpose: Create the shared Spec 196 test and guard scaffolding that all three surface refactors depend on.
CRITICAL: No user story work should begin until this phase is complete.
- T003 [P] Create the new Spec 196 surface-test entry points in
apps/platform/tests/Feature/Filament/InventoryItemDependencyEdgesTableTest.phpandapps/platform/tests/Feature/Filament/TenantRequiredPermissionsPageTest.php - T004 [P] Review and, if newly applicable, extend shared native-table guard coverage for Spec 196 page-owned tables and faux-control regressions in
apps/platform/tests/Feature/Guards/FilamentTableStandardsGuardTest.php - T005 [P] Add shared regression coverage for mount-only query seeding versus authoritative scope in
apps/platform/tests/Feature/Rbac/TenantRequiredPermissionsTrustedStateTest.phpandapps/platform/tests/Feature/Evidence/EvidenceOverviewPageTest.php
Checkpoint: The shared Spec 196 test harness is in place, and later surface work can prove native state ownership without reopening scope or guard assumptions.
Phase 3: User Story 1 - Review Dependencies Without A Foreign Workflow (Priority: P1) MVP
Goal: Keep inventory dependencies embedded on inventory item detail while replacing the GET apply contract with native component-owned state.
Independent Test: Open an inventory item detail page, change dependency direction and relationship scope, and verify that the same matching edges, missing-target markers, and empty states appear without a manual GET apply workflow.
Tests for User Story 1
Note
: Write these tests first and confirm they fail before implementation.
- T006 [P] [US1] Extend
apps/platform/tests/Feature/InventoryItemDependenciesTest.phpwith native component-state expectations for direction changes, relationship narrowing, empty states, and preserved target safety - T007 [P] [US1] Add Livewire table-component coverage in
apps/platform/tests/Feature/Filament/InventoryItemDependencyEdgesTableTest.phpfor mount state, filter updates, missing-target rendering, and tenant isolation
Implementation for User Story 1
- T008 [US1] Create
apps/platform/app/Livewire/InventoryItemDependencyEdgesTable.phpas an embedded FilamentTableComponentthat owns direction and relationship state and queries rows through the current dependency services - T009 [US1] Update
apps/platform/app/Filament/Resources/InventoryItemResource.phpandapps/platform/resources/views/filament/components/dependency-edges.blade.phpto mount the embedded table component and remove the GET-form /request()-driven control contract while preserving target links, badges, and missing-target hints
Checkpoint: User Story 1 is complete when inventory detail keeps the same dependency meaning and target safety without switching operators into a foreign apply-and-reload workflow.
Phase 4: User Story 2 - Filter Required Permissions In One Native Page Contract (Priority: P1)
Goal: Make tenant required permissions use one native page-owned filter and table contract while preserving route-tenant authority, summaries, guidance, and copy payloads.
Independent Test: Load the required-permissions page with and without deeplink query values, adjust filters live, and verify that the route tenant stays authoritative while rows, counts, guidance, and copy payloads remain correct.
Tests for User Story 2
Note
: Write these tests first and confirm they fail before implementation.
- T010 [P] [US2] Extend
apps/platform/tests/Feature/Rbac/TenantRequiredPermissionsTrustedStateTest.phpfor route-tenant authority, query-seeded status/type/search/features state, and ignored foreign-tenant query values - T011 [P] [US2] Add native page-table coverage in
apps/platform/tests/Feature/Filament/TenantRequiredPermissionsPageTest.phpfor filter updates, search, summary consistency, guidance visibility, copy payload continuity, and no-results states - T012 [P] [US2] Keep filter-normalization, overall-status, feature-impact, freshness, and copy-payload invariants aligned in
apps/platform/tests/Unit/TenantRequiredPermissionsFilteringTest.php,apps/platform/tests/Unit/TenantRequiredPermissionsOverallStatusTest.php,apps/platform/tests/Unit/TenantRequiredPermissionsFeatureImpactTest.php,apps/platform/tests/Unit/TenantRequiredPermissionsFreshnessTest.php, andapps/platform/tests/Unit/TenantRequiredPermissionsCopyPayloadTest.php
Implementation for User Story 2
- T013 [US2] Convert
apps/platform/app/Filament/Pages/TenantRequiredPermissions.phptoHasTable/InteractsWithTablewith native filters, native search, and mount-only query seeding - T014 [US2] Align
apps/platform/resources/views/filament/pages/tenant-required-permissions.blade.phpand, if needed,apps/platform/app/Services/Intune/TenantRequiredPermissionsViewModelBuilder.phpso summary counts, freshness, feature impacts, guidance, and copy payloads are derived from the same normalized native table state
Checkpoint: User Story 2 is complete when required permissions behaves like one native Filament page without losing tenant authority, summary clarity, or follow-up guidance.
Phase 5: User Story 3 - Review Evidence Through A Native Workspace Table (Priority: P2)
Goal: Replace the hand-built evidence report table with a native workspace table that preserves entitled-tenant filtering, clear empty states, and one inspect model.
Independent Test: Load the workspace evidence overview with multiple entitled tenants, apply and clear an entitled tenant prefilter, and verify that rows, empty state, and drilldown behavior remain workspace-safe while the page behaves like a native table surface.
Tests for User Story 3
Note
: Write these tests first and confirm they fail before implementation.
- T015 [P] [US3] Extend
apps/platform/tests/Feature/Evidence/EvidenceOverviewPageTest.phpfor native table rendering, native search behavior, entitled-tenant seed and clear behavior, workspace-safe row drilldown, empty states, and deny-as-not-found enforcement - T016 [P] [US3] Extend
apps/platform/tests/Feature/Filament/EvidenceOverviewDerivedStateMemoizationTest.phpand, if newly applicable,apps/platform/tests/Feature/Guards/FilamentTableStandardsGuardTest.phpfor DB-only derived-row rendering and the new page-owned native table contract
Implementation for User Story 3
- T017 [US3] Convert
apps/platform/app/Filament/Pages/Monitoring/EvidenceOverview.phptoHasTable/InteractsWithTablewith derived row callbacks, native filter and search state, entitled-tenant query seeding, and one inspect model - T018 [US3] Replace the hand-built report table in
apps/platform/resources/views/filament/pages/monitoring/evidence-overview.blade.phpwith a native table wrapper that preserves the clear-filter affordance and current drilldown copy
Checkpoint: User Story 3 is complete when evidence overview reads like one native workspace review table without leaking unauthorized tenant scope or losing the current drilldown path.
Phase 6: Polish & Cross-Cutting Verification
Purpose: Run the focused verification pack, format the touched files, and record the final bounded scope outcome for Spec 196.
- T019 Run the focused Spec 196 Sail verification pack from
specs/196-hard-filament-nativity-cleanup/quickstart.mdagainstapps/platform/tests/Feature/InventoryItemDependenciesTest.php,apps/platform/tests/Feature/Filament/InventoryItemDependencyEdgesTableTest.php,apps/platform/tests/Feature/Rbac/TenantRequiredPermissionsTrustedStateTest.php,apps/platform/tests/Feature/Filament/TenantRequiredPermissionsPageTest.php,apps/platform/tests/Feature/Evidence/EvidenceOverviewPageTest.php,apps/platform/tests/Feature/Filament/EvidenceOverviewDerivedStateMemoizationTest.php,apps/platform/tests/Feature/Guards/FilamentTableStandardsGuardTest.php,apps/platform/tests/Unit/TenantRequiredPermissionsFilteringTest.php,apps/platform/tests/Unit/TenantRequiredPermissionsOverallStatusTest.php,apps/platform/tests/Unit/TenantRequiredPermissionsFeatureImpactTest.php,apps/platform/tests/Unit/TenantRequiredPermissionsFreshnessTest.php, andapps/platform/tests/Unit/TenantRequiredPermissionsCopyPayloadTest.php - T020 Run
cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agentand resolve formatting issues in the changed files underapps/platform/app/,apps/platform/resources/views/filament/, andapps/platform/tests/ - T021 Execute the manual smoke checklist in
specs/196-hard-filament-nativity-cleanup/quickstart.mdacross the three cleaned surfaces and capture any sign-off notes needed for release close-out - T022 Record the Spec 196 release close-out in
specs/196-hard-filament-nativity-cleanup/quickstart.mdwith the final cleaned surfaces, any optional same-class extra hit decision, deferred themes, and touched follow-up specs - T023 Verify the final close-out note in
specs/196-hard-filament-nativity-cleanup/quickstart.mdand the contract-modeled consumers, invariants, and non-goals inspecs/196-hard-filament-nativity-cleanup/contracts/filament-nativity-cleanup.logical.openapi.yamlremain aligned with the implemented scope
Dependencies
- Setup tasks T001-T002 precede all implementation work.
- Foundational tasks T003-T005 block all user stories.
- User Story 1 depends on Phase 2 and is the recommended MVP cut.
- User Story 2 depends on Phase 2 and can proceed after User Story 1 or in parallel once the shared guard and seed-state scaffolding are stable.
- User Story 3 depends on Phase 2 and should land after the shared guard scaffolding is stable so the new page-owned table contract is enforced consistently.
- Polish tasks T019-T023 depend on all selected user stories being complete.
Parallel Execution Examples
- After T001, run T002 in parallel with any remaining setup review.
- In Phase 2, T003, T004, and T005 can run in parallel.
- In User Story 1, T006 and T007 can run in parallel.
- In User Story 2, T010, T011, and T012 can run in parallel.
- In User Story 3, T015 and T016 can run in parallel.
Parallel Example: User Story 1
# Parallel test pass for US1
T006 Extend inventory dependency regression coverage
T007 Add Livewire table-component coverage
Parallel Example: User Story 2
# Parallel test pass for US2
T010 Extend trusted-state authority coverage
T011 Add native required-permissions page-table coverage
T012 Keep required-permissions unit invariants aligned
Parallel Example: User Story 3
# Parallel test pass for US3
T015 Extend evidence overview page coverage
T016 Extend memoization and guard coverage
Implementation Strategy
- Start with Phase 1 and Phase 2 so the native-table guard and new surface-test entry points are ready before any refactor lands.
- Deliver User Story 1 first as the MVP because it removes the most obvious foreign workflow inside an existing detail page with the least scope spill.
- Deliver User Story 2 next to normalize the second P1 surface and prove route-tenant authority still wins over deeplink state.
- Finish with User Story 3 once the shared table guard is stable, then run the focused Sail pack and Pint formatting from Phase 6.