# Tasks: Spec 387 - Review Publication Resolution Decision UX v1 **Input**: Design documents from `/specs/387-review-publication-resolution-decision-ux-v1/` **Prerequisites**: `spec.md`, `plan.md`, `checklists/requirements.md` **Tests**: Required. This feature changes visible Filament/Livewire UI behavior, confirmation copy, authorization affordances, and browser-visible hierarchy over an existing high-impact workflow. ## Test Governance Checklist - [x] Lane assignment is named and is the narrowest sufficient proof for changed UI/action behavior. - [x] New or changed tests stay in focused Feature/Filament/Browser families. - [x] Shared helpers, factories, seeds, fixtures, and context defaults stay cheap by default. - [x] Planned validation commands cover the change without pulling unrelated lane cost. - [x] The workflow-detail surface test profile and browser smoke need are explicit. - [x] Any unavailable browser state screenshot is documented in the active spec artifacts rather than widened through product code. ## Phase 1: Preparation and Repo Truth **Purpose**: Confirm the implementation starts from Spec 386 runtime truth and avoid duplicate workflow work. - [x] T001 Confirm current branch/status and re-read `specs/387-review-publication-resolution-decision-ux-v1/spec.md`, `plan.md`, and `tasks.md`. - [x] T002 Re-read `specs/386-review-publication-resolution-workflow-v1/spec.md`, `plan.md`, and `tasks.md` as completed implementation context only; do not rewrite that package. - [x] T003 Inspect current visible labels in `apps/platform/app/Filament/Resources/EnvironmentReviewResource/Pages/ResolveReviewPublication.php`. - [x] T004 Inspect current rendered structure in `apps/platform/resources/views/filament/resources/environment-review-resource/pages/resolve-review-publication.blade.php`. - [x] T005 Inspect Environment Review blocked CTA behavior in `ViewEnvironmentReview` and `EnvironmentReviewResource`. - [x] T006 Inspect existing Spec 386 Feature and Browser tests to extend them without broad fixture duplication. - [x] T007 Confirm no migration, model, route, navigation, global-search resource, panel provider, queue family, provider service, or auto-publish behavior is required. - [x] T008 Confirm Filament v5 / Livewire v4.0+ compliance and that panel provider registration remains `apps/platform/bootstrap/providers.php`. ## Phase 2: Tests First - Decision Copy and Internal Terms **Purpose**: Prove the residual UX contract before changing copy. - [x] T009 [P] Add or update a Feature/Filament test proving the first visible resolution page copy includes `Review can't be published yet`, required reports, one next safe action, and no-auto-publish copy. - [x] T010 [P] Add assertions that default operator UI does not prominently show `Resolution Case`, `Case Status`, `Current step`, `Resolution steps`, `Report-backed evidence`, `OperationRun`, `Artifact proof`, or raw step keys. - [x] T011 [P] Add assertions that checklist labels and the secondary return navigation/header action use `Check readiness`, `Update required reports`, `Collect evidence`, `Refresh review`, `Prepare export`, and `Return to review` where applicable. - [x] T012 [P] Add assertions that technical proof/history is collapsed by default and appears below decision content. - [x] T013 [P] Add assertions that the resolution page does not show a Publish action. ## Phase 3: Tests First - Confirmation and Authorization UX **Purpose**: Lock the high-impact action safety contract. - [x] T014 [P] Add Filament action tests proving the current step action still requires confirmation through `->requiresConfirmation()`. - [x] T015 [P] Add confirmation copy assertions for required reports: heading `Update required reports?`, submit label `Update required reports`, and no-auto-publish body copy. - [x] T016 [P] Add confirmation copy assertions for collect evidence, refresh review, prepare export, and return-to-review states; if a state cannot be produced safely with existing fixtures, document that specific state and reason in the screenshot/test evidence index. - [x] T017 [P] Add readonly inspection assertions proving page-level permission copy appears and the executable action is disabled or absent. - [x] T018 Add a negative execution assertion proving readonly/direct execution denial dispatches no operation/report/evidence/review-pack job. ## Phase 4: Tests First - State Copy and Customer Boundary **Purpose**: Prove edge states and customer-safe non-leakage. - [x] T019 [P] Add or update tests for waiting/running operation copy and no duplicate start/retry action while the operation is running. - [x] T020 [P] Add or update tests for failed operation copy using safe reason code/normalized copy only. - [x] T021 [P] Add or update tests for ready-to-continue and ready-for-publication copy, proving Publish remains on the Review Detail page only. - [x] T022 [P] Add or update customer workspace regression tests proving no resolution case, step key, OperationRun link, proof link, or internal blocker reason code leaks. ## Phase 5: Implementation - Copy and Local Mappings **Purpose**: Apply the narrow UX hardening with no workflow mechanics. - [x] T023 Update `ResolveReviewPublication::currentStepActionLabelFor()` and the secondary `back_to_review` header action to use `Prepare export` for review-pack generation and `Return to review` for return-to-publication copy where visible to operators. - [x] T024 Update `ResolveReviewPublication::operatorStepLabel()` and `operatorStepDescription()` to use the Spec 387 operator vocabulary consistently through existing localization files/keys where practical. - [x] T025 Update confirmation modal heading/body/submit label logic so each reachable mutating step has localization-backed action-specific copy and a matching submit button. - [x] T026 Add explicit page-level readonly/capability-denied inspection copy when the user may inspect but cannot execute the next step. - [x] T027 Update running, failed, ready-to-continue, ready-for-publication, and no-blocker state copy through existing localization files/keys only as needed to satisfy tests. - [x] T028 Keep `Proof`/`Operation` links neutral and secondary inside collapsed technical proof/history. - [x] T029 Keep `Cancel resolution` inside More, confirmation-gated, authorization-gated, and visually secondary/destructive. - [x] T030 Confirm no page-local Blade logic starts jobs, infers capabilities, calls providers, or decides business readiness. ## Phase 6: Environment Review CTA and Customer Boundary **Purpose**: Align entry and non-leakage surfaces without adding a customer flow. - [x] T031 Update Environment Review blocked CTA surrounding copy if current copy does not clearly state that required publication inputs are missing/stale and `Resolve publication blockers` is the primary action. - [x] T032 Ensure Refresh or Publish is not visually primary while blockers remain. - [x] T033 Ensure Customer Review Workspace receives no new resolution UI; update only safe unavailable/preparing copy if a regression test proves existing copy leaks or overclaims. ## Phase 7: UI/Productization Coverage and Screenshots **Purpose**: Record proportional coverage for the changed strategic surface. - [x] T034 Capture desktop screenshot of Review Detail blocked CTA under `specs/387-review-publication-resolution-decision-ux-v1/artifacts/screenshots/`. - [x] T035 Capture desktop screenshot of resolution decision summary with missing reports. - [x] T036 Capture screenshot of confirmation modal showing action-specific no-auto-publish copy. - [x] T037 Capture screenshots of technical proof collapsed and expanded states. - [x] T038 Capture readonly inspection screenshot with no executable primary action. - [x] T039 Capture mobile screenshot proving the decision card remains first and actions do not overlap. - [x] T040 Capture or document customer workspace no-leakage evidence. - [x] T041 Document unavailable state screenshots in a screenshot index if fixtures cannot produce running, failed, or ready states safely. - [x] T042 Update `docs/ui-ux-enterprise-audit/page-reports/ui-101-review-publication-resolution.md` only if rendered copy/structure materially changes; otherwise record no-new-route/no-archetype rationale in implementation close-out. ## Phase 8: Validation **Purpose**: Prove the narrowed UX hardening and no application scope expansion beyond UI copy/action affordance. - [x] T043 Run `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/EnvironmentReview/Spec387ReviewPublicationResolutionDecisionUxTest.php`. - [x] T044 Run `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/EnvironmentReview/Spec386ReviewPublicationResolutionWorkflowTest.php`. - [x] T045 Run `cd apps/platform && ./vendor/bin/sail php vendor/bin/pest tests/Browser/Spec387ReviewPublicationResolutionDecisionUxTest.php`. - [x] T046 Run `cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent`. - [x] T047 Run `git diff --check`. - [x] T048 Record implementation close-out with Livewire v4 compliance, provider registration location, global search status, destructive/high-impact action handling, asset strategy, localization handling or bounded localization debt, tests run, browser smoke result, deployment impact, and explicit no-new-workflow confirmation. ## Explicit Non-Goals - [x] NT001 Do not modify completed Spec 386 artifacts except as read-only context. - [x] NT002 Do not create migrations, models, new persisted entities, new status/enum families, or new source-of-truth records. - [x] NT003 Do not create a generic workflow engine, adapter registry, cross-domain presenter, or broad resolution UI framework. - [x] NT004 Do not add top-level navigation, a collection route, a Resource, or global search for resolution cases. - [x] NT005 Do not auto-publish reviews or move Publish onto the resolution page. - [x] NT006 Do not change provider, evidence, review refresh, report, or review-pack service behavior except label/copy wiring through existing actions. - [x] NT007 Do not expose internal resolution mechanics to customer-facing surfaces. - [x] NT008 Do not register new Filament assets unless the spec/plan are updated first.