Repository navigation
Studio: stop Expand thinking from restyling the whole trace - #13665
Merged
danielhanchen merged 4 commits intoOct 14, 2026
Merged
Conversation
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. |
Member
Author
|
Reached Codex review convergence at oobabooga#367. |
# Conflicts: # studio/frontend/src/components/assistant-ui/reasoning.tsx # studio/frontend/tests/reasoning-live-tail.test.ts
Member
|
@codex review |
1 similar comment
Member
|
@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". |
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Oct 14, 2026
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Oct 14, 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.
Summary
Since #13545, opening a finished thinking trace by hand shows the bounded box, and the full trace is one "Expand thinking" click away. On a long trace that click and "Collapse thinking" each run as a single long task.
Root cause
ReasoningTailappliedflex max-h-[...] flex-col overflow-hidden [&>*]:shrink-0only whilecapped, and two of those classes restyle the whole trace when toggled:flex: a display change on the box restyles and re-lays out the child subtree.[&>*]:shrink-0: a child combinator with a universal subject invalidates the whole subtree in Blink.Fix
[&>*]:shrink-0stays on while the box is cappable. It has no effect outside a flex box.flex flex-colstays on through Expand/Collapse of a finished trace. It drops only when a trace is expanded while still streaming, as before, because keeping it there shifted glyphs by a subpixel. The stream ending does not restore it, so the restyle does not move to the end of the stream.max-h,overflow-hidden,justify-*and the mask still followcapped.No visible change: the DOM, element rects, scroll metrics and screenshots match
mainin every cap state, streaming and finished.Measurements
Chromium, 4x CPU throttle, 6 interleaved runs per build:
Streaming, Expand mid-stream until the stream ends, hand-open, and loading a long thread are unchanged within noise.
Testing
node --test tests/reasoning-live-tail.test.ts: 9/9 pass. The old class-string assertion now checks the split classes, and a new test drivesreasoningTailFlexBoxthrough the Expand, Collapse and stream-end transitions.tsc -p tsconfig.app.json --noEmit: passreasoning.tsx: no new diagnostics against Studio: set thinking traces apart from the answer and give tool rows kind icons #13545's merge commitnpm testsuite andnpm run buildBefore / after (Studio, same bytes on both sides)
Two isolated Studio installs, main
3a6179b4avs this branch292cfeb9e, one scripted ~98k-character thinking trace ending in a list, hand-opened after the answer (Thinking = auto). Tail, text, button, answer and first, middle and last row rects are equal in the capped, expanded and re-capped states.Capped, hand-opened finished trace:
After Expand thinking (the trace ends in a list, so this is the case where block and flex layout of the box could differ):
Per toggle, Chromium 4x CPU throttle, 5 Expand/Collapse cycles, median (shared host, so indicative):
The header token estimate and the reply timing differ between halves from run to run and are not from this change.