Implemented the final operator workflow for the Governance Inbox. This includes refactoring the inbox page, updating finding resources, adding UI enforcement policies, updating related blade views, and adding comprehensive tests for operator workflow and scope contracts. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #418
10 KiB
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
- Lane classification is named and bounded to the changed behavior.
- New or changed tests stay in the smallest honest family, and the browser addition is explicit.
- Shared helpers, factories, seeds, fixtures, and context defaults stay cheap by default.
- Planned validation commands cover the change without pulling in unrelated lane cost.
- The declared surface test profile (
global-context-shellplus operator workflow disclosure) is explicit. - 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.
- T001 Re-read
specs/346-governance-inbox-final-operator-workflow/spec.mdandplan.md. - 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.
- T003 Verify current
GovernanceInboxroute/class/view/builder and existing tests before editing. - T004 Create
specs/346-governance-inbox-final-operator-workflow/repo-truth-map.mddocumenting current families, payload shape, scope contract, and repo-real gaps. - T005 Confirm no migration, package, env, queue, scheduler, storage, or deployment asset change is required.
- T006 Confirm Filament v5 / Livewire v4.0+ compliance and avoid legacy Filament or Livewire APIs.
- T007 Confirm panel provider registration remains
apps/platform/bootstrap/providers.php. - 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.
- T009 Add
apps/platform/tests/Feature/Governance/Spec346GovernanceInboxOperatorWorkflowTest.php. - T010 Add
apps/platform/tests/Feature/Navigation/Spec346GovernanceInboxScopeContractTest.php. - T011 Add
apps/platform/tests/Browser/Spec346GovernanceInboxOperatorWorkflowSmokeTest.php. - T012 Add feature assertions for summary-first hierarchy and operator lane headings.
- T013 Add feature assertions that items render reason, impact, source, environment, and next action.
- T014 Add feature assertions for the visible
environment_idcontract and filtered state. - T015 Add feature assertions for productized empty and blocked states.
- T016 Add feature assertions that resolved items stay secondary.
- T017 Add navigation assertions for canonical
environment_idlinks and rejection of retired query keys. - 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.
- T019 Create
specs/346-governance-inbox-final-operator-workflow/contracts/lane-classification.md. - T020 Map
intake_findingsintoNeeds triage. - T021 Map decision-oriented active work into
Requires decision. - T022 Map exception-driven items into
Risk / exception review. - T023 Map evidence-gap states into
Evidence requiredonly where repo truth supports it. - T024 Map stale operations and alert-delivery failures into
Blocked. - T025 Omit
Review-readyas a primary lane because current repo truth does not support a clean, honest derived lane on this page. - T026 Keep
Recently resolvedsecondary 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.
- T027 Update
apps/platform/app/Filament/Pages/Governance/GovernanceInbox.phpto expose operator summary, lane groups, recently resolved context, and secondary diagnostics. - T028 Update
apps/platform/resources/views/filament/pages/governance/governance-inbox.blade.phpso the summary is the first major section. - T029 Render clear lane sections for active work instead of leading with source-family context.
- T030 Ensure each visible item shows reason, impact, source, environment, and one dominant next action.
- T031 Keep source detail, filters, and diagnostics present but secondary or collapsed by default.
- 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.
- T033 Keep
/admin/governance/inboxworkspace-owned with visible localenvironment_idstate. - T034 Ensure environment-scoped destinations preserve canonical workspace/environment routing.
- T035 Update finding-exception links to stop emitting the retired
tenantquery key. - T036 Update alert-delivery links to stop emitting
tableFiltersin the public scope contract. - T037 Preserve scope-correct links to existing findings, decisions, evidence, reviews, operations, and provider/readiness destinations where repo-backed.
- 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.
- T039 Update
docs/ui-ux-enterprise-audit/page-reports/ui-004-governance-inbox.mdwith the summary-first hierarchy, lane model, scope contract, and deferred truths. - T040 Keep the existing Governance Inbox page report identity (
ui-004) instead of inventing a new page-report family. - 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.
- T042 Run
cd apps/platform && ./vendor/bin/sail artisan test tests/Feature/Governance/Spec346GovernanceInboxOperatorWorkflowTest.php tests/Feature/Navigation/Spec346GovernanceInboxScopeContractTest.php --compact. - T043 Run
cd apps/platform && ./vendor/bin/sail php vendor/bin/pest tests/Browser/Spec346GovernanceInboxOperatorWorkflowSmokeTest.php --compact. - T044 Run
cd apps/platform && ./vendor/bin/sail artisan test tests/Feature/Navigation/WorkspaceHubEnvironmentFilterContractTest.php tests/Feature/Navigation/WorkspaceHubClearFilterContractTest.php --compact. - T045 Run
cd apps/platform && ./vendor/bin/sail artisan test tests/Feature/Navigation/WorkspaceHubRegistryTest.php --compact. - T046 Run
cd apps/platform && ./vendor/bin/sail artisan test tests/Feature/Governance/GovernanceInboxPageTest.php --compact. - T047 Run
cd apps/platform && ./vendor/bin/sail php vendor/bin/pest tests/Browser/Spec327GovernanceInboxProductizationSmokeTest.php --compact. - T048 Run
cd apps/platform && ./vendor/bin/sail pint --dirty. - T049 Run
git diff --check. - T050 Save browser screenshots under
specs/346-governance-inbox-final-operator-workflow/artifacts/screenshots/when generated by the smoke flow. - 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.
- T052 Harden the Governance Inbox ViewModel/array contract so lanes, actions, badges/counts, source entries, and links expose consistent keys before Blade renders them.
- T053 Replace the indirect summary CTA with a prioritized
Next recommended actionitem and direct primary action in the first viewport. - T054 Demote zero-count lanes into compact
Clearchips/status while keeping active lanes prominent. - T055 Compress active item cards for mobile and move source, owner/due, evidence, accepted-risk/decision, linked records, and secondary actions behind
More context. - T056 Reduce blocked-lane repetition by using the compact card/detail-disclosure pattern instead of repeated always-visible detail boxes.
- T057 Verify emitted
#lane-*anchors scroll to or visibly mark their lane in browser smoke coverage. - T058 Update focused Feature and Browser tests for contract hardening, first-viewport top action, zero-lane chips, mobile density, and hash navigation.
- T059 Re-run focused Spec 346 Feature tests and Browser smoke after the
Undefined array key "label"fix.
Non-Goals Checklist
- NT001 Do not build a new governance engine or persisted inbox-item state.
- NT002 Do not rebuild Decision Register.
- NT003 Do not rebuild Findings, Accepted Risk lifecycle, Customer Review Workspace, or provider execution logic.
- NT004 Do not add customer portal, PSA/ITSM handoff, or broad notifications.
- NT005 Do not add legal/compliance approval semantics.
- NT006 Do not add migrations, packages, env vars, queues, scheduler changes, or deployment asset work.
- NT007 Do not reintroduce legacy public scope keys such as
tenant,tenant_id,managed_environment_id, ortableFilters. - 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-readywas 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.