Automated PR created by Codex via Gitea API. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #458
10 KiB
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
- Lane assignment is named and is the narrowest sufficient proof for changed UI/action behavior.
- New or changed tests stay in focused Feature/Filament/Browser families.
- Shared helpers, factories, seeds, fixtures, and context defaults stay cheap by default.
- Planned validation commands cover the change without pulling unrelated lane cost.
- The workflow-detail surface test profile and browser smoke need are explicit.
- 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.
- T001 Confirm current branch/status and re-read
specs/387-review-publication-resolution-decision-ux-v1/spec.md,plan.md, andtasks.md. - T002 Re-read
specs/386-review-publication-resolution-workflow-v1/spec.md,plan.md, andtasks.mdas completed implementation context only; do not rewrite that package. - T003 Inspect current visible labels in
apps/platform/app/Filament/Resources/EnvironmentReviewResource/Pages/ResolveReviewPublication.php. - T004 Inspect current rendered structure in
apps/platform/resources/views/filament/resources/environment-review-resource/pages/resolve-review-publication.blade.php. - T005 Inspect Environment Review blocked CTA behavior in
ViewEnvironmentReviewandEnvironmentReviewResource. - T006 Inspect existing Spec 386 Feature and Browser tests to extend them without broad fixture duplication.
- T007 Confirm no migration, model, route, navigation, global-search resource, panel provider, queue family, provider service, or auto-publish behavior is required.
- 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.
- 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. - 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. - 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, andReturn to reviewwhere applicable. - T012 [P] Add assertions that technical proof/history is collapsed by default and appears below decision content.
- 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.
- T014 [P] Add Filament action tests proving the current step action still requires confirmation through
->requiresConfirmation(). - T015 [P] Add confirmation copy assertions for required reports: heading
Update required reports?, submit labelUpdate required reports, and no-auto-publish body copy. - 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.
- T017 [P] Add readonly inspection assertions proving page-level permission copy appears and the executable action is disabled or absent.
- 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.
- T019 [P] Add or update tests for waiting/running operation copy and no duplicate start/retry action while the operation is running.
- T020 [P] Add or update tests for failed operation copy using safe reason code/normalized copy only.
- T021 [P] Add or update tests for ready-to-continue and ready-for-publication copy, proving Publish remains on the Review Detail page only.
- 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.
- T023 Update
ResolveReviewPublication::currentStepActionLabelFor()and the secondaryback_to_reviewheader action to usePrepare exportfor review-pack generation andReturn to reviewfor return-to-publication copy where visible to operators. - T024 Update
ResolveReviewPublication::operatorStepLabel()andoperatorStepDescription()to use the Spec 387 operator vocabulary consistently through existing localization files/keys where practical. - 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.
- T026 Add explicit page-level readonly/capability-denied inspection copy when the user may inspect but cannot execute the next step.
- 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.
- T028 Keep
Proof/Operationlinks neutral and secondary inside collapsed technical proof/history. - T029 Keep
Cancel resolutioninside More, confirmation-gated, authorization-gated, and visually secondary/destructive. - 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.
- 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 blockersis the primary action. - T032 Ensure Refresh or Publish is not visually primary while blockers remain.
- 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.
- T034 Capture desktop screenshot of Review Detail blocked CTA under
specs/387-review-publication-resolution-decision-ux-v1/artifacts/screenshots/. - T035 Capture desktop screenshot of resolution decision summary with missing reports.
- T036 Capture screenshot of confirmation modal showing action-specific no-auto-publish copy.
- T037 Capture screenshots of technical proof collapsed and expanded states.
- T038 Capture readonly inspection screenshot with no executable primary action.
- T039 Capture mobile screenshot proving the decision card remains first and actions do not overlap.
- T040 Capture or document customer workspace no-leakage evidence.
- T041 Document unavailable state screenshots in a screenshot index if fixtures cannot produce running, failed, or ready states safely.
- T042 Update
docs/ui-ux-enterprise-audit/page-reports/ui-101-review-publication-resolution.mdonly 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.
- T043 Run
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/EnvironmentReview/Spec387ReviewPublicationResolutionDecisionUxTest.php. - T044 Run
cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/EnvironmentReview/Spec386ReviewPublicationResolutionWorkflowTest.php. - T045 Run
cd apps/platform && ./vendor/bin/sail php vendor/bin/pest tests/Browser/Spec387ReviewPublicationResolutionDecisionUxTest.php. - T046 Run
cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent. - T047 Run
git diff --check. - 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
- NT001 Do not modify completed Spec 386 artifacts except as read-only context.
- NT002 Do not create migrations, models, new persisted entities, new status/enum families, or new source-of-truth records.
- NT003 Do not create a generic workflow engine, adapter registry, cross-domain presenter, or broad resolution UI framework.
- NT004 Do not add top-level navigation, a collection route, a Resource, or global search for resolution cases.
- NT005 Do not auto-publish reviews or move Publish onto the resolution page.
- NT006 Do not change provider, evidence, review refresh, report, or review-pack service behavior except label/copy wiring through existing actions.
- NT007 Do not expose internal resolution mechanics to customer-facing surfaces.
- NT008 Do not register new Filament assets unless the spec/plan are updated first.