Repository navigation
fix: preserve steering across reconnects and show queued input - #157135
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 24, 2026, 10:06 AM ET / 14:06 UTC (Revision 5). ClawSweeper reviewWhat this changesThe branch preserves steering after an authenticated chat reconnect and displays Gateway-held queued input above the Control UI composer, with receipt-based recovery, exact cancellation, protocol fields, tests, and documentation. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open for the normal merge gates. Current main and the latest release retain the reported behavior. The prior authority-proof blocker is addressed by a production-path steering test, and the inspected screenshots support the queue presentation change; this review found no actionable patch defect. Priority: P1 Review scores
Verification
How this fits togetherBrowser chat input enters the authenticated Gateway, which either steers the active agent turn or holds the input for a later turn. The Gateway exposes pending-input receipts to the Control UI, which reconciles them into the visible queue. flowchart LR
A[Browser chat input] --> B[Authenticated Gateway]
B --> C{Steering allowed?}
C -->|Yes| D[Active agent turn]
C -->|No| E[Queued input]
E --> F[History receipts]
F --> G[Control UI queue]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +273, Tests +880, Docs +9. Total +1162 across 33 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the Gateway-owned authority comparison and receipt-driven queue view together once the exact head passes the repository’s merge gates. Do we have a high-confidence way to reproduce the issue? Yes. Current main still compares connection-bound steering identity, and the PR supplies a focused baseline-failing reconnect regression; this read-only review did not execute it. Is this the best way to solve the issue? Yes. The branch changes the existing authority and pending-input owners, keeps the active turn’s bindings, and reads the existing Gateway queue without adding another store. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 619405d49ddd. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
|
The live queue now stays visible while browsing older retained inputs, including when a queued message falls outside the latest page. Exact queued receipts let the UI observe remote cancellation without resending the message. Attachment-only rows show their filenames. The synthetic browser flow covers reconnect, history navigation, consumption, and exact-message cancellation. The first image shows the former blank attachment row; the next two show its filename and both live queued rows retained while viewing older history. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review The reviewed grant finding is fixed: bound access grants compare plugin/grant identity; null remains proven independent; undefined/unclassified grants retain the original source identity. Existing Gateway authority-capture tests prove same-grant reconnect acceptance and denial for changed grants, plugins, classifications, and revoked grants before backend injection. All six cases fail on the previous code and pass now; the focused authority/follow-up group passes 32 tests. The final queue corrections also discover older live queued input on a fresh load and rotate bounded receipt checks across server, transcript, and browser custody. All 498 UI tests, 35 Gateway/history-tool tests, and the composer browser E2E pass. Corrected fixtures demonstrate both pre-fix failures. Current main's restart-recovery UI change is merged; an independent review of the full final diff is clean. The PR body contains the evidence and inspected, rendered screenshots. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review The requested authenticated entry-point proof is now in All three cases pass: same-grant reconnect reaches the original runtime and records its steering target; changed-grant input never enters that runtime queue and remains an accepted follow-up; access revocation before message write prevents injection. Removing only the grant fingerprint field reproduces the defect at the final runtime effect: changed-grant text enters The production fix is unchanged from the head your last review found no code defects in. This follow-up adds the entry-point proof and corrects the only failure in the completed CI run: two stale exact pending-input expectations omitted |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* commit '9ccfc7d1bea21e34da48edbd54afd2e1be57db40': (89 commits) fix(exec): avoid gateway stalls during background task writes (#157177) test(cli): isolate preaction title setter state fix(test): synchronize Git backoff cancellation readiness (#157315) fix: validate Codex model references in Docker (#157175) fix(state): tolerate brief WAL coordinator contention (#157121) fix: unblock conversations after recovery preparation fails (#157214) test(telegram): avoid wall-clock pacing in HTTP conformance (#157281) fix: keep independent database work responsive under load (#157230) refactor(sqlite): centralize WAL checkpoint execution (#157263) improve(android): show tool outcomes in collapsed work (#156950) fix: remove tracked release scratch blocking source capture (#157308) test(update): remove legacy probe stream ordering race fix: preserve steering across reconnects and show queued input (#157135) fix(ui): keep typing focus when the GitHub reader opens (#157202) fix(ios): keep screenshot logs outside capture evidence test(codex): await startup teardown in lifecycle fixtures chore(ui): refresh control ui locales (#157311) refactor(memory): deslop memory plugins (#156867) refactor(test): share CLI diagnostics fixture setup (#157201) fix(release): retry notarization submit/wait on transport failures and name the resume command (#157116) ...
…law#157135) * fix: preserve steering across reconnects and show queued input * test: keep steering fixture cleanup non-mutating * fix: keep server queue current across history navigation * test: prove reconnect grant checks through authenticated chat
) * fix(chat): restore smooth scrolling in long chat sessions Every virtualizer range change re-renders the chat pane. renderChat derives the displayed pending-input list as a fresh array per render (since #157135), and the chat-item cache compared it by identity, so every scroll frame rebuilt chat items for all loaded history (tool cards, JSON parsing, schema validation). A 7k-message session scrolled at 4-8 fps and older history paging stalled. Compare pending inputs entry-wise (immutable Gateway records) and memoize the two remaining per-render history scans (async-question history and the user-identity index in selectChatInputDisplay) per transcript array. * fix(chat): rescan question history after live terminal outcomes Message-less aborts and errors record their outcome beside an already published history array (rememberLiveTerminalRun), so an array-keyed question-history memo could keep a reminder pending after the originating run settled. Key the memo on a live-terminal revision bumped by that owner.
…claw#159294) * fix(chat): restore smooth scrolling in long chat sessions Every virtualizer range change re-renders the chat pane. renderChat derives the displayed pending-input list as a fresh array per render (since openclaw#157135), and the chat-item cache compared it by identity, so every scroll frame rebuilt chat items for all loaded history (tool cards, JSON parsing, schema validation). A 7k-message session scrolled at 4-8 fps and older history paging stalled. Compare pending inputs entry-wise (immutable Gateway records) and memoize the two remaining per-render history scans (async-question history and the user-identity index in selectChatInputDisplay) per transcript array. * fix(chat): rescan question history after live terminal outcomes Message-less aborts and errors record their outcome beside an already published history array (rememberLiveTerminalRun), so an array-keyed question-history memo could keep a reminder pending after the originating run settled. Key the memo on a live-terminal revision bumped by that owner.



What Problem This Solves
Fixes steering that silently becomes a follow-up after the chat client reconnects, and queued input appearing as an ordinary sent message.
User Impact
Reconnecting with the same authenticated user and unchanged permissions preserves steering into the active turn. Messages waiting for another turn appear in the existing queue above the composer until consumed or canceled, including after reconnect and while browsing older history. Attachment-only queue entries show their filenames.
Why This Change Was Made
Steering compares current user permissions and model access instead of connection-object identity. Both authorities remain validated, access-grant identity is preserved, and the active turn keeps its original tool, browser, and approval bindings. Unclassified grants retain their original source boundary. Collected follow-ups retain their original source-identity boundary; logical model admission remains with the existing runtime owners.
The UI reads the Gateway's existing queued-turn state and exact input receipts. Server-owned input is displayed without another send; removing it requests cancellation of that exact queued message. Receipt checks rotate fairly across server, transcript, and browser custody within the existing request limit. The current live queue count drives bounded discovery of older pending pages without moving the displayed history page. No new queue store or database migration is introduced.
Evidence
tool_authority_mismatchand passes for unrestricted and model-restricted operators. Controls cover revocation, changed permissions, model access, and tool bindings.Test costs: initial steering authority file 42.62 s wall (new scenarios 0.93 s and 0.47 s); final browser E2E 29.73 s wall / 6.93 s scenario; pending-input history file 69.83 s wall, about 13 s in existing SQLite/history tests; relocated receipt suite 41.02 s wall; model-policy ordering test 50.94 s wall / 15 ms body. Cold transform and worker preparation dominate these file-level times. Final authority/follow-up wrapper: 33.85 s (about 1.3 s test bodies); Gateway/history-tool wrapper: 64.87 s; final UI group: 9.38 s. Prior CI Gateway-methods shard: 297.49 s for 1,813 tests (the stale expectation was its only failure); corresponding job wall 301.15 s. Final Gateway read-scope shard: 538 s test step / 590 s job wall, successful; CI run 36008122120 completed successfully across its 174 jobs (including skipped jobs).
An earlier local strict UI performance check reported startup gzip 371,561 B against a 371,332 B limit, and Mermaid gzip 1,593,188 B against 960 KiB. CI records these as warnings under its existing policy. The Mermaid excess predates this branch (the Mermaid 12 upgrade in #156363); no budget, baseline, or dependency was changed. This fix has boundary and synthetic browser proof; it has not been deployed to a live Gateway.
The screenshots use synthetic data. Additional before/after attachment and history-navigation screenshots.