Repository navigation
fix(ui): recover failed new-session navigation without duplicate tasks - #126873
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 7:15 PM ET / 23:15 UTC. ClawSweeper reviewWhat this changesThe PR retains a committed session after failed Control UI chat navigation so retry opens that same session without creating or starting another one. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessThis PR is still necessary: current main discards failed new-session chat navigation, while this patch preserves the committed session and retries navigation without recreating it. No blocking patch defect was found; await exact-head CI. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherControl UI submission creates a Gateway session or starts a placement, selects it, then transitions to chat. The patch adds a private retry record for that handoff and retires it when the draft, Gateway, session, or agent ownership changes. flowchart LR
A[New session form] --> B[Submission flow]
B --> C[Gateway create or placement start]
C --> D[Committed session claim]
D --> E[Select session and build chat route]
E --> F[Chat transition]
F --> G[Visible error and same-session retry]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +35, Tests +186. Total +221 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the retry record private to the submission-to-chat handoff, retain its lifecycle regressions, and land after exact-head CI completes with the documented UI-proof constraint accepted or replaced by a redacted browser run. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main discards the failed chat transition after creation, and the focused regression tests inject that failure at the owner boundary. Is this the best way to solve the issue? Yes: an exact private committed-session/client/agent claim at the submission owner is safer than retrying the create or placement-start side effect. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e78b9d3ce4aa. 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
|
|
Merged via squash.
|
openclaw#126873) * fix(ui): preserve committed sessions when chat navigation fails * test(ui): keep committed-session retry fixtures fully typed
What Problem This Solves
Fixes an issue where users creating a new Control UI session would see no explanation when the session was created successfully but loading its chat page failed. Retrying could create a duplicate normal session, while a cloud/device placement could leave the Start action incorrectly disabled after its session had already started.
Why This Change Was Made
New-session navigation now owns the exact already-committed Gateway client, selected session, and agent. A failed chat transition remains visible, and retrying opens the same committed session without creating or starting it again. The existing submission gate, attachment-read lifecycle, draft edits, Gateway changes, selected-session/agent changes, terminal starts, and teardown retire or fence that private claim appropriately. Optional route preloading keeps its existing direct-navigation recovery.
User Impact
Operators receive a visible error if a newly created task cannot open. They can safely retry the same existing normal or cloud/device task without duplicate sessions or duplicate remote startup, while attachment reads and switching to Start in Terminal remain safe.
Evidence
DraftSubmissionFlow.submit()paths failed before the fix when an already committed session's realnavigateAndWaitrejected. An independently discovered normal double-submit created two sessions and the placement flow incorrectly disabled retry; both now navigate the same committed session with exactly one create/start.sessions.catalog.startTerminalleaving an obsolete chat retry alive. Both now pass at their canonical owners.git diff --checkall pass. The final full independent owner-boundary review and authenticated full committed Codex review found no actionable issues.@panzoom/panzoomimport inui/src/components/image-lightbox.tsis unavailable; installing dependencies in linked worktrees is prohibited. Zero browser scenarios were executed. Actual public submission owners, Gateway requests, placement startup, terminal action, transition/preload, visible error state, and user-retry contracts are exercised directly by the passing suites.506bf5dc68d40de631f43d23ed8036da4814f7e6.