Repository navigation
fix(ui): stop dismissed lazy retries from reloading the page - #130988
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 11:02 AM ET / 15:02 UTC. ClawSweeper reviewWhat this changesThe PR prevents a dismissed or replaced lazy-panel retry from later reloading the Control UI and replaying an obsolete action. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open: current main still reloads after a successful stale-retry probe without checking whether the lazy request was dismissed, while this branch carries that ownership check through the probe and persistence boundary. No concrete patch defect was found; exact-head CI is still running and the protected maintainer item must remain open for normal landing review. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe Control UI lazily loads optional panels and recovers from stale deployed bundles. A retry probes Gateway reachability, persists the pending panel action when possible, and reloads only while that same action still owns recovery. flowchart LR
A[Lazy panel load fails] --> B[Recovery dialog]
B --> C[Retry request]
C --> D[Gateway reachability probe]
D --> E{Request still owns recovery}
E -->|Yes| F[Persist pending action]
F --> G[Reload and replay action]
E -->|No| H[Keep current document]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -10, Tests +280. Total +270 across 9 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the two-stage request-identity and persistence predicate at the shell action owner, land after the focused browser checks pass, and keep the separate storage-denied cross-document handoff work with #127733. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main starts a stale retry without request ownership and reloads once its asynchronous reachability probe succeeds. The added owner and Chromium scenarios encode Retry followed by Close, replacement, context change, and disconnect, but were not executed in this read-only review. Is this the best way to solve the issue? Yes. Moving the decision to the shell action owner lets the shared reload helper remain reusable for URL-owned paths while requiring current request identity and successful action persistence immediately before navigation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5090935817e3. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
The final published head is I read the completed ClawSweeper review and its rank-up list. The requested storage-denied and Retry-then-Close browser checks already completed against this exact source: dismissed recovery stays at one document request, while a current action with working storage reloads and replays once. Additional real Chromium/HTTP proof permanently retires the old asset: denied storage retains the visible error and exact pending action through two Retry clicks, and Close clears it; working storage loads a fresh document and new module hash and replays once. Screenshots use only synthetic fixtures. Native WebKit and live-provider behavior are not claimed. This intentionally preserves the current document when the action cannot be persisted. It does not solve cross-document recovery with denied storage, and #127733 remains open for that separate handoff problem. The stored action format is unchanged; no URL, cookie, new storage format, or compatibility path was introduced. The owner repair removes 10 net production lines. Native preparation and merge remain the final gates. |
|
Merged via squash.
|
…w#130988) * fix(ui): retain lazy recovery ownership through reload * refactor(ui): simplify pending action dispatch
…ecovery Automatic recovery now waits through outages, so closing a failed lazy surface must retire the pending reload for the running build (#130988 contract). Gateway build targets keep their recovery; surfaces still showing a failure re-arm it on render.
…ed surface Escape on a pending command palette retires the lazy request through abandon(), not close(), so the dismissal contract (#130988) must live there. A successful in-place retry also abandons and no longer leaves a needless page reload pending.
Related: #127733 (the separate storage-denied handoff gap remains unresolved).
What Problem This Solves
Fixes an issue where users who pressed Retry on a failed lazy-loaded panel could close the dialog or choose another action, then unexpectedly have the entire page reload when the earlier reachability probe finished. The retired request could also replay an obsolete saved action.
Why This Change Was Made
The lazy request controller now carries its current-request check through the asynchronous document probe. The shell action owner permits navigation only while the same request and pending event still own recovery and the exact event was successfully saved for replay. The URL-owned standalone document paths retain their existing recovery behavior.
The saved-action writer reports actual persistence success and clears an obsolete record after a failed replacement. This removes the separate raw-presence predicate that treated unavailable storage as a saved action, reuses the shared guarded storage accessor, and derives the event type from its existing canonical list. Production is +44/-54 (net -10); tests are +286/-6.
User Impact
Close and replacement actions remain authoritative while Retry waits for the Gateway. A dismissed request cannot later navigate the page or replay an old panel action. With working storage, an active action still reloads into the fresh UI and replays once.
When the action cannot be saved, recovery retains the visible error and in-memory intent rather than navigating without it. This is an explicit change to degraded behavior. It does not solve permanently retired assets when session storage is denied: two real Retry clicks in that case still show the error; Close clears the pending action. #127733 remains the named follow-up for an action-preserving cross-document handoff. No new URL, cookie, storage format or alternate handoff is introduced here.
Evidence
Baseline stale-module dialog before the interaction (synthetic test data):
Candidate after Retry then Close: the original document remains visible; the request count, rather than the still image alone, proves no later reload: