Repository navigation
Unsloth Studio / Desktop: glass strength and lens act the same on every glass surface; 0% is clear, and a 12px readable blur floor applies from 1% up - #18520
Conversation
…with a readable blur floor Glass strength now scales blur and fill together everywhere: menu and dialog blur floors, the open composer's extra blur, page cards and floating buttons scale with it, and light page fills and the macOS strip follow --glass-opacity. A shared --glass-read-blur floor keeps a busy photo from showing sharp behind text at low strength or under the lens. The lens draws into every glass surface (sidebar, run settings, sheets, menus, model picker, page cards), not only the composer.
…ription says every glass surface On Windows and Linux Desktop the sidebar's glass is the frame's ::before, and dialogs were not lens hosts, so the lens skipped both. Hosts whose ::before draws the glass count, and the lens tint reads that layer's fill.
… floating controls get the lens The frame's ::before paints at z-index 1, over a z-index -1 lens, so the lens was tinted and blurred twice. Its lens now sits at 1 with the sidebar at 2, and the frame is not isolated, so the strip corner stays above the conversation. Tooltips, floating chat controls and scroll-to-bottom were glass without a lens.
Menus, dialogs and tooltips blur past the shared --glass-blur (an 18px or 24px floor scaled by strength), but the lens copy used --glass-blur, so turning the lens on sharpened the photo behind their text.
…ign-in card get the lens A test now holds the lens host list to the Glass menus and toast blur rules, so a new glass surface there can't miss the lens.
App-level toasts (the llama update banner) mount deep under the root, outside the workspace and not as a body child, so the observers missed them.
…e their fill with strength
…wallpaper per card
|
The assertion at |
…d up keep the 12px floor
|
Pushed
|
…s the page model triggers
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! 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". |
…ip and docked Run settings, no seam where they meet (#18530) **Stacked on #18030.** This PR's own commits are the six after `655a2a5` (`9d8b8c8`..`c078050`). Review it after #18030, or diff `655a2a5...c078050`. With the sidebar pinned and Run settings docked, the glass strip under the titlebar met the top of Run settings at a visible line. The two used different fills, and two backdrop-filter layers step where they meet even with the same fill. Run settings' own edge line also cut through that corner. **The fix** - While the sidebar is pinned, the strip's glass also runs down the docked Run settings column, so one blur covers the sidebar, the titlebar and the panel. The panel draws no glass of its own there. - A concave curve joins the strip to the panel, and the panel's edge line is hidden beside the strip so it doesn't cut through that curve. - With the sidebar unpinned, Run settings keeps its own glass and rounded corner from #18030. **Tested** New tests in `tests/window-material.test.ts` cover the strip mask, the curve and the hidden edge. `tsc -b` is clean. `npm test` passes except the same KaTeX/Vite test that fails on main in my checkout. The close-ups below come from Unsloth Desktop on Arch Linux (KDE Wayland, WebKitGTK 2.54.2), maximized, with Run settings open. Before is upstream main `beec0a3` plus #18030; after is the same plus this PR.  **Not tested yet:** Windows (where the seam was first seen, under the Windows caption) and macOS. **Related glass PRs** One set of Glass fixes, not stacked: review and merge in any order. - #18030 Glass on the header, titlebar and window buttons, and a rounded Run settings corner - #18032 Blur the new chat composer under glass on Windows - #18520 Glass strength and lens act the same on every glass surface; 0% is clear - **#18530 One glass sheet over the pinned sidebar strip and docked Run settings (needs a small follow-up once #18600 lands) (this PR)** - #18531 Narrow window's Run settings sheet glass - #18600 Sidebar glass halo on WebKitGTK before 2.54 (#18530 needs a small follow-up once this lands) - #18615 Glass tint on the user's chat bubble and code blocks --------- Co-authored-by: Michael Han <[email protected]>
…0% to full blur at 1%, then stays flat to ~60% (#19162) Follow-up to #18520. On main the Glass strength slider has two problems: - At 0% the glass is clear, but 1% already gives the full 12px reading blur, so there's no gradient at the low end. - From 1% up to around 60% (Liquid Glass 3D), the blur barely changes. **Fix** - A new `--glass-level` (slider position, 0 to 1) drives the curve: - From 0 to 25% the glass fades in: `--glass-on` goes from 0 to 1, and the reading blur floor from 0 to 12px. - Above 25%, the blur keeps rising from 12px up to twice the material's base. - Every step of the slider now changes something. - The `model.ts` blur scale no longer steps at 1%. - The default is now 25% (light and dark), where the blur reaches the 12px floor. **Tested** (Liquid Glass 3D, lens Off, sidebar pinned; light and dark; 0, 1, 5, 10, 15, 20, 25, 50 and 100%) | machine | main `7828fe63ce` | this PR `5920a3599f` | |---|---|---| | GR33N: Windows 11, WebView2 157.0.4341.60 | sidebar sharpness 4.54 at 0%, 3.15 at 1% (full blur) | 4.16 at 1%, fades in to 25% | | Mint: Linux Mint, WebKitGTK 2.52.6 | 4.11 at 0%, 2.52 at 1% (dark, full blur) | 3.85 at 1%, fades in to 25% | Sharpness is the mean gradient of the sidebar patch; higher means less blur. From 25% up both builds match.   **Not tested:** macOS, WebKitGTK ≥ 2.54, and Unsloth Studio web in Chromium. Composer: the change is small, because its own fill hides most of the blur difference. Tests: `window-material.test.ts` now checks the curve: 0% gives 0px, 1% at most 1px, 25% at least 12px, and the blur rises at every 5% step. Defaults are updated in `appearance-theme-file.test.ts`. 78 pass. The KaTeX symlink failure happens on main too. --------- Co-authored-by: Lyxot <[email protected]>
What changes on screen
Unsloth Desktop on Linux Mint, upstream main
3880f44on the left, this branch7d3a846on the right, same machine, profile, wallpaper and settings.1. Strength 0% is now clear, same as main. No blur and no read floor at 0%; main left about 2px of blur there, this leaves none. The fill is unchanged from main.
2. From 1% up, text never sits on a sharp photo. Every glass surface gets at least 12px of blur, so at 40% Run settings and the sidebar blur 12px where main blurred 8.4px.
3. The lens (Magnify / Shrink) reaches menus, panels, dialogs and tooltips, not only the composer. The magnified copy bends the wallpaper behind each of them, and each keeps its own 1px edge, with no lens rim outline on top. Each grid is strength 0 / 40 / 100 with the lens off, 40 Magnify and 40 Shrink, light and dark, at 1x and with the top-left corner zoomed. Mint, Unsloth Desktop, main
3880f44vs7c08785.What was wrong
With Glass on, the strength slider and the lens behaved differently depending on which surface you looked at:
--glass-opacity.The fix
18px/24pxtimes strength, the open composer, page cards and floating controls scale their extra blur, and the remaining fills follow--glass-opacity.--glass-strengthis 0 there (it was 0.2), so every glass blur is 0px, including the Windows page wallpaper blur and sticky page headers. Fills keep main's 0% value (--glass-opacity0.35).--glass-read-blur(12px, gated by--glass-on) is the least blur any glass surface gets, so text never sits on a sharp photo at low strength.lens.tsxscans one host list (LENS_HOSTS) and skips any host that isn't drawing glass right now (Glass menus off, an opaque sheet). A test pinsLENS_HOSTSto the Glass menus and toast blur rules inindex.css, so a new glass surface there can't miss the lens.::beforeatz-index: 1. Its lens sits above that and below the sidebar, and the frame isn't isolated, so the titlebar strip corner still stays above the conversation..glass-float-surface, which main added to the Glass menus blur, are lens hosts too, so the test that pinsLENS_HOSTSto that rule holds on the merge with main.Works on its own. The welcome composer only blurs with Glass when #18032 is in (without it the thread's fade mask keeps the welcome composer from blurring at all), so the readability floor shows there once both are merged.
[data-chat-header-actions]and[data-chat-model-controls]in the host list come from #18030 and match nothing until it lands.How it was tested
Before is upstream main
3880f44(this PR's base), after is7d3a846. Both are real Unsloth Desktop shells (Tauri) built on the same machine, run headless against one profile and one backend, with every setting changed through the real Settings controls (strength slider, Glass lens select, wallpaper upload with "Show on: All pages"). Glass style Liquid Glass 3D.tauri-driver3880f44vs7d3a8463880f44vs3fb00b43880f44vs3fb00b4Mac and tester both measured the sidebar and Run settings at 2px / 8.4px on main at 0% / 40%, and 0px / 12px on this branch, with 1 lens at 40% Magnify on main and 2 (chat) or 3 (Run settings, menu, tooltip) here. Tester also read the menu and tooltip blur: 18px on main at every strength, 0px at 0% and 15.12px at 40% here.
3880f44The menu, tooltip and dialog grids under 3 are at
7c08785(the head). The other Mint screenshots are at7d3a846, the Mac and tester ones at3fb00b4. The head7c08785drops the lens rim on every surface but the composer (only the grids under 3 show that) and adds the moving-surface lens fixes, two lens hosts from main (the find bar and.glass-float-surface) and lens rescans on a glass style change or when a surface stops moving, and none of those are in these frames. Frontend gates at7c08785:npm run typecheck, 16732npm test(1 skipped),npm run build. The full suite also passes on869695dmerged with upstream main4207d60(the KaTeX?rawtest aside, which fails there only because that tree'snode_modulesis a symlink). A test evaluates every glassbackdrop-filter: blur(...)inindex.cssat 0% (must be 0px) and 1% (must be at least 12px).macOS and tester
The sidebar and Run settings leads, shot on the Mac (Playwright WebKit) and on tester (WebKitGTK 2.54.2). Both drive the Unsloth Studio frontend with a mocked API instead of a Desktop shell, with the settings put in storage rather than set through the Settings controls. Their menu and tooltip lens shots were taken before the rim fix and are dropped; the grids under 3 replace them.
macOS 26, Playwright WebKit, 2 images
Arch (tester), WebKitGTK 2.54.2, 2 images
Full matrix
36 grids. Each one is a single surface on one wallpaper in one theme: 5 rows (strength 0 / 40 / 100 with the lens off, 40 with Magnify, 40 with Shrink), before on the left, after on the right. The two wallpapers are stock Linux Mint ones, a sharp high-contrast city photo and a busy, saturated colored-pencils close-up. These are at
7d3a846: the account menu, Settings dialog, model picker and tooltip grids still show the lens rim that7c08785drops (see the grids under 3).Unchanged (reference surface): the welcome composer
The composer already scaled its blur with strength and already had the lens, so before and after match apart from 0% (now clear) and the 12px floor at low strength. It is the behaviour every other surface now follows.
Sidebar and titlebar strip, 4 grids
Run settings, 4 grids
Account menu, 4 grids
Settings dialog, 4 grids
Model picker, 4 grids
Tooltip (2x), 4 grids
Page cards: Export (plain glass, no lens by design), 4 grids
Page cards: API (plain glass, no lens by design), 4 grids
Linux, Chromium 159 (Colab T4)
Main
3880f44vs this PR7c08785, both served on one Colab T4 VM against the same backend and wallpaper, shot in headless Chromium 159 with Glass on (Liquid Glass 3D). Strength 0 / 40 / 100 with the lens off, plus 40 Magnify and 40 Shrink, light and dark. Chromium shows the same four changes as the WebKit rows above: 0% draws no blur on the sidebar and Run settings (main still blurs), 40% reads at the 12px floor instead of 8.4px, Magnify bends the account menu and model picker too, and the menu edge keeps its soft edge with no grey rim.Every surface, Chromium, 14 grids
Not tested yet
[data-glass-float]buttons): they need a loaded model and a long thread, which this headless profile didn't have. Covered by the host-list test only.Related glass PRs
One set of Glass fixes, not stacked: review and merge in any order.
Before / after on Linux Chromium, head
2fc97fb8dvs merge basef4768e00bTwo isolated Unsloth Studio installs, Liquid Glass 3D over a striped wallpaper, every setting changed through Settings > Appearance (upload, Glass theme switch, strength slider, Glass lens select). Measured on each side:
Strength 0, chat page: the sidebar and composer are clear on this branch.
Strength 40 with Magnify, Settings dialog: the lens reaches the dialog and it keeps its frosted fill.
Strength 40 with Magnify, chat page: the sidebar and the model picker card are lensed too, not only the composer.