# Tasks: Spec 346 - Governance Inbox Final Operator Workflow **Input**: Design documents from `/specs/346-governance-inbox-final-operator-workflow/` **Prerequisites**: `spec.md`, `plan.md`, `repo-truth-map.md` **Tests**: Required. This is a runtime UI/operator workflow productization change on an existing Filament page with browser smoke coverage. ## Test Governance Checklist - [x] Lane classification is named and bounded to the changed behavior. - [x] New or changed tests stay in the smallest honest family, and the browser addition is explicit. - [x] Shared helpers, factories, seeds, fixtures, and context defaults stay cheap by default. - [x] Planned validation commands cover the change without pulling in unrelated lane cost. - [x] The declared surface test profile (`global-context-shell` plus operator workflow disclosure) is explicit. - [x] Any material escalation, deferred truth, or residual gap is recorded in the spec package or final report. ## Phase 1: Preparation And Repo Truth **Purpose**: Confirm current runtime truth and keep the implementation bounded to the existing Governance Inbox surface. - [x] T001 Re-read `specs/346-governance-inbox-final-operator-workflow/spec.md` and `plan.md`. - [x] T002 Re-read related completed context only: Specs 250, 257, 265, 306, 307, 308, 327, 342, 343, 344, and 345. Do not modify their artifacts. - [x] T003 Verify current `GovernanceInbox` route/class/view/builder and existing tests before editing. - [x] T004 Create `specs/346-governance-inbox-final-operator-workflow/repo-truth-map.md` documenting current families, payload shape, scope contract, and repo-real gaps. - [x] T005 Confirm no migration, package, env, queue, scheduler, storage, or deployment asset change is required. - [x] T006 Confirm Filament v5 / Livewire v4.0+ compliance and avoid legacy Filament or Livewire APIs. - [x] T007 Confirm panel provider registration remains `apps/platform/bootstrap/providers.php`. - [x] T008 Confirm no Governance Inbox resource/global-search posture changes are required. ## Phase 2: Tests First **Purpose**: Lock the operator summary, lane grouping, scope contract, and blocked/empty/resolved behavior before refactoring the page. - [x] T009 Add `apps/platform/tests/Feature/Governance/Spec346GovernanceInboxOperatorWorkflowTest.php`. - [x] T010 Add `apps/platform/tests/Feature/Navigation/Spec346GovernanceInboxScopeContractTest.php`. - [x] T011 Add `apps/platform/tests/Browser/Spec346GovernanceInboxOperatorWorkflowSmokeTest.php`. - [x] T012 Add feature assertions for summary-first hierarchy and operator lane headings. - [x] T013 Add feature assertions that items render reason, impact, source, environment, and next action. - [x] T014 Add feature assertions for the visible `environment_id` contract and filtered state. - [x] T015 Add feature assertions for productized empty and blocked states. - [x] T016 Add feature assertions that resolved items stay secondary. - [x] T017 Add navigation assertions for canonical `environment_id` links and rejection of retired query keys. - [x] T018 Update existing Governance Inbox tests only where the old page hierarchy was intentionally replaced. ## Phase 3: Lane Classification Contract **Purpose**: Define the smallest truthful operator-lane mapping over existing inbox families. - [x] T019 Create `specs/346-governance-inbox-final-operator-workflow/contracts/lane-classification.md`. - [x] T020 Map `intake_findings` into `Needs triage`. - [x] T021 Map decision-oriented active work into `Requires decision`. - [x] T022 Map exception-driven items into `Risk / exception review`. - [x] T023 Map evidence-gap states into `Evidence required` only where repo truth supports it. - [x] T024 Map stale operations and alert-delivery failures into `Blocked`. - [x] T025 Omit `Review-ready` as a primary lane because current repo truth does not support a clean, honest derived lane on this page. - [x] T026 Keep `Recently resolved` secondary and sourced from existing decision history rather than new persisted inbox state. ## Phase 4: Page Productization **Purpose**: Turn the current page into a calm, summary-first operator workflow without creating a new governance engine. - [x] T027 Update `apps/platform/app/Filament/Pages/Governance/GovernanceInbox.php` to expose operator summary, lane groups, recently resolved context, and secondary diagnostics. - [x] T028 Update `apps/platform/resources/views/filament/pages/governance/governance-inbox.blade.php` so the summary is the first major section. - [x] T029 Render clear lane sections for active work instead of leading with source-family context. - [x] T030 Ensure each visible item shows reason, impact, source, environment, and one dominant next action. - [x] T031 Keep source detail, filters, and diagnostics present but secondary or collapsed by default. - [x] T032 Keep the page read-first; do not add a new mutating workflow surface. ## Phase 5: Links, Scope, And Safety **Purpose**: Preserve the workspace hub contract and route operators into existing surfaces without legacy query leakage. - [x] T033 Keep `/admin/governance/inbox` workspace-owned with visible local `environment_id` state. - [x] T034 Ensure environment-scoped destinations preserve canonical workspace/environment routing. - [x] T035 Update finding-exception links to stop emitting the retired `tenant` query key. - [x] T036 Update alert-delivery links to stop emitting `tableFilters` in the public scope contract. - [x] T037 Preserve scope-correct links to existing findings, decisions, evidence, reviews, operations, and provider/readiness destinations where repo-backed. - [x] T038 Do not add approve/certify/sign-off style semantics or new destructive actions. ## Phase 6: Audit And Spec Artifacts **Purpose**: Keep the productization package and UI audit aligned to the runtime diff. - [x] T039 Update `docs/ui-ux-enterprise-audit/page-reports/ui-004-governance-inbox.md` with the summary-first hierarchy, lane model, scope contract, and deferred truths. - [x] T040 Keep the existing Governance Inbox page report identity (`ui-004`) instead of inventing a new page-report family. - [x] T041 Record repo-truth limitations and deliberate omissions in the Spec 346 artifacts. ## Phase 7: Browser Smoke And Validation **Purpose**: Prove the first-screen operator workflow and preserve existing scope contracts. - [x] T042 Run `cd apps/platform && ./vendor/bin/sail artisan test tests/Feature/Governance/Spec346GovernanceInboxOperatorWorkflowTest.php tests/Feature/Navigation/Spec346GovernanceInboxScopeContractTest.php --compact`. - [x] T043 Run `cd apps/platform && ./vendor/bin/sail php vendor/bin/pest tests/Browser/Spec346GovernanceInboxOperatorWorkflowSmokeTest.php --compact`. - [x] T044 Run `cd apps/platform && ./vendor/bin/sail artisan test tests/Feature/Navigation/WorkspaceHubEnvironmentFilterContractTest.php tests/Feature/Navigation/WorkspaceHubClearFilterContractTest.php --compact`. - [x] T045 Run `cd apps/platform && ./vendor/bin/sail artisan test tests/Feature/Navigation/WorkspaceHubRegistryTest.php --compact`. - [x] T046 Run `cd apps/platform && ./vendor/bin/sail artisan test tests/Feature/Governance/GovernanceInboxPageTest.php --compact`. - [x] T047 Run `cd apps/platform && ./vendor/bin/sail php vendor/bin/pest tests/Browser/Spec327GovernanceInboxProductizationSmokeTest.php --compact`. - [x] T048 Run `cd apps/platform && ./vendor/bin/sail pint --dirty`. - [x] T049 Run `git diff --check`. - [x] T050 Save browser screenshots under `specs/346-governance-inbox-final-operator-workflow/artifacts/screenshots/` when generated by the smoke flow. - [x] T051 Report full-suite status honestly if not run. ## Phase 8: Bounded Density / Productization Polish **Purpose**: Finish the bounded first-viewport and scanability polish without introducing new domain state or closing the spec prematurely. - [x] T052 Harden the Governance Inbox ViewModel/array contract so lanes, actions, badges/counts, source entries, and links expose consistent keys before Blade renders them. - [x] T053 Replace the indirect summary CTA with a prioritized `Next recommended action` item and direct primary action in the first viewport. - [x] T054 Demote zero-count lanes into compact `Clear` chips/status while keeping active lanes prominent. - [x] T055 Compress active item cards for mobile and move source, owner/due, evidence, accepted-risk/decision, linked records, and secondary actions behind `More context`. - [x] T056 Reduce blocked-lane repetition by using the compact card/detail-disclosure pattern instead of repeated always-visible detail boxes. - [x] T057 Verify emitted `#lane-*` anchors scroll to or visibly mark their lane in browser smoke coverage. - [x] T058 Update focused Feature and Browser tests for contract hardening, first-viewport top action, zero-lane chips, mobile density, and hash navigation. - [x] T059 Re-run focused Spec 346 Feature tests and Browser smoke after the `Undefined array key "label"` fix. ## Non-Goals Checklist - [x] NT001 Do not build a new governance engine or persisted inbox-item state. - [x] NT002 Do not rebuild Decision Register. - [x] NT003 Do not rebuild Findings, Accepted Risk lifecycle, Customer Review Workspace, or provider execution logic. - [x] NT004 Do not add customer portal, PSA/ITSM handoff, or broad notifications. - [x] NT005 Do not add legal/compliance approval semantics. - [x] NT006 Do not add migrations, packages, env vars, queues, scheduler changes, or deployment asset work. - [x] NT007 Do not reintroduce legacy public scope keys such as `tenant`, `tenant_id`, `managed_environment_id`, or `tableFilters`. - [x] NT008 Do not close Spec 346 as part of the bounded polish. ## Implementation Status Notes - Not Closed - Spec 346 stayed bounded to the existing Governance Inbox page, its section builder, linked surfaces, focused tests, and the spec/audit artifacts. - The final page is summary-first and lane-based, while source detail and diagnostics remain secondary disclosure. - The density/productization polish keeps the same repo-backed data, adds no domain model or migration, and hardens the rendered payload contract before Blade consumes it. - `Review-ready` was deliberately not invented as a first-class lane because current page truth does not support it honestly without adding new workflow logic or persistence. - Existing page/browser tests that encoded the older workbench framing were updated to the new operator-workflow hierarchy because the changed behavior is intentional and in scope. - No new mutating governance action, asset registration, migration, env var, queue, scheduler, or storage change was introduced. - Spec 346 is intentionally not closed in this pass; close-out remains a separate decision after review.