Repository navigation
Studio: glass lens, and a hairline composer outline lit by what is behind it - #16336
Conversation
Merges the updated studio-glass-all-pages into this branch.
Merges the updated studio-glass-macos into this branch.
|
@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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cdc26ec7e8
ℹ️ 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".
| opacity, | ||
| ].join(); | ||
| if (key === last) return; | ||
| last = key; |
There was a problem hiding this comment.
Refresh lens tint when glass appearance settings change
With Magnify or Shrink enabled, changing Glass strength or switching between glass styles without resizing the composer leaves the lens fill using the previous appearance. This cache key only includes geometry and wallpaper opacity, so place() returns before refreshing the computed wash and tint below. Changes to the root glass attributes/CSS variables do not trigger the wallpaper mutation observer, and the effect does not depend on material or strength. Consequently, even increasing strength toward an opaque, more readable composer retains the old translucent tint over the copied image. Refresh these layers independently of the geometry cache, or invalidate them when appearance settings change.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 69d4081: the composer's computed fill is part of the cache key, so a strength or style change refreshes the wash and tint on the next placement.
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! 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". |
# Conflicts: # studio/frontend/src/features/chat-background/backdrop.tsx # studio/frontend/src/features/chat-background/model.ts
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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". |
|
@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". |
…t a background image, and drop the Classic and Minimal themes (#16333) ## What changed A new **Glass theme** section in Settings > Appearance, just above Background image, turns the sidebar, composer, Run settings panel and (optionally) menus into translucent glass. Its switch sits in the section heading; the options appear only while it is on: - **Style**: Transparent, Frosted, Blurred, Liquid Glass (a nearly clear pane with a thin lit rim and a sheen) or Liquid Glass 3D (the same pane with a faint lit bevel, light pooling inside the edges and glass bead controls; the default). The switch remembers the last style. - **Glass strength** (0 to 100%, kept separately for light and dark mode, 40% light and 15% dark by default): blur from a fifth to twice each style's own, and every pane's opacity from about a third to nearly solid. It applies last, after the readability floor below, so it always shows. - **Glass menus** (on by default): dropdowns, selects, context menus, popovers, tooltips, toasts, hover cards and dialogs (Settings, search) take the glass too, always with some blur and a heavier tint so their text stays readable. The Theme dropdown also lists **Glass** right under Standard, a submenu with every style on top of whichever colour theme is chosen. **Glass works without a background image.** With no image the glass sits over the plain page colour. In light mode, where a white pane over a white page would vanish, the composer keeps a grey-tinted floor and an outline that darkens instead of brightening, and menus get a thin glass fill with a faint accent wash and a bevelled edge. **Hover and edges.** Liquid menus carry a lit rim (the base dropdown shadow used to win), active composer pills keep their fill on hover, the sheen is kept faint, and Firefox redraws glass blurs once the image has painted. **Readable over any image.** Studio measures the background image's tone once per image and raises the pane tint so text reads over it: darker panes over light images in dark mode, lighter ones over dark images in light mode, and a light grey shade in light mode over a light image so the sidebar stays distinct. Images that already contrast keep the plain glass. **Light mode.** Light panes need more body than dark ones, so in light mode the sidebar and Run settings panel take a higher floor and a slight grey tint that sets them apart from a white chat, menus and toasts stay at least 80% solid, grey secondary text is a step darker on glass, and controls on glass (segmented toggles, filled buttons, dropdowns) are frosted white with no outline, with selected and hovered states still see-through. **Glass keeps its own image settings.** While glass is on, image visibility is per mode (70% light, 40% dark by default) and **Fade to background** defaults to off. These are stored apart from the normal ones, so without glass an image keeps exactly the visibility and fade it had before, and turning glass on or off never changes the other set. **Glass off costs nothing at runtime.** With glass off nothing writes glass variables to the page and the background image is never sampled for tone; that work starts only when glass is switched on (a test guards it). **Sign-in and change-password pages** show the background under a glass card. When the install has more than one account they show only the built-in backdrop, never the last person's own image. Under glass: - Borders and dividers are glass lines (a single 1px line, the text colour at 9%, fields 14%) instead of opaque greys, everywhere the glass shows, including Images and Video. - Hover and open fills (composer pills, sidebar rows, header icons, menu items, model picker rows) are a translucent wash with a faint rim instead of a solid grey chip, and a row that lights both its shell and its button paints one pill, not two; menus that pin their own fill (More, lifted dropdowns) are pointed at the glass instead. - The BETA badge is an outline on the glass rather than an opaque chip with a dark drop shadow; the titlebar strip above a pinned sidebar matches the sidebar tint. - **Composer outline** off also removes the glass ring and bevel; with **Fade to background** off, the solid band behind the composer is removed. - No glass style adds an outer shadow (a test enforces inset-only). **Classic and Minimal themes are removed.** Their colours, ids (frontend, `theme-boot.js` and the backend `palette` Literal) and labels are gone; a saved Classic or Minimal falls back to Standard (the backend already drops unknown palettes, `drop_unknown_palette`). Settings are per device in `localStorage` (`unsloth_window_material`). ### Notes - The CSS minifier keeps only the last of a `backdrop-filter` / `-webkit-backdrop-filter` pair, so the glass rules put the unprefixed one last (Chromium and WebView2 ignore the prefixed one). A test guards the order. - Sticky sidebar section labels are cleared under glass so they do not paint solid bands. ### Stack This is the base of a stack; each PR builds on the one before: 1. This PR: glass materials 2. #16334: macOS system glass on Unsloth Desktop 3. #16335: glass on every page (for "All pages" in #16297) 4. #16336: glass lens and the hairline composer outline ### Screenshots Liquid Glass with no background image (built-in backdrop), light mode:  The Glass theme section, on and off:  The Theme dropdown with the Glass submenu:  Dark mode over a light image: the panes darken so the text reads:  Run settings with glass dividers, dark and light:  Glass strength at 0, 50 and 100%:  Earlier screenshots of the materials: Frosted, Liquid Glass and Liquid Glass 3D composers in light mode:  Frosted with Glass menus on, dark mode:  ## Verification - `npm run typecheck`, `npm test` (0 failures), `npm run i18n:check:strict`, `npm run build` - `pytest studio/backend/tests/test_personalization_settings.py` (palette list change) - Isolated Studio driven with Playwright in light and dark mode: every material, with and without a background image; the Glass theme switch; the Theme dropdown Glass submenu; a scripted sweep of every page and overlay (Settings, search, model picker, menus, toasts) for opaque fills and opaque borders under glass; Glass strength measured at 0, 50 and 100%. - New keys translated for all 24 locale overlays. ## Not tested here - Training and other GPU-only pages (CPU-only host); the glass is CSS over the same surfaces. --------- Co-authored-by: Unsloth <[email protected]>
|
@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". |
What changed
Glass lens (Off, Magnify, Shrink), under the Glass setting, makes the composer act like a thick piece of glass over the background image: the image seen through it is larger (Magnify, 1.18x) or smaller (Shrink, 0.87x) than the image around it.
It works by placing a copy of the wallpaper behind the composer's content, lined up with the real one and scaled about the composer's centre.
backdrop-filtercannot scale, and SVG backdrop filters are Chromium only, so the copy is what makes this work in the macOS app's WebKit too. The copy follows resizes, the welcome composer docking, new frames and adjustments of the image.The same copy also draws the glass composer's outline: a 1px hairline of the image right behind the edge, brightened and saturated, plus a faint highlight along the top. The outline takes the colours behind it (pink over pink, grey over grey) instead of a fixed grey ring. Composer outline off hides it.
Stacked on #16335.
Screenshots
Lens modes on Liquid Glass. Off keeps only the hairline outline; Magnify and Shrink scale the image under the composer:
The outline over a pink gradient, dark mode: pink where pink is behind it, grey elsewhere:
Update
The hairline is softer and more natural: blurred slightly, less saturated, lit a little more along the top and bottom edges than the sides, plus a faint inset bevel (light inside the top edge, a soft shade inside the bottom). Glass lens now lives in the Glass theme section from #16333 and shows only while glass is on; the built-in no-image backdrop gets the lens too.
Verification
npm run typecheck,npm test(0 failures),npm run i18n:check:strict,npm run build