Repository navigation
fix: preserve queued settings while a session is being created - #154807
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 26, 2026, 6:41 AM ET / 10:41 UTC (Revision 12). ClawSweeper reviewWhat this changesThe Control UI retains reasoning, speed, and context-window choices while a new session forms, sends queued changes to the acknowledged session, and keeps setting failures visible. Merge readiness✅ Ready for maintainer review Current main still has the session-creation gap this PR addresses. The current head has no actionable correctness finding, and its mounted-pane regression plus browser evidence provide adequate coverage of the previously questioned placeholder path. The protected maintainer label keeps the PR open for normal landing. Priority: P2 Review scores
Verification
How this fits togetherChat pickers send session-setting changes through the Control UI's session owner to the Gateway. The session owner combines pending choices, roster updates, and write receipts before updating the visible controls. flowchart LR
A[Chat setting pickers] --> B[Pending setting choices]
C[Session roster refresh] --> B
B --> D[Ordered settings writes]
D --> E[Gateway session patch]
E --> F[Session receipt]
F --> G[Visible choices and errors]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +294, Tests +1072. Total +1366 across 15 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the existing session-owner repair with its identity-bound queue and field-specific rollback behavior after normal maintainer gates. Do we have a high-confidence way to reproduce the issue? Yes, current-main source gives a high-confidence path: without a physical row, the pending target is null and optimistic setting claims do not start. I did not execute a current-main reproduction in this read-only review. Is this the best way to solve the issue? Yes. The patch extends the existing pending-row and ordered-write owners, carries the acknowledged session ID forward, and retains the Gateway's target checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b9a4be580be6. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
11c61ca to
12b7031
Compare
12b7031 to
9d7f110
Compare
9d7f110 to
532ba21
Compare
Keep pending reasoning, speed and context choices attached to their field owners while creation receipts adopt the physical session identity. Preserve FIFO dispatch and each field's visible failure when later writes settle. Validated with 125 focused and sibling cases, a failing preview regression control, changed-source checks, the unchanged UI performance budget, and a Chromium comparison that reproduces the missing error on the incoming PR and retains it on this candidate. Independent review through P2 is clean. Related: #154807, #130741, #152375
532ba21 to
a7b971b
Compare
Integrate current main while preserving created-thinking claim suspension and rollback. Treat a same-conversation placeholder without a physical session ID as the existing unmaterialized target, so it cannot silently cancel queued choices. Add this transition to the existing regression table. Fresh independent review through P2 is clean. Current integration runtime proof remains pending; prior 125-case and browser proof applies to a7b971b. Related: #154807
Keep existing composer and identity fixtures aligned with the session capability contract. An undefined preview represents no pending settings; existing overrides and rendering assertions stay unchanged. Independent review through P2 and pinned formatter checks pass. This fixes the missing-method failures observed on both Node and Bun; test replay is pending on the updated candidate. Related: #154807
|
Merged via squash.
|
…law#154807) * fix(ui): preserve queued settings across session creation Keep pending reasoning, speed and context choices attached to their field owners while creation receipts adopt the physical session identity. Preserve FIFO dispatch and each field's visible failure when later writes settle. Validated with 125 focused and sibling cases, a failing preview regression control, changed-source checks, the unchanged UI performance budget, and a Chromium comparison that reproduces the missing error on the incoming PR and retains it on this candidate. Independent review through P2 is clean. Related: openclaw#154807, openclaw#130741, openclaw#152375 * test(ui): provide preview capability in chat fixtures Keep existing composer and identity fixtures aligned with the session capability contract. An undefined preview represents no pending settings; existing overrides and rendering assertions stay unchanged. Independent review through P2 and pinned formatter checks pass. This fixes the missing-method failures observed on both Node and Bun; test replay is pending on the updated candidate. Related: openclaw#154807 * test(ui): return complete chat header patch receipts * test(ui): preserve real session capabilities in permission controls
Related: #130741, #152375
What Problem This Solves
Reasoning, speed and context-window choices can disappear or be dropped while a new session is being created. A rejected reasoning choice can also lose its error when a later speed edit succeeds.
User Impact
Pickers retain the latest requested choices through session creation. Queued writes target the acknowledged physical session, each setting reports and rolls back its own failure, and late responses cannot overwrite a newer choice or affect a replacement session.
Why This Change Was Made
The existing pending-row owner now carries previews before a physical session exists and binds the acknowledged identity in place. The existing settings queue preserves write order and receipt identity. Field-owned settlement retains a reasoning error when a later speed choice completes. A same-conversation placeholder appearing during refresh does not cancel queued intent. This adds no separate state store or queue.
Evidence
Final reviewed head:
1d1b0c06e2359d7c3212be23725f45bfa82da561. Independent review through P2 is clean. Exact-head CI passed, including all UI shards, eight Control UI E2E lanes, the browser-extension lane, performance, types, lint and the required CI gate.Focused final proof passed 404 tests across the materialization, composer-controls and chat-view files, with no skips or unhandled errors. Reverting only the placeholder fix makes its mounted-pane regression fail at the intended missing second write; restoring it passes all 15 materialization cases. That test publishes the identity-less placeholder through the real session refresh owner before the first receipt settles.
The current-head Chromium flow passed in 12.225 seconds using a mock Gateway and synthetic data. It observes queued choices before the first acknowledgment, three FIFO patch requests, the acknowledged
expectedSessionIdon both later writes, and the reasoning error remaining visible after the speed acknowledgment. This browser trace starts with no roster row; the separate mounted-pane control covers the placeholder-refresh race. The mounted-pane control supplies the placeholder-specific evidence requested by review; the browser trace verifies visible choices, receipt targets and error retention.Before: the rejected reasoning choice loses its error after the speed acknowledgment.
After, on the final head: the reasoning error remains visible while speed succeeds.
Test cost and repaired validation failures
Each focused measurement uses
pnpm test <file> --maxWorkers=1. Final-head command wall times: materialization 3.571 s, composer controls 2.461 s, chat view 6.226 s. The unchanged error-ownership, receipt-errors and unmaterialized test files were previously measured at 3.211 s, 3.226 s and 3.607 s on candidatea7b971b; those measurements remain historical.Current CI's Bun UI partition recorded test durations of 2.648 s (materialization), 0.816 s (error ownership), 1.455 s (receipt errors), 2.124 s (unmaterialized), 0.349 s (composer controls), and 16.698 s (chat view). These are CI test durations, not isolated command wall times. CI recorded 342 chat-view cases in its integration context; the isolated published-head file ran all 365.
Earlier validation exposed incomplete session-capability mocks and malformed patch receipts. The repaired fixtures retain the real capability where ownership matters and return typed receipts; existing cases, assertions, timeouts and skip rules remain intact, with one added dispatch assertion preventing vacuous stale-outcome passes. The original failures remain recorded in runs 36225717471, 36228020401, and 36231486070. A prior browser attempt hit a temporary socket-path limit; the existing capture owner now uses the corrected short path. Final validation above passed.