2.7 KiB
2.7 KiB
Implementation Plan: Spec 332 - Restore Run Preview Productization (Wizard Safety Gates)
- Branch:
332-product-process-flow-system-v1 - Date: 2026-05-24
- Spec:
specs/332-restore-run-preview-productization/spec.md
Summary
Productize the Restore Run wizard preview step so it remains decision-first and truthfully gated:
- Block navigation to confirmation until checks + preview are current and execution is technically allowed.
- Collapse “safety gates” detail by default; show concise guidance first.
- Improve preview toast copy so it communicates real meaning (no scope, no changes, changes).
Affected Surfaces / Files
- Wizard logic:
apps/platform/app/Filament/Resources/RestoreRunResource.php
- Copy:
apps/platform/app/Support/RestoreSafety/RestoreSafetyCopy.php
- Preview component:
apps/platform/resources/views/filament/forms/components/restore-run-preview.blade.php
- Tests:
apps/platform/tests/Feature/Filament/RestoreRunPreviewProductizationTest.phpapps/platform/tests/Browser/Spec332RestoreRunWizardPreviewSmokeTest.php
Technical Approach
-
Wizard gate enforcement
- Add
afterValidationgate on the Preview step. - Evaluate existing restore safety state (
wizardSafetyState) to check:- preview integrity is current
- checks integrity is current
- execution readiness is allowed
- Block navigation using
Filament\Support\Exceptions\Haltand a clear Notification message.
- Add
-
Decision-first preview UI
- Keep safety details collapsed by default, with an explicit “View safety gates” affordance.
- Ensure primary preview content remains readable (avoid noisy type/platform copy in the main list).
-
Tests
- Feature test: confirmation guidance copy and preview readability.
- Browser smoke: run checks + generate preview, then assert gates are collapsed and execution is shown as unavailable.
Validation Commands
Narrow first:
cd apps/platform && ./vendor/bin/sail artisan test tests/Feature/Filament/RestoreRunPreviewProductizationTest.php --compactcd apps/platform && ./vendor/bin/sail artisan test tests/Feature/Filament/RestorePreviewTest.php --compactcd apps/platform && ./vendor/bin/sail artisan test tests/Feature/Filament/RestoreSafetyIntegrityWizardTest.php --compact
Browser smoke:
cd apps/platform && ./vendor/bin/sail php vendor/bin/pest tests/Browser/Spec332RestoreRunWizardPreviewSmokeTest.php --compact
Formatting:
cd apps/platform && ./vendor/bin/sail pint --dirtygit diff --check
Dependencies
- Spec 334 (nested Filament/Livewire context hardening) must be present on the branch to avoid tenantless Livewire update crashes during wizard smoke validation.