TenantAtlas/specs/399-dashboard-inbox-table-contract/tasks.md
Ahmed Darrazi ed66591f2e
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 1m18s
feat: migrate dashboard inbox table contracts to productized flow
2026-06-22 23:04:26 +02:00

170 lines
23 KiB
Markdown

# Tasks: Spec 399 - Dashboard / Inbox / Table Contract Migration v1
**Input**: Design documents from `/specs/399-dashboard-inbox-table-contract/`
**Prerequisites**: `spec.md`, `plan.md`
**Tests**: Required. Runtime UI changes must include Pest Feature/Livewire tests and focused Pest Browser smoke.
**Completion note**: Completed tasks include runtime edits, focused tests/browser proof, docs/report updates, and no-op inspection decisions for repo-verified surfaces where the selected Spec 399 slice did not require a bounded code change. See `implementation-report.md` for evidence and deferred secondary surfaces.
## Test Governance Checklist
- [x] T001 Confirm lane assignment in `specs/399-dashboard-inbox-table-contract/implementation-report.md`: Feature/Livewire + Browser are the narrowest sufficient proof for the changed dashboard/inbox/table behavior.
- [x] T002 Confirm new or changed tests stay in the smallest honest family in `specs/399-dashboard-inbox-table-contract/implementation-report.md`, with any browser addition named as Spec 399.
- [x] T003 Confirm shared helpers, factories, seeds, fixtures, and browser harness changes stay cheap by default in `specs/399-dashboard-inbox-table-contract/implementation-report.md`.
- [x] T004 Confirm planned validation commands in `specs/399-dashboard-inbox-table-contract/implementation-report.md` cover touched surfaces without broad suite cost.
- [x] T005 Confirm Product Surface browser proof and Human Product Sanity close-out are planned in `specs/399-dashboard-inbox-table-contract/implementation-report.md`.
## Phase 1: Discovery And Guardrails
**Purpose**: Lock exact touched surfaces, reuse paths, and exception boundaries before runtime UI edits.
- [x] T006 Re-read `specs/399-dashboard-inbox-table-contract/spec.md`, `specs/399-dashboard-inbox-table-contract/plan.md`, and `docs/product/standards/product-surface-contract.md`; record selected implementation slice in `specs/399-dashboard-inbox-table-contract/implementation-report.md`.
- [x] T007 Re-read table/action standards in `docs/product/standards/filament-table-ux.md`, `docs/product/standards/list-surface-review-checklist.md`, `docs/ui/action-surface-contract.md`, `docs/ui/operator-ux-surface-standards.md`, and `docs/filament-guidelines.md`; record applicable shared paths and checklist result in `specs/399-dashboard-inbox-table-contract/implementation-report.md`.
- [x] T008 Inspect Environment Dashboard surfaces in `apps/platform/app/Filament/Pages/EnvironmentDashboard.php`, `apps/platform/app/Filament/Widgets/Dashboard/EnvironmentDashboardOverview.php`, `apps/platform/app/Support/EnvironmentDashboard/EnvironmentDashboardSummaryBuilder.php`, and `apps/platform/resources/views/filament/widgets/dashboard/environment-dashboard-overview.blade.php`.
- [x] T009 Inspect Workspace Overview surfaces in `apps/platform/app/Filament/Pages/WorkspaceOverview.php`, `apps/platform/app/Support/Workspaces/WorkspaceOverviewBuilder.php`, and `apps/platform/app/Filament/Widgets/Workspace/`.
- [x] T010 Inspect Governance Inbox surfaces in `apps/platform/app/Filament/Pages/Governance/GovernanceInbox.php` and `apps/platform/resources/views/filament/pages/governance/governance-inbox.blade.php`.
- [x] T011 Inspect Findings surfaces in `apps/platform/app/Filament/Resources/FindingResource.php`, `apps/platform/app/Filament/Resources/FindingResource/Pages/ListFindings.php`, `apps/platform/app/Filament/Pages/Findings/MyFindingsInbox.php`, and `apps/platform/app/Filament/Pages/Findings/FindingsIntakeQueue.php`.
- [x] T012 Inspect Operations Hub surfaces in `apps/platform/app/Filament/Pages/Monitoring/Operations.php`, `apps/platform/resources/views/filament/pages/monitoring/operations.blade.php`, and `apps/platform/app/Filament/Resources/OperationRunResource.php`.
- [x] T013 Inspect existing Product Surface/browser context in `specs/327-governance-inbox-decision-first-workbench-productization/`, `specs/328-operations-hub-decision-first-workbench-productization/`, `specs/330-environment-dashboard-baseline-compare-productization/`, `specs/346-governance-inbox-final-operator-workflow/`, `specs/352-environment-dashboard-operator-guidance-consolidation/`, `specs/391-operations-hub-stability-debug-safe-runtime/`, `specs/397-receipt-page-reduction/`, and `specs/398-decision-page-contract-migration/` without rewriting those packages.
- [x] T014 Decide exact touched surfaces and explicitly defer untouched secondary hot tables in `specs/399-dashboard-inbox-table-contract/implementation-report.md`.
- [x] T015 If any Product Surface exception is required, update `specs/399-dashboard-inbox-table-contract/spec.md` and `specs/399-dashboard-inbox-table-contract/plan.md` before editing runtime UI files.
## Phase 2: Tests First - Contract Expectations
**Purpose**: Encode new dashboard/inbox/table expectations before or alongside implementation.
- [x] T016 [P] Add or update Environment Dashboard Feature coverage in `apps/platform/tests/Feature/Filament/Spec399DashboardInboxTableContractTest.php` proving the default view has one attention question, one dominant next action, no default OperationRun proof, and no raw evidence/source-key/detector/payload exposure.
- [x] T017 Add or update Workspace Overview Feature coverage in `apps/platform/tests/Feature/Filament/Spec399DashboardInboxTableContractTest.php` proving the default view prioritizes workspace attention and does not expose long operations/evidence/report tables by default.
- [x] T018 [P] Add or update Governance Inbox Feature and Browser coverage in `apps/platform/tests/Feature/Filament/Spec399DashboardInboxTableContractTest.php` and `apps/platform/tests/Browser/Spec399DashboardInboxTableContractMigrationSmokeTest.php` proving visible items show work item, state/severity, scope, impact/reason, and next action while proof links are secondary or collapsed.
- [x] T019 [P] Add or update Findings Feature/Livewire coverage in `apps/platform/tests/Feature/Filament/Spec399DashboardInboxTableContractTest.php` proving product row labels, table cap/product pagination, one row primary action, and hidden technical identifiers.
- [x] T020 [P] Add or update Operations Hub Feature coverage in `apps/platform/tests/Feature/Filament/Spec399DashboardInboxTableContractTest.php` plus affected existing Monitoring tests proving default attention behavior and hidden raw OperationRun diagnostics.
- [x] T021 [P] Add or update table/action budget coverage for directly touched hot tables in `apps/platform/tests/Feature/Filament/Spec399DashboardInboxTableContractTest.php` and affected existing table-standard tests.
- [x] T022 Add or update destructive/bulk action assertions in `apps/platform/tests/Feature/Filament/Spec399DashboardInboxTableContractTest.php` and affected existing table-standard tests proving touched destructive/high-impact actions are grouped, confirmation-protected, and not primary navigation.
- [x] T023 [P] Add browser smoke scaffold in `apps/platform/tests/Browser/Spec399DashboardInboxTableContractMigrationSmokeTest.php` using existing workspace/environment browser harness patterns.
- [x] T024 Update existing tests that encode old overloaded defaults in the narrowest relevant files under `apps/platform/tests/Feature/Filament/`, `apps/platform/tests/Feature/Governance/`, `apps/platform/tests/Feature/Monitoring/`, `apps/platform/tests/Feature/Findings/`, and `apps/platform/tests/Browser/`.
## Phase 3: User Story 1 - Dashboards Answer One Attention Question (P1)
**Goal**: Environment Dashboard and Workspace Overview reduce default-visible proof/link/readiness overload and show one dominant next action.
**Independent Test**: T016, T017, and the dashboard sections of T023 pass independently.
- [x] T025 [US1] Update Environment Dashboard payload/action hierarchy in `apps/platform/app/Filament/Pages/EnvironmentDashboard.php` so the page exposes only one dominant product next action and secondary actions are grouped/demoted.
- [x] T026 [US1] Update Environment Dashboard summary selection in `apps/platform/app/Support/EnvironmentDashboard/EnvironmentDashboardSummaryBuilder.php` so repeated readiness/status summaries are reduced to one top-level product truth per concept.
- [x] T027 [US1] Update Environment Dashboard widget behavior in `apps/platform/app/Filament/Widgets/Dashboard/EnvironmentDashboardOverview.php` to support the Product Surface budgets without adding new persisted state.
- [x] T028 [US1] Update Environment Dashboard default Blade hierarchy in `apps/platform/resources/views/filament/widgets/dashboard/environment-dashboard-overview.blade.php` to hide/demote OperationRun proof, raw evidence, source keys, detector/fingerprint/payload detail, and excessive secondary links.
- [x] T029 [US1] Update Environment Dashboard recent operations/table widget behavior in `apps/platform/app/Filament/Widgets/Dashboard/RecentOperations.php` if implementation discovery confirms it is default-visible and violates Product Surface table/link budgets.
- [x] T030 [US1] Update Workspace Overview page hierarchy in `apps/platform/app/Filament/Pages/WorkspaceOverview.php` so one workspace triage path is dominant and technical/proof navigation is secondary.
- [x] T031 [US1] Update Workspace Overview builder output in `apps/platform/app/Support/Workspaces/WorkspaceOverviewBuilder.php` so summary metrics stay at four or fewer above the fold and attention items do not duplicate the same blocker truth.
- [x] T032 [US1] Update Workspace Overview widgets in `apps/platform/app/Filament/Widgets/Workspace/WorkspaceNeedsAttention.php`, `apps/platform/app/Filament/Widgets/Workspace/WorkspaceSummaryStats.php`, and `apps/platform/app/Filament/Widgets/Workspace/WorkspaceRecentOperations.php` where touched to respect row/link/action budgets.
- [x] T033 [US1] Update localization labels touched by dashboard copy in `apps/platform/lang/` only when existing labels expose implementation-first terms as primary product copy.
- [x] T034 [US1] Run focused dashboard Feature tests from `apps/platform/tests/Feature/Filament/Spec399DashboardInboxTableContractTest.php`.
## Phase 4: User Story 2 - Inboxes Prioritize Triage Work (P1)
**Goal**: Governance Inbox and Findings surfaces show actionable triage rows/items rather than proof graphs.
**Independent Test**: T018, T019, and the inbox sections of T023 pass independently.
- [x] T035 [US2] Inspect Governance Inbox page payload/action structure in `apps/platform/app/Filament/Pages/Governance/GovernanceInbox.php` and record that no runtime edit was selected because the current lane contract already keeps one primary triage path and secondary/collapsed proof links for this slice.
- [x] T036 [US2] Inspect Governance Inbox Blade hierarchy in `apps/platform/resources/views/filament/pages/governance/governance-inbox.blade.php` and cover its existing row/action/link budgets, collapsed diagnostics, and hidden raw technical identifiers through Spec 399 Feature/Browser proof.
- [x] T037 [US2] Inspect existing Governance Inbox tests in `apps/platform/tests/Feature/Governance/GovernanceInboxPageTest.php` and `apps/platform/tests/Feature/Governance/Spec346GovernanceInboxOperatorWorkflowTest.php`; no assertion change was required there, and Spec 399 coverage now lives in the focused Feature/Browser files.
- [x] T038 [US2] Update FindingResource table configuration in `apps/platform/app/Filament/Resources/FindingResource.php` to prefer product labels, one inspect/triage action, hidden technical columns, and grouped bulk/destructive actions.
- [x] T039 [US2] Update Findings list page behavior in `apps/platform/app/Filament/Resources/FindingResource/Pages/ListFindings.php` where needed for default pagination/caps and action hierarchy.
- [x] T040 [US2] Update My Findings Inbox in `apps/platform/app/Filament/Pages/Findings/MyFindingsInbox.php` if selected by discovery to ensure inbox rows demote technical proof and cap visible work items.
- [x] T041 [US2] Update Findings Intake Queue in `apps/platform/app/Filament/Pages/Findings/FindingsIntakeQueue.php` if selected by discovery to ensure one primary triage action and no raw technical labels by default.
- [x] T042 [US2] Update findings-related localization labels in `apps/platform/lang/` only when existing primary copy exposes implementation-first terms.
- [x] T043 [US2] Run focused Governance Inbox and Findings Feature tests from `apps/platform/tests/Feature/Filament/Spec399DashboardInboxTableContractTest.php` plus affected existing Governance/Findings tests.
## Phase 5: User Story 3 - Hot Tables Obey Budgets (P1)
**Goal**: Every touched product-facing hot table follows row, link, action, and technical-column budgets.
**Independent Test**: T021 and T022 pass for every directly touched hot table.
- [x] T044 [US3] Apply native Filament table caps or product pagination to directly touched tables in `apps/platform/app/Filament/Resources/FindingResource.php`, `apps/platform/app/Filament/Pages/Governance/GovernanceInbox.php`, `apps/platform/app/Filament/Pages/Monitoring/Operations.php`, and any selected dashboard/widget table file.
- [x] T045 [US3] Hide or toggle technical columns by default in every touched table file, using `toggleable(isToggledHiddenByDefault: true)` or equivalent host pattern when native Filament table APIs are in use.
- [x] T046 [US3] Remove or demote raw UUID, fingerprint, source key, detector, payload, and OperationRun/evidence proof links from primary row labels in every touched table file.
- [x] T047 [US3] Ensure every touched table has one primary inspect/open/triage model in its table configuration file and does not render duplicate `View` actions when `recordUrl()` or an equivalent inspect path is primary.
- [x] T048 [US3] Group or separate every touched bulk/destructive action using existing ActionGroup/BulkActionGroup patterns in the relevant Filament resource/page file.
- [x] T049 [US3] Remove empty `ActionGroup` or `BulkActionGroup` placeholders in touched table files if RBAC/state filtering can make them empty.
- [x] T050 [US3] Update table empty states in touched table files so each has domain-specific copy and at most one primary CTA where relevant.
- [x] T051 [US3] Run focused hot-table tests from `apps/platform/tests/Feature/Filament/Spec399DashboardInboxTableContractTest.php` plus affected existing table-standard tests.
## Phase 6: User Story 4 - Operations Hub Is Not A Raw Run Browser (P2)
**Goal**: Operations Hub keeps attention-oriented Inbox behavior and demotes raw OperationRun detail from default product hierarchy.
**Independent Test**: T020 and the Operations Hub sections of T023 pass independently.
- [x] T052 [US4] Update Operations Hub page payload/action hierarchy in `apps/platform/app/Filament/Pages/Monitoring/Operations.php` so the default view emphasizes operation purpose, state/outcome, impact, environment/scope, and one next action.
- [x] T053 [US4] Update Operations Hub Blade hierarchy in `apps/platform/resources/views/filament/pages/monitoring/operations.blade.php` so raw run IDs, raw context, payloads, stack traces, and diagnostics are hidden/collapsed by default.
- [x] T054 [US4] Preserve authorized OperationRun detail and related artifact/source links through existing `OperationRunLinks` usage in `apps/platform/app/Filament/Pages/Monitoring/Operations.php`.
- [x] T055 [US4] Ensure Operations Hub does not introduce local OperationRun queued toast/link/event/dedupe/notification behavior in `apps/platform/app/Filament/Pages/Monitoring/Operations.php`.
- [x] T056 [US4] Update existing Operations tests in `apps/platform/tests/Feature/Monitoring/OperationsHubProductizationTest.php`, `apps/platform/tests/Feature/Monitoring/Spec391OperationsHubStabilityTest.php`, and `apps/platform/tests/Browser/Spec391OperationsHubStabilitySmokeTest.php` where old technical-default expectations conflict with Spec 399.
- [x] T057 [US4] Run focused Operations tests from `apps/platform/tests/Feature/Filament/Spec399DashboardInboxTableContractTest.php` plus affected existing Monitoring tests.
## Phase 7: User Story 5 - Technical Proof Remains Reachable And Safe (P2)
**Goal**: Technical proof is demoted by default but remains available to authorized users through deliberate paths.
**Independent Test**: Feature and browser tests prove default demotion plus authorized secondary/detail path continuity.
- [x] T058 [US5] Verify each demoted Environment Dashboard proof path still has an authorized secondary/detail route or document why no such path existed in `specs/399-dashboard-inbox-table-contract/implementation-report.md`.
- [x] T059 [US5] Verify each demoted Workspace Overview proof path still has an authorized secondary/detail route or document why no such path existed in `specs/399-dashboard-inbox-table-contract/implementation-report.md`.
- [x] T060 [US5] Verify each demoted Governance Inbox source/proof path still has an authorized secondary/detail route or document why no such path existed in `specs/399-dashboard-inbox-table-contract/implementation-report.md`.
- [x] T061 [US5] Verify each demoted Findings technical identifier/proof path still has an authorized detail/audit route or document why no such path existed in `specs/399-dashboard-inbox-table-contract/implementation-report.md`.
- [x] T062 [US5] Verify each demoted Operations Hub technical path still resolves through existing `OperationRunLinks` or authorized detail routes in `apps/platform/app/Filament/Pages/Monitoring/Operations.php`.
- [x] T063 [US5] Confirm existing RBAC/authorization assertions remain in the affected Feature tests under `apps/platform/tests/Feature/` for touched technical/audit paths; Spec 399 added no new authorization path.
## Phase 8: Browser Smoke, Coverage Artifacts, And Close-Out
**Purpose**: Prove rendered behavior, update required coverage artifacts, and record implementation evidence.
- [x] T064 Update `docs/ui-ux-enterprise-audit/route-inventory.md` for every rendered route whose page archetype, Product Surface classification, or default UI changed.
- [x] T065 Update `docs/ui-ux-enterprise-audit/design-coverage-matrix.md` for every rendered route whose Product Surface migration was implemented.
- [x] T066 Update a page report under `docs/ui-ux-enterprise-audit/page-reports/` only if implementation changes a route archetype, expands default content, or discovers the existing page report is materially inaccurate.
- [x] T067 Complete browser smoke in `apps/platform/tests/Browser/Spec399DashboardInboxTableContractMigrationSmokeTest.php` for Environment Dashboard, Workspace Overview, Governance Inbox, Findings, Operations Hub, and at least one touched hot table, including dark mode correctness, accessibility affordances, and Filament-native/shared-primitive semantics for touched custom Blade surfaces.
- [x] T068 Save any intentional browser screenshots under `specs/399-dashboard-inbox-table-contract/artifacts/screenshots/` and confirm no accidental screenshot artifacts remain elsewhere.
- [x] T069 Complete Human Product Sanity results in `specs/399-dashboard-inbox-table-contract/implementation-report.md`.
- [x] T070 Complete Product Surface implementation-report fields in `specs/399-dashboard-inbox-table-contract/implementation-report.md`: files changed, target surfaces, archetype per surface, primary user question, table caps, list-surface checklist result, deep links demoted, action hierarchy, destructive/bulk separation, dark mode/accessibility/Filament-native proof, tests, browser proof, human sanity, no-legacy, no point fixes, no runtime framework, visible complexity outcome, deployment impact, and no completed-spec rewrite assertion.
- [x] T071 Run `cd apps/platform && ./vendor/bin/sail artisan test --compact --filter=Spec399`.
- [x] T072 Run `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Browser/Spec399DashboardInboxTableContractMigrationSmokeTest.php`.
- [x] T073 Run affected existing Feature/Browser tests listed in `specs/399-dashboard-inbox-table-contract/implementation-report.md`.
- [x] T074 Run `cd apps/platform && ./vendor/bin/sail pint --dirty`.
- [x] T075 Run `git diff --check`.
- [x] T076 Record any unrelated failures in `specs/399-dashboard-inbox-table-contract/implementation-report.md` with command, failure count, why unrelated, and confirmation no touched dashboard/inbox/table surface failed.
- [x] T077 Confirm final implementation response states Livewire v4 compliance, provider registration location, global search posture, destructive/high-impact action handling, asset strategy, tests/browser coverage, deployment impact, and no application secrets/raw tenant data in screenshots.
## Dependencies & Execution Order
- [x] T078 Complete Phase 1 before any runtime UI edit in `apps/platform/app/`, `apps/platform/resources/`, or `apps/platform/tests/`.
- [x] T079 Complete Phase 2 tests before or alongside corresponding implementation tasks in Phases 3 through 7.
- [x] T080 Complete dashboard tasks T025-T034 before final browser smoke assertions for Environment Dashboard and Workspace Overview in T067.
- [x] T081 Complete inbox/tasks T035-T043 before final browser smoke assertions for Governance Inbox and Findings in T067.
- [x] T082 Complete table tasks T044-T051 before final browser smoke assertions for touched hot tables in T067.
- [x] T083 Complete Operations tasks T052-T057 before final browser smoke assertions for Operations Hub in T067.
- [x] T084 Complete proof continuity tasks T058-T063 before implementation-report close-out in T070.
## Parallel Execution Notes
- [x] T085 Tests T016-T023 can be drafted in parallel after Phase 1 target lock only where they touch different files; T016/T017 and T021/T022 must coordinate because each pair shares one test file.
- [x] T086 Dashboard implementation T025-T034 and inbox implementation T035-T043 can proceed in parallel only if they do not edit shared localization files in `apps/platform/lang/`.
- [x] T087 Table contract work T044-T051 must coordinate with surface-specific work to avoid conflicting edits in the same Filament page/resource files.
- [x] T088 Browser smoke T067 must wait for all selected runtime surfaces and fixtures to be stable.
## Implementation Strategy
- [x] T089 MVP first: complete US1 dashboards plus the shared table budget tasks that those dashboards touch, then run focused dashboard Feature and browser proof.
- [x] T090 Incremental delivery: add US2 inbox/findings, US3 hot tables, US4 Operations Hub, and US5 proof continuity in order, validating each story independently before moving on.
- [x] T091 Stop and update `specs/399-dashboard-inbox-table-contract/spec.md` and `specs/399-dashboard-inbox-table-contract/plan.md` if implementation discovers the selected slice needs new persistence, new status families, new Product Surface runtime infrastructure, new Graph behavior, or a Product Surface exception.
## Non-Goals Checklist
- [x] T092 Do not modify completed Specs 327, 328, 330, 352, 370, 371, 391, 395, 397, or 398 except as read-only context.
- [x] T093 Do not create migrations, models, jobs, commands, provider contracts, Graph endpoints, queues, scheduler changes, storage changes, or env vars for Spec 399.
- [x] T094 Do not create a Product Surface runtime framework, presenter family, enum/status family, component framework, persisted taxonomy, or broad design system.
- [x] T095 Do not preserve old overloaded dashboard/inbox/table behavior through compatibility flags, old layouts, hidden routes, old labels, fallback readers, or legacy fixtures.
- [x] T096 Do not touch receipt pages, decision pages, Customer Review Workspace, System Panel branding, Baseline Compare, Restore Preview, or Review Publication Resolution unless the spec/plan are updated with explicit scope approval.
- [x] T097 Do not mark Spec 399 complete unless focused Feature tests, focused browser smoke, Human Product Sanity, Product Surface close-out, Pint, and diff checks are recorded.