Repository navigation
fix(ui): retain cloud profiles after refresh failure - #128996
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Inspected Control UI proof for the persistent cloud-profile refresh failure:
The attached 38-second recording covers the complete post-fix sequence. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 12:09 AM ET / 04:09 UTC. ClawSweeper reviewWhat this changesThe PR retains the last successful same-Gateway cloud profile catalog after refresh retries fail and adds a mocked Chromium flow proving the retained destination can still start a session. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open for explicit maintainer landing review: no blocking patch defect surfaced, and this protected maintainer-authored UI repair has a focused owner-boundary fix and browser regression coverage. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
Recorded live on the PR head ( How this fits togetherThe Control UI New Session page refreshes its cloud placement catalog from the Gateway. That catalog feeds the destination picker and submission gate before the UI dispatches a cloud session. flowchart LR
A[Gateway topology event] --> B[New Session page]
B --> C[Cloud catalog refresh]
C --> D{Refresh succeeds?}
D -->|yes| E[Replace catalog snapshot]
D -->|no| F[Retry and retain prior snapshot]
E --> G[Picker and session dispatch]
F --> G
Decision needed
Why: The maintainer label and MEMBER authorship require explicit human handling even though the source review found no blocking defect. Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +86. Total +86 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one last successful catalog per Gateway identity, replace it only with a successful response, and clear it on authoritative identity invalidation before landing the validated repair. Do we have a high-confidence way to reproduce the issue? Yes, from source: a successful cloud catalog followed by a same-Gateway refresh failure reaches the destructive error and retry-exhaustion paths; the added E2E encodes that sequence at the browser/Gateway boundary. Is this the best way to solve the issue? Yes. The state owner, rather than the picker or submit consumer, retains the existing same-Gateway snapshot while authoritative empty responses and identity invalidation still clear it. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 935c555c98d6. 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
|
|
Land-ready proof for exact head
Root cause and repair: a failed same-Gateway refresh overwrote the last successful profile snapshot and later manufactured an authoritative empty catalog. The owner now retains its successful fact through failed refreshes; successful empty reads and Gateway identity invalidation still clear it, and sessions.dispatch remains the authoritative validator. |
|
Merged via squash.
|





Closes #128988
What Problem This Solves
A persistent
environments.listrefresh failure on the New Session page erased the last successful cloud profile and machine catalog. After all retries failed, a selectedaws · Fastdestination degraded into a disabledCloud · awsplaceholder with “This session target is unavailable,” even though the Gateway had never authoritatively removed that profile.Why This Change Was Made
The Gateway discovery state already owns one same-Gateway catalog snapshot. Failed reads now leave that last successful profile, environment, machine metadata, and readiness fact intact while retrying. Retry exhaustion no longer turns a failed refresh into an authoritative empty response when a successful snapshot exists.
Initial discovery behavior remains unchanged: if no catalog has ever loaded, exhausting retries still resolves to an empty ready result so stored placement preferences can settle. A real successful empty response and Gateway owner/identity invalidation still clear the snapshot. No fallback cache, compatibility path, config, or duplicated discovery state was added.
Production LOC: +5/-5 (net 0) | Tests: +86/-0
AI-assisted: yes. I reviewed New Session profile discovery ownership, retry exhaustion, Gateway identity invalidation, preference restoration, submit gates, machine selection, and dispatch payloads.
User Impact
Operators can keep using an already discovered Cloud destination during a catalog outage. The selected profile and machine remain visible and enabled after retries exhaust, and session creation still dispatches the same authoritative
profileIdandmachineClassfor Gateway validation.Evidence
aws · Fasttoaws · fast; the picker showed a disabledCloud · awsrow and “This session target is unavailable.”Fastmachine metadata, re-enable Start session after requests settle, and dispatchprofileId: "aws"plusmachineClass: "fast".node scripts/check-changed.mjspassed UI/core-test typechecks, lint, formatting, i18n verification, dead exports, architecture guards, and package/dependency checks.