Repository navigation
Studio: bound a live Thinking block to its newest lines - #13086
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Resolve the reasoning.tsx import conflict with #13059: keep main's import list (isRenderableRenderHtmlToolPart moved to message-derived) and add reasoningTailCapped.
…inking The button unmounts with the cap, so focus fell back to the page body. Hand it to the block's trigger first (no scroll), and give the button a visible focus ring.
…lines Links in the clipped top of the live box stayed in the tab order but could never be scrolled into view. Focusing one now lifts the cap, the same as Show full thinking, so the focused link sits under the header.
|
With the default Thinking setting, a live Thinking block now keeps its newest lines in a fixed box with "Show full thinking" under it, so the thread stops growing while a long trace streams. The branch also has two keyboard fixes and is merged with main. What changed
On a scripted 24K and 250K trace, the merge base grew the thread by 11,753 and 129,022 px. Real Unsloth Studio, CPU only, Qwen3-0.6B Q4_K_M at temperature 0, same prompt on both sides, captured mid-stream at about 4,150 reasoning characters. Left: main at |
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f29635d654
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }} | ||
| className={cn( | ||
| capped && | ||
| "flex max-h-[min(18rem,40vh)] flex-col justify-end overflow-hidden [&>*]:shrink-0", |
There was a problem hiding this comment.
Reveal matches inside the capped reasoning tail
When an auto trace has overflowed and the user searches for text in the clipped older lines, Studio's find index still includes that DOM text, but find-dom.ts's scrollsAxis only reveals through ancestors using auto, scroll, or overlay. This overflow-hidden wrapper is therefore neither expanded nor repositioned, and scrolling the outer thread cannot move the match through the wrapper's clip, leaving the reported active match invisible. Lift the cap when a find match targets this region or otherwise exclude clipped text from the index; note that overflow: hidden is still defined as a scroll container, not a non-scrollable clip.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Leaving this one: the cap only exists while the auto setting holds a block open for its live stream, find still counts the match, and Show full thinking directly under the box lifts it (the block closes once the answer starts). The match text is not lost or altered, so this stays a known limitation rather than a change to find-dom's scroller rules.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
# Conflicts: # studio/frontend/src/components/assistant-ui/reasoning-transcript.tsx
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…elease (unslothai#13046) and the bounded live tail (unslothai#13086) to the chunked transcript

Fixes #11703. Part of #12025 (point 2: "Thinking no longer rendered in its own collapsible panel").
Problem
With the default Thinking setting (
auto), a block opens while it streams and closes when the answer starts. While it streams it is inline at full height, so a long trace pushes the whole thread down token by token: on a 24K character trace the thread grows by about 11,500 px during the stream, on a 250K one by about 127,000 px.Approach
This builds on the #11522 transcript and follows the conditions from the #11704 review:
autosetting is what holds the block open, andautoonly opens it for its stream. Saved and finished traces are never boxed.expandedsetting show the full trace, exactly as today.max-h-[min(18rem,40vh)] flex flex-col justify-end overflow-hidden: the newest lines sit at the bottom and older ones are clipped at the top under a fade, so the box never grows and the thread never moves for it. While bounded, the transcript skips itsadjustAbovecorrections (size changes above the viewport, threshold anchoring, width-change anchor), since rows that grow upward inside a fixed box did not move the thread. "Show full thinking" calls the samedetachFromBottom()as a hand open.tests/reasoning-live-tail.test.ts: 0/3 on main, 3/3 here.While bounded, the transcript also mounts the rows that fill the end of the trace (twice the box height). Its measured offset lags a fast-growing trace by a frame, which on main can leave the viewport briefly blank and, in a 288 px box, would leave the box blank more often.
Fold mode (opt-in) is unchanged: the lead's box could not hold the rounds folded after it.
Results
Repo reasoning smoke harness (real
Thread, reasoning-only stream), Chromium 1280x900,autosetting unless noted:expandedsetting: thread growthFirefox and WebKit, same scenarios: thread growth during the stream 12,052 / 128,281 px (Firefox) and 12,050 / 127,913 px (WebKit) on main, 0 px here; newest line visible on every sample here; Show full keeps the header at 176 px with 0 px drift;
expandedunchanged.tests/studio/reasoning-transcript-checks.js(expanded, every check reported, 3 runs per side): the same pre-existing failures on both sides ("threshold activation moved the reading passage" 3/3 on each; "latest reasoning is missing" 3/3 on main, 2/3 here), nothing new.Tests
tests/reasoning-live-tail.test.ts: the cap truth table over every setting x hand state x streaming (bounded only forauto, untouched, streaming); the box clips instead of scrolling and writes no scroll position; Show full is a hand open; a bounded transcript makes no thread correction and mounts the tail.npm run typecheckclean. Biome: no new errors (the 10 in these files are on main too).Screenshots
Real Studio, both builds fed the same scripted stream (a 21K character trace held open before its answer), default Thinking setting.
Mid-stream. Before: the live trace runs at full height and the Thinking header has scrolled away. After: the header stays in view above a 288 px box with the newest steps (Step 135 to 139, fading at the top) and Show full thinking under it; the thread is 1,000 px tall instead of 8,661 px.
After the answer: identical. Both collapse to "Worked for 9s" above the same answer.