Repository navigation
Studio: round the right corners of scrollable tool result and thinking panes - #11409
Merged
Merged
Conversation
…g panes A capped pane with a scrollbar rendered square on the scrollbar's side: right corners for a vertical bar, bottom corners for a horizontal one. The scrollbar is the cause. The app sets scrollbar-width: thin, so ~11px is reserved inside the border box, and Chromium paints that gutter outside the element's border-radius clip. Clipping it does not help: clip-path, contain: paint, an opaque mask-image and an overflow: hidden parent were all tried against a real thread and all left the corners square, since a composited scroller's scrollbar escapes an ancestor's rounded clip too. Suppressing the scrollbar was the only thing that restored the corners. So the new ScrollPane keeps the scrollbar away from the corners instead. The wrapper paints the background, radius and padding; the scroller sits inside it, transparent, with its gutter 8px clear of the rounded edge. Text padding is unchanged, and the scrollbar stays visible. Applied to the web search, code execution, knowledge base and read-skill result panes, thinking traces, the pasted-text dialog and the composer draft preview. One behaviour change worth noting: max-height now caps the scroller rather than the whole box, so a saturated pane is its padding taller than before.
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
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! 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". |
shaojun
pushed a commit
to shaojun/unsloth
that referenced
this pull request
Sep 29, 2026
…g panes (unslothai#11409) A capped pane with a scrollbar rendered square on the scrollbar's side: right corners for a vertical bar, bottom corners for a horizontal one. The scrollbar is the cause. The app sets scrollbar-width: thin, so ~11px is reserved inside the border box, and Chromium paints that gutter outside the element's border-radius clip. Clipping it does not help: clip-path, contain: paint, an opaque mask-image and an overflow: hidden parent were all tried against a real thread and all left the corners square, since a composited scroller's scrollbar escapes an ancestor's rounded clip too. Suppressing the scrollbar was the only thing that restored the corners. So the new ScrollPane keeps the scrollbar away from the corners instead. The wrapper paints the background, radius and padding; the scroller sits inside it, transparent, with its gutter 8px clear of the rounded edge. Text padding is unchanged, and the scrollbar stays visible. Applied to the web search, code execution, knowledge base and read-skill result panes, thinking traces, the pasted-text dialog and the composer draft preview. One behaviour change worth noting: max-height now caps the scroller rather than the whole box, so a saturated pane is its padding taller than before. Co-authored-by: Unsloth <[email protected]>
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.
Capped scrollable panes rendered square on the scrollbar's side: right corners for a vertical scrollbar, bottom corners for a horizontal one. The other two corners rounded normally, so tool results and thinking traces looked lopsided.
Cause
The scrollbar. We set
scrollbar-width: thinglobally, so about 11px is reserved inside the border box (width 724againstclientWidth 713), and Chromium paints that gutter outside the element'sborder-radiusclip.What does not fix it
All four of these were tried against a real thread and all four left the corners square:
clip-path: inset(0 round r)contain: paintmask-imageoverflow: hiddenThe last row is the one that isolates it. A composited scroller's scrollbar escapes an ancestor's rounded clip as well as its own, so nothing that merely clips it works.
Fix
Keep the scrollbar away from the corners instead of trying to clip it. The new
ScrollPaneputs the background, radius and padding on a wrapper, and the scroller sits inside that padding, transparent:The scrollbar ends up 8px clear of the rounded edge, so it cannot square anything off, and it stays visible. Text padding is unchanged, it just comes from the wrapper now.
Applied to the web search, code execution, knowledge base and read-skill result panes, thinking traces, the pasted-text dialog body and the composer draft preview. The four dead ends are written into the component so nobody re-tries them.
Testing
Verified in the real thread, which is the context where the clipping approaches failed, with the scrollbar still visible and the corners rounded. Typecheck clean, full suite passes (8154 tests).
Trade-off
max-heightnow caps the scroller rather than the whole box, so a saturated pane is its padding taller than before (16px for thep-2panes). Easy to subtract back off the cap if we would rather hold the old outer height.