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.