TenantAtlas/specs/371-core-operator-view-surfaces-productization/tasks.md
ahmido 8713b35da5 feat(ui): implement core operator view surfaces productization for backup sets (#442)
Applied the decision-first global surface IA contract to BackupSet views. Includes decision summary header, usability status, and separation of technical metadata.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #442
2026-06-11 07:38:33 +00:00

10 KiB

Tasks: Spec 371 - Core Operator View Surfaces Productization Pass v1

Input: specs/371-core-operator-view-surfaces-productization/spec.md, plan.md, and artifacts. Prerequisites: Review completed context specs as read-only: 328, 330, 335, 352, 367, 369, 370. Do not edit them.

Tests: Focused Feature/Livewire tests for Backup Set list/detail and bounded Browser smoke for Backup Set list/detail screenshots.

Phase 1: Preparation Guardrails

  • T001 Re-read spec.md, plan.md, tasks.md, checklists/requirements.md, .specify/memory/constitution.md, docs/ai-coding-rules.md, docs/architecture-guidelines.md, docs/filament-guidelines.md, docs/security-guidelines.md, docs/testing-guidelines.md, and docs/performance-guidelines.md.
  • T002 Confirm current branch and working tree with git status --short --branch; do not continue over unrelated dirty files.
  • T003 Confirm completed context specs are read-only: specs/328-*, specs/330-*, specs/335-*, specs/352-*, specs/367-*, specs/369-*, and specs/370-*.
  • T004 Inspect Spec 368 backup-set source evidence in audit.md, findings.md, page-scorecard.csv, spec-candidates.md, artifacts/raw/browser-captures.json, and screenshot artifacts/screenshots/admin/005-workflow-surface-view-backup-set.png.
  • T005 Inspect current backup-set UI implementation in apps/platform/app/Filament/Resources/BackupSetResource.php, Pages/ListBackupSets.php, Pages/ViewBackupSet.php, and RelationManagers/BackupItemsRelationManager.php.
  • T006 Inspect existing backup-set tests under apps/platform/tests/Feature/Filament, apps/platform/tests/Feature/BackupSets, apps/platform/tests/Unit/Badges, and relevant browser harnesses.
  • T007 Confirm no migration, package, env var, queue, scheduler, storage, Graph, panel-provider, or Filament asset change is required; update spec/plan before coding if false.
  • T008 Confirm Filament v5 / Livewire v4 compliance and no Livewire v3 or Filament v3/v4 APIs.
  • T009 Confirm panel provider registration remains apps/platform/bootstrap/providers.php.
  • T010 Confirm BackupSetResource global-search metadata is not enabled. If touched, explicitly preserve effective non-participation or update spec/plan/tests before enabling scoped search.

Phase 2: Source Artifacts And Page Contracts

  • T011 Update artifacts/source-audit-summary.md if new repo truth is discovered.
  • T012 Update artifacts/affected-files.md with actual touched files before runtime edits.
  • T013 Update artifacts/page-contracts.md with final Backup Sets list/detail target hierarchy and regression-only status for completed context surfaces.
  • T014 Update artifacts/before-after-screenshot-index.md with expected screenshot targets before browser work.
  • T015 Keep artifacts/implementation-notes.md, browser-verification-report.md, and validation-report.md current during implementation.

Phase 3: User Story 1 - Decide Backup Usability Quickly (P1)

Goal: Backup Set detail answers usability, reason, impact, item count, current degradation/blocker, and safest next action before technical metadata.

  • T016 [P] Add failing Feature/Livewire coverage for a healthy usable backup set in apps/platform/tests/Feature/Filament/Spec371BackupSetProductizationTest.php, with a fail-hard Graph client binding or equivalent assertion proving the render path does not call Graph.
  • T017 [P] Add failing Feature/Livewire coverage for a degraded backup set showing action-needed truth before optimistic restore copy.
  • T018 [P] Add failing Feature/Livewire coverage for an empty/incomplete backup set explaining the blocker without raw payload/default technical context.
  • T019 Recompose Backup Set detail in BackupSetResource / ViewBackupSet so the first visible section is a decision summary with usability/readiness, reason, impact, item count, degradation/blocker if present, and one primary next action that already exists safely in repo behavior.
  • T020 Make included backup items the primary main content below the summary, using existing BackupItemsRelationManager or existing item table structures.
  • T021 Demote lifecycle/timing/source operation/raw IDs/provider/internal metadata into secondary, sidebar, or collapsed technical details.
  • T022 Ensure no false restore safety, recovery proof, customer-safe, compliant, or protected claims appear unless current repo truth supports them.

Phase 4: User Story 2 - Preserve Dangerous Action Safety (P1)

Goal: Existing soft-delete restore/archive/delete/add/remove/operation actions keep existing confirmation, authorization, audit, notification, and OperationRun behavior.

  • T023 [P] Add or extend tests asserting readonly/unauthorized users cannot execute backup-set mutating actions.
  • T024 [P] Add or extend tests asserting wrong-workspace/wrong-environment backup-set access remains deny-as-not-found before content/action leakage.
  • T025 [P] Add or extend tests asserting destructive/high-impact actions still use confirmation, server-side authorization, audit expectations, and safe placement.
  • T026 Keep existing action handlers on their current service/job/audit/OperationRun paths; do not move business logic into Filament closures.
  • T027 Do not introduce or promote a new restore-from-backup action/link from Backup Set list/detail; keep existing soft-delete restore and restore-adjacent copy state-aware, secondary, and repo-truth based.
  • T028 Keep operation links canonical and scope-safe through existing OperationRun link helpers.

Phase 5: User Story 3 - Make Backup Sets List Scan-First (P2)

Goal: The Backup Sets list prioritizes backup usability/quality, item count, degradation, and inspect/open path.

  • T029 [P] Add Feature/Livewire coverage for list rows showing quality/usability, item count, degradation when present, and an inspect/open path, with no Graph render call if not already proven by T016.
  • T030 [P] Add Feature/Livewire coverage that healthy rows avoid repeated zero/no-issue/no-degradation noise.
  • T031 [P] Add Feature/Livewire coverage for a specific capability-aware empty state and one create/capture CTA when authorized.
  • T032 Update ListBackupSets / BackupSetResource::table() so visible columns and row/header actions match the scan-first contract.
  • T033 Ensure operation links remain reachable but do not compete with the primary open/inspect backup path.
  • T034 Verify visible relationship-backed columns are eager loaded or query-safe.

Phase 6: User Story 4 - Browser Proof And Completed-Surface Regression Safety (P3)

Goal: Capture backup-set browser proof and avoid reopening completed surfaces.

  • T035 Inspect existing browser harness and fixture commands before adding any fixture; prefer reuse.
  • T036 Add bounded browser smoke in apps/platform/tests/Browser/Spec371BackupSetProductizationSmokeTest.php for Backup Sets list/detail.
  • T037 Capture after screenshots under specs/371-core-operator-view-surfaces-productization/artifacts/screenshots/, including list and detail at minimum.
  • T038 Update artifacts/before-after-screenshot-index.md with before/after mappings and blocked pages if any.
  • T039 Update artifacts/browser-verification-report.md with URLs, auth/fixture, screenshots, scores before/after, remaining issues, and blocked pages.
  • T040 Confirm completed context surfaces are not edited. If a shared helper change affects them, stop and update spec.md/plan.md before continuing.

Phase 7: UI Audit Registry And Validation

  • T041 Update docs/ui-ux-enterprise-audit/page-reports/ui-013-environment-backup-sets.md with the implementation result and screenshot references.
  • T042 Update docs/ui-ux-enterprise-audit/route-inventory.md, design-coverage-matrix.md, strategic-surfaces.md, or unresolved-pages.md only if route/browser/coverage status changes; otherwise record a no-count-change rationale in validation-report.md.
  • T043 Run cd apps/platform && ./vendor/bin/sail artisan test --compact --filter=Spec371.
  • T044 Run cd apps/platform && ./vendor/bin/sail artisan test --compact --filter=BackupSet.
  • T045 Run cd apps/platform && ./vendor/bin/sail php vendor/bin/pest tests/Browser/Spec371BackupSetProductizationSmokeTest.php --compact.
  • T046 Run cd apps/platform && ./vendor/bin/sail pint --dirty.
  • T047 Run git diff --check.
  • T048 Update artifacts/validation-report.md with branch, HEAD, dirty state, commands, test/browser results, runtime files changed, limitations, and recommended follow-up.
  • T049 Confirm no application/runtime implementation happened during preparation, and during implementation no out-of-scope runtime files were changed without spec/plan update.
  • T050 Record final Livewire v4 compliance, provider registration location, global-search posture, destructive/high-impact action confirmation/authorization/audit status, asset strategy, tests, deployment impact, and Guardrail / Exception / Smoke Coverage in the implementation close-out response.

Dependencies

  • Phase 1 before runtime edits.
  • Phase 2 before browser/report close-out.
  • Phase 3 and Phase 4 before Phase 6 screenshots.
  • Phase 7 after runtime changes.

Parallel Execution Examples

  • T004, T005, and T006 can run in parallel.
  • T016, T017, T018, T023, T024, T025, T029, T030, and T031 can be drafted in parallel if the fixture shape is coordinated.
  • T041 and T042 can run after screenshots and browser report are available.

Test Governance Checklist

  • Lane assignment is named and is the narrowest sufficient proof for the changed behavior.
  • New or changed tests stay in the smallest honest family, and browser coverage 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 (backup/restore strategic surface / shared-detail-family) is explicit.
  • Any material budget, baseline, trend, or escalation note is recorded in the active spec or PR.

Explicit Non-Goals

  • No migrations, models, services/jobs beyond existing backup action paths, policies, routes, Graph contracts, provider adapters, new operation types, new restore-from-backup action/link from Backup Set list/detail, global UI framework, customer/auditor surfaces, system panel, provider connections, restore execution logic, backup capture logic, or completed-spec package edits unless the spec/plan is updated first.