Release CT: stage-batch4 — 4-PR low-risk batch (v0.51.122) — stale cache tail / inflight UI / segment flush / reasoning accumulator#2815
Merged
Conversation
…mits) Cherry-pick of PR #2796 by @ai-ag2026, squashed from 5 author commits onto current master: - dcee056 fix: drop stale optimistic sidebar rows - 3a73400 fix: clear stale busy state before send - 46c3b90 fix: preserve server idle rows during optimistic merge - de51d27 fix: let chat start survive pre-start UI errors - d2f5c90 fix: hide nonfatal pre-start send warnings Authorship preserved via --author. Code-only squash (no CHANGELOG).
…boundaries Fixes #2713 — live assistant text can truncate at tool-call segment boundaries during streaming. Before _resetAssistantSegment() in the tool and interim_assistant SSE handlers, synchronously flush any pending rAF render work so tokens that arrived during the 66ms throttle window are written to the DOM before assistantBody is cleared. Without this flush, the pending _doRender callback fires after assistantBody is null and skips the write silently, causing the tail of the pre-tool segment to disappear from the live view. Implementation: - Extract _flushPendingSegmentRender() helper (guarded by assistantBody && _renderPending) that cancels the pending rAF and synchronously writes via smd/renderMd/esc — same cascade as _doRender. - Call the helper from both the tool and interim_assistant handlers before their respective _resetAssistantSegment() calls. - Normal cases where the rAF has already fired are unaffected (guard skips immediately). Completed transcripts were never affected (renderMessages rebuilds from the full assistantText accumulator on done). Adds tests/test_issue2713_streaming_segment_flush.py with 11 static analysis regression tests pinning the helper shape and call-site ordering.
…content (closes #2565) Two confirmed bugs in the thinking/reasoning display: 1. reasoningText was initialized once when the SSE stream opened and never reset between turns. On the done event, the last assistant message received the union of every turn's reasoning. Now reset at both turn boundaries: tool (alongside existing liveReasoningText reset) and interim_assistant (the other turn boundary where prior reasoning closes). 2. ui.js renderMessages preferred m.reasoning (which could be corrupted by bug 1) over m.reasoning_content (the clean per-turn value from the backend). The fallback now reads m.reasoning_content || m.reasoning. Both fixes are needed: bug 2 alone cannot cover providers that stream reasoning events without populating reasoning_content on the final API message. Updated test_streaming_race_fix.py to scope its reconnect-accumulator guard to the _wireSSE preamble only, since turn-boundary resets inside event listeners are intentional and correct. 9 new regression tests in test_issue2565_reasoning_accumulation.py.
…isk batch) Cherry-picked PRs: - #2802 (ai-ag2026) — drop stale cached user tail (supersedes held #2733) - #2796 (ai-ag2026) — clear stale inflight UI state (5-commit squash) - #2777 (b3nw) — flush pending render at segment boundaries - #2778 (b3nw) — reset reasoning accumulator per turn + prefer reasoning_content
This was referenced May 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release CT — v0.51.122 — stage-batch4 — 4-PR low-risk batch
Fourth batch from the May 24 sweep. Four contributor PRs, all bug fixes targeting state/cache/streaming lifecycle issues, all well-tested, all pre-cleared by Opus advisor:
api/models.pycache reconciliationstatic/messages.js+sessions.jsstatic/messages.jssegment renderstatic/messages.js+ui.jsreasoningCherry-picks
Special handling
test_session_compress_async_reports_stale_session_guardnow passes (verified by running it against pr-2802). fix: drop stale cached user tail after saved assistant #2733 will be closed as superseded.git merge --squash pr-2796to produce one clean commit with full sessions.js content. Authorship preserved via--authorflag.### Fixedblock; resolved by keeping ours (stage CHANGELOG) and consolidating into one stamp entry.Pre-Opus gate
ast.parse+node -con all touchedOpus advisor verdict
What's NOT in this batch