Repository navigation
Studio: glass theme polish and a composer position slider - #16643
Conversation
Replace the composer at the bottom switch with a 0 to 100 position slider (50 is the old middle, 100 docks it; the old setting migrates). Under glass, open conversations dim the wallpaper and thicken the composer, the chat model controls get a frosted pill so replies no longer show through them, and the account row hover gets the same glass rim as the other sidebar rows.
Frost the chat model button and model notice themselves (no group pill or border, a lighter fill) so the glass is exactly the hover's box. Pages get a slightly denser glass tint, the conversation composer boost eases a little, and glass highlights are toned down: Liquid 3D sheen, rims, bevels and beads by about 45 percent, other materials slightly.
…adows Sticky bars inside glass panels and popups (the Run settings footer, list headers) now frost the text scrolling beneath them, floating filled buttons such as Eject model and jump to bottom frost what they sit over, and the shared popup, tooltip and glass lift shadows step down under glass.
|
pre-commit.ci run |
|
@codex review |
1 similar comment
|
@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: 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". |
…el controls A glass surface with its own backdrop-filter is a backdrop root, so the sticky Run settings footer and the floating Eject model button inside the model popover could not frost the text beneath them. Surfaces holding such a child now carry their blur on a layer behind their content. The chat model button and Eject model get a denser fill and a soft lift so they read as buttons, and glass adds a 1.5px frost to the wallpaper unless the user set an image blur.
|
@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: fa1d0c25c5
ℹ️ 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".
| (greeting.kind !== "off" || incognito | ||
| ? "pt-[27.5dvh]" | ||
| : "pt-[calc(27.5dvh_+_44px*var(--ui-space-scale,1)_+_2.25rem)]"), | ||
| ? "pt-[calc(27.5dvh*var(--welcome-lift,1))]" |
There was a problem hiding this comment.
Preserve space for image greetings at low composer positions
When an image greeting is selected and the composer position is near 0, this padding shrinks to zero while the image greeting below still has a negative top margin of 76px * var(--ui-space-scale,1). A full-height greeting image consequently extends above the welcome area, behind the chat header and outside the scrollable viewport, clipping its upper portion. Reserve enough top space for that negative margin, or reduce the margin along with the position, so the new slider's low values keep image greetings visible.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 040a513: image greetings keep at least 76px of top padding (the row's negative margin), so low composer positions no longer clip them; the default middle position is unchanged.
…rollbar glow The browser menu pinned its dark fill to a surface resolved on html with a layered !important, so under glass it stayed a flat grey slab; it now takes the glass menu fill. The chat model button uses the composer's glass recipe (fill, blur, rim, sheen and the Liquid 3D bevel). The Liquid inner edge glow on the sidebar and Run settings panel, which read as a shadow around their scrollbars, is now a plain divider.
An image greeting row has a -76px top margin, so a composer position near 0 dropped its top under the chat header. Its padding now never falls below that margin; at the default middle position 27.5dvh is larger anyway.
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. 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". |
…pups A macOS native page shows through a hole cut in its ancestors' backgrounds, but a holed node's backdrop-filter still painted the blurred wallpaper over it, and the wallpaper layer, no ancestor of the page, was never cut, so sites looked frosted and tinted. Holed nodes now drop backdrop-filter, and the wallpaper is masked around the same hole, found through the page's own ancestors (no document-wide scan on the recheck). Menus, popovers, dialogs and sheets now point every hover token at the glass hover, not just --accent, so icon buttons there (the Run settings back button) hover as glass; Library row actions' hard-coded dark hover follows glass on glass pages.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb68726089
ℹ️ 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".
| // A mask is not a fixed background: its lengths are the layer's own CSS pixels, from its corner. | ||
| for (const node of masked) { | ||
| const box = node.getBoundingClientRect(); | ||
| const local = [values[0] - box.left, values[1] - box.top, values[2], values[3]]; |
There was a problem hiding this comment.
Keep wallpaper mask coordinates in unscaled CSS pixels
On macOS Desktop with interface zoom other than 100%, the wallpaper mask reuses values, which were divided by zoom to compensate specifically for WebKit's fixed-background rendering. The mask uses element-local CSS coordinates instead, and box.left/box.top are unscaled DOM coordinates, so this mixes coordinate systems and incorrectly scales both the hole's position and size. For example, the test's page at x=500 with a wallpaper starting at x=100 needs a local mask x of 400, but at 80% zoom this calculates 525. The wallpaper consequently remains over part of the native website and disappears outside its bounds. Calculate the mask from the original clipped bounds minus the wallpaper's rectangle, keeping the zoom compensation only for the fixed backgrounds.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 7e53a69: the mask now uses the unscaled hole rect less the wallpaper's corner (both CSS px); the zoom division stays only on the fixed-background holes. Test asserts 400px at 80% zoom.
Over a native page the holed panel body drops its blur, so the toolbar, bookmarks, device and agent rows beside the page now carry the frost themselves; none overlaps the page. The selected tab becomes a light glass pill instead of the solid card or accent fill.
The zoom division corrects only WebKit's fixed-background scaling; the mask is element-local, so it now uses the hole's own rect less the layer's corner, and stays on the page under a non-100% interface zoom.
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. 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". |
## What changed Typing in a long, idle chat could stall in Unsloth Desktop on Windows. The wallpaper fade rule used a descendant search inside `:has()`, so editing the composer could trigger a costly style recalculation across the chat. The slowdown reproduced with turn navigation disabled and no model running. Use direct-child selectors for the two wallpaper layouts. The plain Glass backdrop contains the image directly, and an uploaded wallpaper wraps it in a frame. Both keep their existing fade behavior. ## Verification - In Windows WebView2, median keydown-to-second-frame latency in the same synthetic 600-message chat fell from **160.1 ms to 5.0 ms**. The same source builds passed all 16 wallpaper fade cases. - Extended the existing thread-ancestor performance guard to check every combinator in wallpaper paths inside `:has()`. On the original stylesheet, the three prior checks pass and the new check fails on the fade selector. All 28 tests across the thread-ancestor, wallpaper and appearance suites pass with the fix. Playwright sent the final key at 1.88 seconds in both recordings. The full phrase appeared at 4.09 seconds before the fix and 1.88 seconds after it. The capture compares the parent and implementation commit. The follow-up commits only change the regression tests.  ## Glass users and the latest main The fade selector was one of four whole-thread `:has()` searches on the workspace that holds the chat. With Glass on (stored per origin, so Desktop can have it on while the same chat at 127.0.0.1:8888 does not), the other three still made every keystroke re-walk the thread: - `:not(:has(.aui-thread-welcome-center))` and `:has([data-tour="chat-compare-view"])` on the workspace (wallpaper dim, plus two Glass rules added in unslothai#16643) - `.aui-thread-viewport:has(.aui-thread-welcome-center)` on the thread scroller itself The welcome and compare views now set `data-chat-welcome` / `data-chat-compare` on `<html>` in a layout effect (counted, so compare panes and remounts stay correct), and the viewport rule uses the fixed child path to the welcome block. The branch is merged with main. The guard test now checks every `:has()` anchored on an element that holds the thread, including ones nested in `:not()`. Typing into an idle 600-message chat, headless Chromium, same server, JS and DOM, only the stylesheet differs, arms interleaved, 6 reps each, median [min-max]: | Glass | Arm | Style recalc per key | 88-char burst | Keydown to 2nd frame | |---|---|---|---|---| | on | main (A/A: two arms) | 26.4 / 23.4 ms | 2.97 / 2.87 s | 36.7 / 33.1 ms | | on | fade fix only | 23.4 ms [20.6-30.1] | 2.85 s | 34.0 ms | | on | this PR | 1.4 ms [1.4-2.4] | 0.68 s | 13.7 ms | | off | main (A/A: two arms) | 22.7 / 20.8 ms | 2.51 / 2.41 s | 31.2 / 30.0 ms | | off | fade fix only | 1.1 ms [1.0-1.4] | 0.62 s | 15.8 ms | | off | this PR | 1.1 ms [0.9-2.4] | 0.65 s | 13.9 ms | No visual change: 192 wallpaper states (workspace and chat root, backdrop / frame / crossfade, ready, fade, welcome / conversation / compare / compare with an empty pane, Glass on and off) compute the same display, opacity, viewport wash and composer glass values on main and on this PR in Chromium, Firefox and WebKit (576 cells, 0 differ; dropping the rules flips 96 of 192, so the check is live). The real app shows the same computed values on main and on this PR for welcome, conversation and compare, with and without Glass. Typing a 57-character question at 80 ms per key into the same 600-message chat with Glass on (4.6 s is the floor):  ## Issue unslothai#16603 Fixes unslothai#16603. Bisecting the Studio frontend from `v0.1.913` to `main` on a seeded 200-turn agent chat (about 427K tokens: reasoning, tool cards, web sources, compaction markers, code, KaTeX), headless Chromium, same server and data for every build: | Build | Style work per keystroke | 88-key burst | Scroll long tasks | | --- | --- | --- | --- | | before unslothai#16333 | 15.6 ms | 1.29 s | 189 ms | | unslothai#16333 (the fade `:has()` this PR bounds) | 619 ms | 58.1 s | 268 ms | | `v0.1.914-beta` | 144 ms | 13.9 s | 280 ms | | `main` | 136.5 ms | 11.4 s | 935 ms | | `main` + this PR | 4.6 ms | 1.32 s | 27 ms | unslothai#16751 (Reduce Motion default off) made scroll pay the same walk more often (61 ms to 188 ms per wheel step); this PR removes the walk, so no separate change is needed there, and it is why turning Reduce Motion on did not help typing. A spoofed agent session that grows to 30 turns with tool calls, file edits, web search and compaction rounds goes from 23.7 to 100.3 ms per key on `main` and stays near 1.2 ms per key with this PR. unslothai#16801 adds a CI gate that fails when selector matching per keystroke grows with chat length; it should merge after this PR. --------- Co-authored-by: Daniel Han <[email protected]>
Summary
A round of glass theme polish plus a composer position slider.
Non-chat pages under glass. With a wallpaper shown on all pages, Library, Images, Train and the other pages blurred the image by at least 22px and washed it with a 60-88% floor, while chat showed it sharp. Pages now show the image as chat does (no page-only blur) and use the sidebar's tint plus 6 points, which still includes the image-tone readability floor.
Composer position slider. The "Composer at the bottom" switch is now a 0 to 100 "Composer position" slider in Settings > Appearance > Composer. 50 is the old middle (same 27.5dvh top padding), lower moves it up, higher moves it down, and 100 docks it at the bottom like the old switch. The old setting migrates (on becomes 100, off becomes 50). Translated in all 25 locales.
Open conversations under glass. Only on a chat with messages (not the welcome view), the wallpaper drops to 70% of its conversation opacity and the composer gets a slightly denser fill (+9%, applied after the readability floor so a busy image cannot cancel it) and 5px more blur. The settings conversation preview matches.
Chat header model button. Replies scroll under the transparent chat header and showed through the model name. Under glass the model button and the "switch back" chip are frosted themselves, so the glass is exactly the hover's box (no border); the hover wash layers over the glass instead of replacing it.
Sticky bars and floating buttons. Sticky bars inside glass panels and popups (the Run settings footer with Reload / Save / Reset, list headers in popovers, dialogs, sheets and menus) now frost the text scrolling beneath them, and floating buttons (Eject model, jump to bottom) frost what they sit over. A glass surface with its own backdrop-filter is a backdrop root, which stops a child's backdrop-filter from seeing the content beneath it, so a surface holding such a child carries its blur on a
::beforelayer behind its content instead (layout checked unchanged across 400 elements of the model popover). The chat canvas itself is left alone: a wide sticky wrapper there would blur a band of the wallpaper.Buttons that read as buttons. The chat model button uses the composer's glass recipe (fill, blur, rim, sheen and the Liquid 3D bevel), and Eject model gets a denser fill with a soft lift. Glass also adds a 1.5px frost to the wallpaper, unless the user set an image blur.
Browser menu. Its dark fill was pinned to a surface resolved on
<html>with a layered!important, so under glass it stayed a flat grey slab while every other menu was glass. It now takes the glass menu fill. A sweep of the other layered!importantmenu fills found none left on a solid colour under glass.Scrollbar edge. The Liquid inner glow along the sidebar and Run settings panel edges sat right under their scrollbars and read as a shadow around them; it is now a plain 1px divider.
Account row hover. The sidebar account row is a menu trigger, so Radix replaces its
data-slotand the glass row hover never matched it. It now gets the same glass fill and rim as the other sidebar rows, including while its menu is open.Sheen and shadows. Liquid 3D highlights (sheen, rim glows, bevelled edge, beads, active pill and send bevels, lens rims, sidebar and panel inner glow) are cut by about 45%, other glass highlights by about 20%. The shared popup, tooltip and glass lift shadows are about 25% lighter under glass.
Websites in the built-in browser. On macOS a native page shows through a hole cut in its ancestors' backgrounds, but the glass panel body's backdrop-filter (added in #16570) still painted the blurred wallpaper over it, and the wallpaper layer, which is no ancestor of the page, was never cut, so sites looked frosted and tinted. Holed nodes now drop
backdrop-filter, andnative-view.tsmasks the wallpaper layer around the same hole (found through the page's own ancestors, so the 300 ms recheck still does no document-wide scan). The rows beside the page (toolbar, bookmarks, device and agent bars) carry their own frost, so the whole top of the browser stays glass while the site itself is untouched. The selected tab is a light glass pill instead of a solid fill.Glass hovers in popups and dialogs. Menus, popovers, dialogs and sheets only pointed
--accent,--sidebar-accentand--mutedat the glass hover, so buttons using--panel-surface-hover,--nav-surface-hoveror--chat-icon-bg-hover(the Run settings back button) hovered solid grey. They now map every hover token. Library row actions with a hard-coded dark hover follow glass on glass pages; the picture controls stay solid on purpose.Screenshots
Library under glass, before (left) and after (right). The page used to blur the image by at least 22px; now it matches chat.
An open conversation under dark Liquid 3D: dimmer image, denser composer, and the model button frosted over the reply text scrolling beneath it.
Model button idle and hovered: the glass is the hover's own box, with no border.
Eject model in the model picker frosts the rows behind it.
The Composer position slider, and the composer at 80.
Verification
npm run typecheck,npm run build,npm test(14835 pass, 0 fail). New tests cover the position normalisation and migration and assert each new glass rule.blur(22px)tononeblur(12px); a sticky element in the thread viewport staysnoneNot tested here