TenantAtlas/specs/349-customer-review-workspace-output-resolution-guidance/tasks.md
Ahmed Darrazi acdb205e1b
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 3m42s
feat: customer review workspace output resolution guidance (spec 349)
Implemented the output resolution guidance for the customer review workspace and internal views. Added ReviewPackOutputResolutionGuidance, updated CustomerReviewWorkspace and EnvironmentReviewResource, and added related blade views and tests.
2026-06-03 03:31:29 +02:00

120 lines
9.5 KiB
Markdown

# Tasks: Spec 349 - Customer Review Workspace Output Resolution Guidance
**Input**: `specs/349-customer-review-workspace-output-resolution-guidance/spec.md`, `plan.md`, `repo-truth-map.md`, and `checklists/requirements.md`
**Tests**: Required. This is a runtime guidance and trust-surface change on existing review-pack, workspace, and review-detail paths.
## Test Governance Checklist
- [x] Lane assignment is explicit and narrow: Feature for mapping and surface behavior, Browser for first-screen trust proof.
- [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 profiles (`global-context-shell` and `shared-detail-family`) are explicit.
- [x] Any derived-state expansion remains presentation-only and does not create a hidden new domain state family.
## Phase 1: Preparation And Repo Truth
**Purpose**: Keep the implementation bounded to existing readiness truth and current workspace/detail surfaces.
- [x] T001 Re-read `spec.md`, `plan.md`, `repo-truth-map.md`, and `checklists/requirements.md` before runtime changes.
- [x] T002 Re-read related historical context only: Specs 258, 308, 311, 326, 342, 343, 344, and 347. Do not modify their artifacts.
- [x] T003 Re-verify current runtime truth in:
- `apps/platform/app/Support/ReviewPacks/ReviewPackOutputReadiness.php`
- `apps/platform/app/Filament/Pages/Reviews/CustomerReviewWorkspace.php`
- `apps/platform/resources/views/filament/pages/reviews/customer-review-workspace.blade.php`
- `apps/platform/app/Filament/Resources/EnvironmentReviewResource.php`
- `apps/platform/app/Filament/Resources/EnvironmentReviewResource/Pages/ViewEnvironmentReview.php`
- [x] T004 Keep `specs/349-customer-review-workspace-output-resolution-guidance/repo-truth-map.md` updated if implementation-time inspection reveals a narrower or broader bounded truth.
- [x] T005 Confirm no migration, package, env var, queue family, scheduler change, storage-topology change, panel/provider change, or global-search 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`.
## Phase 2: Tests First
**Purpose**: Lock the operator-guidance behavior before runtime refactor.
- [x] T008 Add `apps/platform/tests/Feature/ReviewPack/Spec349ReviewPackResolutionGuidanceTest.php`.
- [x] T009 Add `apps/platform/tests/Feature/Filament/Spec349CustomerReviewWorkspaceOutputGuidanceTest.php`.
- [x] T010 Add `apps/platform/tests/Feature/EnvironmentReview/Spec349EnvironmentReviewOutputGuidanceTest.php`.
- [x] T011 Add `apps/platform/tests/Browser/Spec349OutputResolutionGuidanceSmokeTest.php`.
- [x] T012 Add assertions that the workspace shows exactly one dominant output state and exactly one primary next action.
- [x] T013 Add assertions that grouped limitations appear compactly and technical details stay collapsed/secondary by default.
- [x] T014 Add assertions that PII/internal-only output shows an explicit warning before customer-safe wording.
- [x] T015 Add assertions that download labels are qualified honestly for customer-safe, internal-only, limited, and not-ready states.
- [x] T016 Add assertions that Environment Review detail separates review status, output readiness, and publication/sharing state.
- [x] T017 Reuse or extend current regressions such as:
- `apps/platform/tests/Feature/ReviewPack/Spec347ReviewPackOutputContractTest.php`
- `apps/platform/tests/Feature/ReviewPack/Spec347ReviewPackReadinessSemanticsTest.php`
- `apps/platform/tests/Feature/Filament/Spec347CustomerReviewWorkspaceOutputReadinessTest.php`
- `apps/platform/tests/Feature/Filament/Spec342CustomerReviewWorkspaceConsumptionTest.php`
- `apps/platform/tests/Feature/Reviews/CustomerReviewWorkspacePageTest.php`
- `apps/platform/tests/Feature/Reviews/CustomerReviewWorkspacePackAccessTest.php`
- `apps/platform/tests/Feature/EnvironmentReview/EnvironmentReviewUiContractTest.php`
## Phase 3: Guidance Mapping
**Purpose**: Build one bounded derived mapping from readiness truth to operator guidance.
- [x] T018 Choose the narrowest implementation home:
- extend `apps/platform/app/Support/ReviewPacks/ReviewPackOutputReadiness.php`, or
- add `apps/platform/app/Support/ReviewPacks/ReviewPackOutputResolutionGuidance.php`
- [x] T019 Derive display state, label, severity, primary reason, impact, primary action, grouped limitations, secondary actions, and technical details from existing readiness truth only.
- [x] T020 Keep any added states such as `publication_blocked` or `internal_only` presentation-only; do not create new persisted enums or workflow states.
- [x] T021 Map existing limitation codes to plain-language operator guidance and repo-real destinations using current scoped route helpers.
- [x] T022 Keep the mapping shared enough to prevent workspace/detail wording drift, but bounded enough to avoid a generic workflow-resolution framework.
## Phase 4: Customer Review Workspace Update
**Purpose**: Turn the current readiness truth into one calm first-screen decision.
- [x] T023 Update `apps/platform/app/Filament/Pages/Reviews/CustomerReviewWorkspace.php` to consume the bounded guidance mapping instead of scattered reason/action logic.
- [x] T024 Update `apps/platform/resources/views/filament/pages/reviews/customer-review-workspace.blade.php` so the decision card shows one output state, one reason, one impact statement, and one primary action.
- [x] T025 Add a compact grouped limitations disclosure with supporting actions and collapsed technical details.
- [x] T026 Qualify review-pack download labels and surrounding copy without weakening existing signed-download safety or authorization.
- [x] T027 Preserve current acknowledgement, findings, accepted-risk, and proof sections unless a minimal hierarchy adjustment is required to support the one-blocker rule.
- [x] T028 Preserve the visible `environment_id` workspace filter contract and avoid reintroducing hidden topbar or shell-context behavior.
- [x] T029 Ensure grouped limitation disclosure, details toggles, and status text remain text-backed, keyboard-reachable, and not color-only.
## Phase 5: Environment Review Detail Update
**Purpose**: Separate review publication truth from output-readiness truth on the detail surface.
- [x] T030 Update `apps/platform/app/Filament/Resources/EnvironmentReviewResource.php` infolist presentation if needed so the detail summary exposes distinct status dimensions cleanly.
- [x] T031 Update `apps/platform/app/Filament/Resources/EnvironmentReviewResource/Pages/ViewEnvironmentReview.php` or the supporting infolist state so the detail surface shows review status, output readiness, and publication/sharing state separately.
- [x] T032 Keep fingerprint, raw proof metadata, and support-only detail secondary or hidden in customer-workspace mode.
- [x] T033 Preserve existing customer-workspace-mode access, header-action narrowing, and lifecycle-action behavior outside customer-workspace mode.
## Phase 6: Copy, Audit, And Browser Proof
**Purpose**: Align wording and audit artifacts with the bounded guidance model.
- [x] T034 Update only the required output-guidance localization keys in:
- `apps/platform/lang/en/localization.php`
- `apps/platform/lang/de/localization.php`
- [x] T035 Update `docs/ui-ux-enterprise-audit/page-reports/ui-006-customer-review-workspace.md` with the one-primary-action rule, grouped limitation disclosure, and repo-truth note about the user-draft `ui-009` conflict.
- [x] T036 If implementation proves a second durable page report is required, create it under the next repo-real identity instead of reusing `ui-009`.
- [x] T037 Capture browser screenshots under `specs/349-customer-review-workspace-output-resolution-guidance/artifacts/screenshots/`.
## Phase 7: Validation
**Purpose**: Prove the guidance mapping and preserve existing safety.
- [x] T038 Run `cd apps/platform && ./vendor/bin/sail artisan test tests/Feature/ReviewPack/Spec349ReviewPackResolutionGuidanceTest.php tests/Feature/Filament/Spec349CustomerReviewWorkspaceOutputGuidanceTest.php tests/Feature/EnvironmentReview/Spec349EnvironmentReviewOutputGuidanceTest.php --compact`.
- [x] T039 Run `cd apps/platform && ./vendor/bin/sail php vendor/bin/pest tests/Browser/Spec349OutputResolutionGuidanceSmokeTest.php --compact`.
- [x] T040 Run `cd apps/platform && ./vendor/bin/sail artisan test --compact --filter=Spec347`.
- [x] T041 Run `cd apps/platform && ./vendor/bin/sail artisan test --compact --filter=CustomerReviewWorkspace`.
- [x] T042 Run `cd apps/platform && ./vendor/bin/sail artisan test --compact --filter=ReviewPack`.
- [x] T043 Run `cd apps/platform && ./vendor/bin/sail pint --dirty`.
- [x] T044 Run `git diff --check`.
- [x] T045 Report any unrelated broader-suite failures honestly if they remain out of scope.
## Non-Goals Checklist
- [x] NT001 Do not create a new persisted resolution entity, table, or status family.
- [x] NT002 Do not add a workflow engine, approval engine, or queue family.
- [x] NT003 Do not build a Customer Portal or Review Pack PDF/HTML renderer.
- [x] NT004 Do not rewrite Review Pack generation or reopen Spec 347 contract truth broadly.
- [x] NT005 Do not redesign Governance Inbox or broadly redesign Customer Review Workspace outside the output-guidance slice.
- [x] NT006 Do not weaken existing workspace/environment scope, policies, or signed-download safety.