💬 fix: Show a Thought on the Live Header Only as Finished Sentences - #16392
Merged
Merged
Conversation
This was referenced Sep 26, 2026
danny-avila
force-pushed
the
danny-avila/live-reasoning-complete-sentence
branch
from
September 26, 2026 12:51
b24d23a to
118bbcf
Compare
danny-avila
added this pull request to stack #16396
September 26, 2026 14:10
danny-avila
force-pushed
the
danny-avila/live-reasoning-complete-sentence
branch
2 times, most recently
from
September 27, 2026 01:25
f8b78e5 to
d00f62c
Compare
Base automatically changed from
danny-avila/reasoning-header-row-size
to
dev
September 27, 2026 01:46
The live header previewed the sentence the model was still writing, word
by word, so it read as fragments ("This is a simple greeting, not") that
changed before they made sense and were replaced by the next fragment. It
now shows the last sentence that ENDED, holds it for at least a second, and
keeps its generic line until the first sentence finishes. A Latin mark
closes a sentence only before whitespace or the end of the text, so
decimals and version numbers stay whole; CJK marks need no space.
The measurement that let short sentences stream freely until they filled
the row (a ResizeObserver and a per-paint scroll-width read) goes with it:
the line no longer changes per word, so there is nothing to meter.
danny-avila
marked this pull request as ready for review
September 27, 2026 01:46
danny-avila
force-pushed
the
danny-avila/live-reasoning-complete-sentence
branch
from
September 27, 2026 01:46
d00f62c to
69bf1be
Compare
danny-avila
deleted the
danny-avila/live-reasoning-complete-sentence
branch
September 27, 2026 01:56
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.
Summary
While a span is only reasoning, the live header previews the thought one sentence at a time, and it previewed the sentence the model was still writing, word by word. On screen that is a run of fragments ("This is a simple greeting, not", "I should respond in a friendly,") that change before they can be read and are replaced mid-thought by the next fragment, which reads as disjointed.
The header now shows the last sentence that ended, never the one in progress. A finished sentence holds the line for at least a second before the next finished one may replace it, and until the first sentence ends the header keeps its generic line ("Thinking…" or the reasoning label). A Latin sentence mark closes a sentence only before whitespace or the end of the text, so "3.5" and "v2.1" stay inside one sentence; CJK marks need no space, as before.
The measurement that let short sentences stream unthrottled until they filled the row (a
ResizeObserverplus a scroll-width read per paint) is removed with it: the line no longer changes per word, so there is nothing to meter.Stacked on #16391 and targets its branch.
How it works
LivePhaseHeaderthrottles athink:line atLIVE_REASONING_HOLD_MS(1000ms) and everything else atLIVE_ACTIVITY_THROTTLE_MS(500ms). The throttle is leading-edge, so a sentence that ends a second or more after the last paint shows at once; only sentences that end faster than that wait.Type of change
Testing
Automated tests:
LiveParity.test.tsx: new "shows a thought only as finished sentences, each held for a second" and "keeps decimals and versions inside one sentence"; the CJK preview case and the bounded-window case updated to the finished sentence; the two fill-measurement cases removed with the mechanismContentParts.integration.test.tsx: the one-sentence-at-a-time case now waits for the second sentence to endcd client && npx jest LiveParity ActivityPhaseGroup ContentParts— 180 testsnpx tsc --noEmitinclient: no errors in touched filesBefore / after screenshot
Captured while the first reasoning sentence is still streaming. Before, the header exposes the in-progress fragment “First I”; after, it keeps “Thinking...” until a sentence ends.
349e01f3a3cd(before) →118bbcf2e37c(after).