Skip to content

Fix glass surfaces in the built-in browser - #16570

Merged
Lyxot merged 3 commits into
unslothai:mainfrom
Imagineer99:fix/glass-browser-surfaces
Nov 4, 2026
Merged

Lyxot merged 3 commits into
unslothai:mainfrom
Imagineer99:fix/glass-browser-surfaces

Conversation

@Imagineer99

Copy link
Copy Markdown
Member

Opening the built-in browser in a glass wallpaper workspace leaves a solid block across its tabs, toolbar and Windows titlebar strip. Paint the glass tint and blur on a separate layer below the native titlebar, while retaining opaque page and document surfaces. The separate layer avoids adding a stacking context to the browser section.

Validation: frontend typecheck and production build; 6 existing layering tests; 24 headless before/after states covering light/dark, frosted/liquid glass, standard themes and document-mode surfaces. Standard-theme screenshots are pixel-identical. Browser tab hit-testing passes.

Browser glass surfaces before and after

Full screenshots, facts and reproduction details · Harness instructions

Evidence compares 24d65c19ddaf0da82c4cc48b9bb67ec69f48b97a to 862f051926991b51455152205b340fa02719cfb1. It uses the real components with synthetic content and stubbed native calls; actual native WebView content is not exercised.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T07:11:49.183240Z 8f6ed31 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@Lyxot Lyxot self-assigned this Nov 4, 2026
@Lyxot

Lyxot commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Pushed cf18f80 on top:

  • The glass rules no longer apply when the browser opens as the narrow-window overlay (html[data-browser-overlay-open]). That modal sits on an opaque bg-background dialog, so the tint and blur changed its chrome colours and left a 34px two-tone strip on Windows without any glass effect. The overlay is now identical to main; the side panel keeps the glass.
  • Tightened the CSS comments.
  • Added a check to tests/browser-tab-strip-stacking.test.ts that every [data-slot="browser-panel"] rule with a backdrop-filter targets ::before, so the section never becomes a stacking context above the tab strip.

@Lyxot

Lyxot commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cf18f8018f

ℹ️ 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".

Comment thread studio/frontend/src/index.css Resolved
@Lyxot

Lyxot commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 8f6ed315ef

ℹ️ 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".

@Lyxot

Lyxot commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Review converged on 8f6ed31.

Changes during review:

  • cf18f80: the glass rules skip the narrow-window browser overlay, whose opaque dialog gained nothing from them and got off-colour chrome plus a 34px two-tone strip on Windows.
  • 8f6ed31: fixes the Codex P1. On macOS, native pages sit under the app webview and markHole() cuts only real elements, so the section::before glass veiled them. The tint and blur now sit on the tab strip and the panel body instead (both already stacking contexts); the section still gets no filter, so the tab strip stays above the drag strip. The stacking test now fails if a filter lands on the section or on a pseudo-element.

Not verified: the macOS and Windows desktop apps, which need a Tauri build. Separate from this PR: on main, the wallpaper / glass backdrop is a sibling of the browser page, so markHole() never cuts it and it may already cover native pages whenever glass is on.

@Lyxot Lyxot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The browser glass now covers the tab strip and toolbar without veiling macOS native pages; the overlay and standard themes are unchanged. Codex converged and staging CI passed on 8f6ed31, and the branch still builds and passes with today's main (including #16571 and #16572).

@Lyxot
Lyxot merged commit 9285697 into unslothai:main Nov 4, 2026
shimmyshimmer added a commit that referenced this pull request Nov 4, 2026
## 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 `::before` layer 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 `!important` menu 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-slot` and 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`, and `native-view.ts` masks 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-accent` and `--muted` at the
glass hover, so buttons using `--panel-surface-hover`,
`--nav-surface-hover` or `--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.

![Dark Liquid 3D, Library before and
after](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/16643/cmp_dark_liquid-3d-49553793f6d9.png)

![Light Frosted, Library before and
after](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/16643/cmp_light_frosted-4009d955bada.png)

An open conversation under dark Liquid 3D: dimmer image, denser
composer, and the model button frosted over the reply text scrolling
beneath it.

![Conversation under
glass](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/16643/conversation_dark-25fa311c6802.png)

Model button idle and hovered: the glass is the hover's own box, with no
border.

![Model button
idle](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/16643/round3_model_idle-7c7d6e335fee.png)
![Model button
hovered](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/16643/round3_model_hover-f55db4cdb4d0.png)

Eject model in the model picker frosts the rows behind it.

![Eject model
frosted](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/16643/round4_eject-d9d9238e6e5d.png)

The Composer position slider, and the composer at 80.

![Composer position
setting](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/16643/settings_slider-17b086b65479.png)

![Composer at position
80](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/16643/composer_pos_80-d222462d14de.png)

## 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.
- Local Studio driven with Playwright, wallpaper on all pages, Liquid
3D, Transparent and Frosted in dark and light, with a conversation
seeded through the chat history API:
  - pages: artwork filter `blur(22px)` to `none`
- conversation: wallpaper opacity 0.4 to 0.28; composer fill alpha 0.27
to 0.32 (dark), blur 4.4px to 9.4px
- model button: glass fill on the 10px button itself, no border, the
group has no fill
- composer position: top at 128px (0), 354px (50, unchanged), 572px
(80), docked (100)
- sticky bars in the Run settings panel and model popover resolve to
`blur(12px)`; a sticky element in the thread viewport stays `none`
  - dark popup shadow 0.7 to 0.52

## Not tested here

- macOS system glass on Unsloth Desktop (native vibrancy), and the
native WebView browser page itself: the hole and wallpaper mask are
covered by the native view unit test with a stubbed DOM, not a real
Desktop build.
- Real model output and the Run settings footer with a loaded model (CPU
host); the footer rule was checked by resolving it inside the live
panel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants