Repository navigation
Studio: keep rounded boxes rounded when they scroll - #12431
Merged
Merged
Conversation
Dialogs scroll their own rounded box, and once a scrollbar showed it ran the box's full height and covered both right-hand corners. Inset the track by the dialog radius, and switch dialogs to the styled scrollbar in Chromium, whose thin standard one has no track to inset.
Member
Author
|
@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. |
The track inset did nothing in Firefox, which has no ::-webkit-scrollbar and drops the radius on the scrollbar side of a rounded scroller altogether, background and ring included. Generalize the dialog rule into .scroll-rounded: Chromium and WebKit inset the track by the box's radius, and Firefox clips the box back to it. Use it on dialogs, alert dialogs, the inline logs and lists that scroll their own rounded box, and Hub README code blocks. Surfaces with an outer shadow, which a clip would cut, scroll an inner viewport instead, as DropdownMenuContent already does: the context menu and its submenu, the message actions menu, and the generation presets popover.
Member
Author
|
@codex review |
The Firefox clip on .scroll-rounded also cut outer shadows, even on boxes with nothing to scroll. Dialogs and alert dialogs, which carry one in light mode, now flag data-overflowing while they have something to scroll (lib/scroll-overflow.ts) and take the clip only then, since without a scrollbar Firefox keeps their radius. The recipe preview's error panel, which keeps a shadow-border, scrolls an inner viewport instead.
Member
Author
|
@codex review |
overflow:auto draws a scrollbar for a single pixel over, but the 1px tolerance in observeScrollOverflow left a dialog that overflowed by exactly that much unflagged, so Firefox skipped the clip and squared its corners.
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! 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". |
This was referenced Oct 1, 2026
danielhanchen
added a commit
that referenced
this pull request
Oct 1, 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
Once a rounded box was tall or wide enough to scroll, the corners on its scrollbar side stopped looking rounded. This showed up in Edit project, New project, the other project dialogs and MCP Servers, and in a number of other places. The corners now stay rounded in Chromium, WebKit and Firefox.
Cause
These boxes scroll their own rounded element (
overflow-y-auto rounded-*), so the scrollbar runs the box's full length:Changes
.scroll-roundedutility inindex.css.--scroll-radiusis the box's own radius, set from itsrounded-*class.::-webkit-scrollbar, the same reset the Images prompt box uses.ring-1survives.lib/scroll-overflow.tsflags themdata-overflowing, and they are clipped only while they have something to scroll..scroll-roundedis used on:DialogContentandAlertDialogContent, so every dialog..hub-readme-prose pre.DropdownMenuContentandSelectContentalready do:ContextMenuContentandContextMenuSubContent.shadow-border.Not changed
PopoverContentstill scrolls its own surface when a popover outgrows the window. Many call sites style that surface directly and several add shadows, so it needs its own change.Testing
npm run typecheckis clean andnpm testpasses.tests/dialog-scrollbar-corners.test.tscovers the utility, where it is used, and the inner viewports. Two tests that pinned the old menu classes are updated.Follow-ups
They are alternatives: merge one or the other.