## Summary - add conditional polling support for the tenantless operation run viewer and tenant review pack card - add focused Pest coverage for active vs terminal polling behavior and related review pack access regressions - add the full Spec Kit artifacts for Spec 123, including spec, plan, research, data model, contracts, quickstart, tasks, and checklist ## Testing - `vendor/bin/sail artisan test --compact tests/Feature/OpsUx/RunDetailPollingStopsOnTerminalTest.php tests/Feature/Operations/TenantlessOperationRunViewerTest.php tests/Feature/ReviewPack/ReviewPackWidgetTest.php tests/Feature/ReviewPack/ReviewPackGenerationTest.php tests/Feature/ReviewPack/ReviewPackRbacTest.php` - `vendor/bin/sail bin pint --dirty --format agent` ## Notes - Manual QA task `T014` in the Spec Kit checklist remains to be completed outside this automated flow. - Livewire v4.0+ compliance is unchanged. - No panel provider changes were made; provider registration remains in `bootstrap/providers.php`. - No global-search behavior was changed. - No destructive actions were added or modified. - No new Filament assets were introduced; existing deployment expectations for `php artisan filament:assets` remain unchanged. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #149
2.4 KiB
2.4 KiB
Quickstart — Operations Auto-Refresh Pass
Goal
Implement conditional auto-refresh for the tenantless operation run viewer and the tenant review pack card so active work updates without manual refresh and terminal states remain stable.
Prerequisites
- Laravel Sail services are running.
- A queue worker is available so active states can advance during manual QA.
- Seed or factory data exists for one active and one terminal example of each surface.
Implementation Steps
- Reuse the canonical run-detail polling behavior for
TenantlessOperationRunViewerrather than introducing a second run-detail polling policy. - Add review-pack-card polling that emits a
10sinterval only when the latest tenant review pack isqueuedorgenerating. - Keep terminal review-pack states (
ready,failed,expired) and empty-state rendering non-polling. - Add or update Pest coverage for active-versus-terminal polling behavior on both surfaces.
Automated Verification
Run the smallest relevant test set through Sail:
vendor/bin/sail artisan test --compact tests/Feature/OpsUx/RunDetailPollingStopsOnTerminalTest.phpvendor/bin/sail artisan test --compact tests/Feature/Operations/TenantlessOperationRunViewerTest.phpvendor/bin/sail artisan test --compact tests/Feature/ReviewPack/ReviewPackWidgetTest.php
Then format touched files:
vendor/bin/sail bin pint --dirty --format agent
Manual QA
Tenantless operation run viewer
- Open a queued or running operation at
/admin/operations/{run}. - Keep the page open and confirm the run detail refreshes while the run remains active.
- Let the run finish and confirm the page settles into a stable terminal state without further refresh behavior.
- Open an already-completed run and confirm it loads without active polling.
Tenant review pack card
- Open the tenant-scoped page that renders
TenantReviewPackCard. - Trigger review-pack generation and confirm the card shows in-progress state without manual refresh.
- Wait for the pack to finish and confirm the card settles into
ReadyorFailedwithout continuing to poll. - Re-open a terminal review pack state and confirm no polling markup is present.
Rollback
- Remove the new polling condition from the review pack card.
- Revert any tenantless viewer changes so it falls back to the previous non-refreshing behavior.
- Re-run the targeted Pest files to confirm the rollback is clean.