Skip to content

Studio: Element outline setting, outlined light glass, Transparent glass with strength as opacity, glass Show on, and glass on pages without a background - #16890

Merged
danielhanchen merged 15 commits into
mainfrom
studio-element-outline
Nov 6, 2026
Merged

danielhanchen merged 15 commits into
mainfrom
studio-element-outline

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

What changed

Composer outline 0 now means no outline. On macOS glass (Desktop) the glass composer rule outranked the Appearance setting, so 0 kept a 14% ring. The setting now wins over every glass edge: 0 removes it on macOS glass and over a background image, and any other value draws exactly that ring. Solid themes keep their soft drop shadow at 0.

New Appearance > Preferences > Element outline slider (0 to 100). One border strength for buttons, fields, selects, cards and menus across every palette and glass style. Unset keeps each theme's own borders, and the slider starts at that theme's real strength (Standard 10 light / 15 dark, most colour themes about 30 to 36 light, glass 12 / 14), read live from the page colours, so the first drag does not jump. Saved with the other appearance settings (backend field added).

Light glass outlines its controls by default. Light glass used to clear borders and rely on inner light only, so pills, search, selects and fields had no edge over the wallpaper. They now get a soft 12% ring (following Element outline when set), boxed panels and select triggers keep their borders, and borderless settings fields get the glass ring.

Glass theme Show on. Glass gets the same New chat page / Chats / All pages choice as the background image. Outside that scope the page draws solid (no glass attribute, glass menus, lens or plain backdrop). Existing installs keep glass on every page.

Glass on pages without a background image. The plain glass canvas only mounted on chat routes, so with the image limited to New chat page or Chats the hub, Library and other pages lost glass entirely. It now mounts on any route where glass applies and no image shows.

Transparent glass keeps each surface's colour, with glass strength as its opacity. Transparent now draws the plain theme with the background, card, sidebar, field and panel colours at the glass strength's opacity (0 clear, 100 solid), with no shadows and no blur. It no longer takes the frosted glass rules (tint floors, sheen, glass rings); menus, dialogs, tooltips and toasts stay solid so they remain readable, and accent colours keep their fill. Before, strength only moved a tint behind floors and fixed control fills, so on most surfaces it looked like it did nothing.

Glass chip in the Theme menu. The chip was white frost over nothing and looked like an empty circle when glass was off. It now frosts a small colour gradient behind an "Aa", in light and dark.

Verification

  • npm run typecheck, npm test, npm run i18n:check:strict, npm run build
  • pytest studio/backend/tests/test_personalization_settings.py
  • Local Studio (CPU, PyTorch-free install), Liquid Glass 3D:
    • Hub, settings and chat controls show a single outline in light glass; Element outline 40 darkens them all and 0 clears them.
    • Composer outline 0 resolves --composer-shadow to none on macOS, Liquid Glass 3D and Frosted, with and without a background image (main kept the 14% ring on macOS glass without one).
    • The unset slider read 10 / 15 (Standard), 35 (Matcha light), 19 (Blueberry dark), 26 (Neon Cyberpunk dark), 12 / 14 (glass).
    • Glass Show on: Chats keeps glass on the new chat page and drops it (and glass menus) on the hub; New chat page drops it on the hub; All pages keeps it everywhere.
    • With the background image on Chats only, the hub, Library and Images keep glass in light and dark.
    • Transparent: the Glass strength slider sets the surface opacity exactly (0 fully clear, 100 solid) with no shadow or blur; chat and hub checked in light and dark at 40, and nested sidebar labels no longer double the fill.

Not tested here

  • Native macOS vibrancy in the Desktop app (simulated by setting data-glass="macos" in the browser).
  • An open conversation with "New chat page" glass scope (needs a loaded model); the route mapping is shared with the background image and covered by tests.

Before / after: glass on pages without a background image

Fixes #16770

Blurred glass, dark theme, no background image. New chat looks the same on both sides; on Model hub, main drops the glass canvas so the sidebar turns an opaque grey, while this PR keeps the same glass sidebar as New chat.

Glass on pages without a background image, before and after

…tting, outline light glass controls

- Composer outline now outranks the glass composer edge: 0 removes it on macOS glass and over a
  background image, any other value draws exactly that ring.
- New Appearance > Element outline slider sets one border strength for buttons, fields, cards and
  menus across palettes and glass; unset keeps each theme's own borders.
- Light glass draws a soft outline on its controls, cards, selects and fields by default instead of
  clearing them.
…ass is off

The chip was white frost over nothing, so on a plain menu it looked like an empty circle. It now
frosts a small colour gradient behind an Aa, matching the other theme chips in light and dark.
… own border strength

The slider showed a fixed 12 or 14 when unset, while light colour themes draw their borders near
30 to 36, so the first drag made every border jump lighter. It now reads the live border, page and
text colours (glass keeps its ring strength) and re-reads them when the mode, palette or glass
changes.
Glass theme gets the same New chat page / Chats / All pages choice as the background image. Outside
that scope the page draws solid: no glass attribute, glass menus, lens or plain-page backdrop.
Existing installs keep glass on every page.
The plain glass canvas only mounted on chat routes, so with the image set to New chat page or Chats
the hub, library and other pages lost glass entirely. It now mounts on any route where glass applies
and no image shows.
# Conflicts:
#	studio/frontend/src/features/chat-background/lens.tsx
#	studio/frontend/tests/window-material.test.ts
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 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-06T13:49:52.495161Z 1aa375f 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

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: da82f5e887

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

Transparent now removes the background and every box and text shadow from the sidebar, composer,
pages, cards, buttons and fields, and draws their edges with a 1px outline that follows Element
outline (Composer outline for the composer). Menus, dialogs, tooltips and toasts keep a fill so they
stay readable, and hover, open, selected and checked controls, accent and status colours and focus
rings keep theirs.
@shimmyshimmer shimmyshimmer changed the title Studio: Element outline setting, outlined light glass, glass Show on, and glass on pages without a background Studio: Element outline setting, outlined light glass, clear Transparent glass, glass Show on, and glass on pages without a background Nov 6, 2026
…ength as its opacity

Instead of clearing every fill, Transparent now draws the plain theme with the background, card,
popover, muted, secondary, sidebar and field colours at the glass strength's opacity (0 clear, 100
solid), with no shadow or blur. It sets its own data-glass-clear attribute so none of the frosted
glass rules apply, redefines the tokens on #root from the copies taken on html so portalled menus,
dialogs and toasts stay solid, and hides the sidebar footer fade like the other glass styles.
@shimmyshimmer shimmyshimmer changed the title Studio: Element outline setting, outlined light glass, clear Transparent glass, glass Show on, and glass on pages without a background Studio: Element outline setting, outlined light glass, Transparent glass with strength as opacity, glass Show on, and glass on pages without a background Nov 6, 2026
@danielhanchen danielhanchen self-assigned this Nov 6, 2026
The resting sticky header painted the page colour again on top of the page wash, which read as a
band behind the tabs. It is clear at rest, like the other glass styles, and keeps its fill once
content scrolls under it.
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@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: 54f5b65d7a

ℹ️ 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 on lines +7125 to +7126
--card: color-mix(in srgb, var(--glass-page-card) var(--clear-alpha), transparent);
--popover: color-mix(in srgb, var(--glass-page-popover) var(--clear-alpha), transparent);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep toast surfaces opaque in Transparent mode

With Transparent glass enabled at a low strength, this also makes notification backgrounds transparent: AppProvider renders <Toaster> inside #root, and Sonner renders its section inline rather than portalling it to body. The light toast background uses --popover via --normal-bg in components/ui/sonner.tsx, while dark toasts use --card in index.css; both tokens are made translucent here. At strength 0, notifications therefore become bare text over the underlying page or wallpaper, compromising readability. Explicitly restore the solid surface tokens for the toaster, or portal it outside this subtree.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fixed in 1b57f3e: the toaster now re-resolves the surface tokens at full opacity, so toasts stay solid at any Transparent strength.

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 1b57f3e084

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

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 6, 2026
…sion

Dark is the original frost again. Light keeps the same frost on a cool grey base with a darker rim
and brighter highlights, so it no longer reads as an empty ring on a white menu.
danielhanchen added a commit that referenced this pull request Nov 6, 2026
…efore dragging it (#16909)

## Summary

`Chat UI Tests (chat)` keeps failing on unrelated PRs in the floating
monitor geometry step:

```
[ui] resize landed at 260x141 with limits {'minWidth': 256, 'maxWidth': 260, ..., 'inline': 'opacity: 1; left: 988px; top: 0px; ... max-width: 260px; ...'}
AssertionError: [ui] FAIL: resize width: expected 296, got 260
```

Seen on the staging runs for #16890 and #16782 today, with identical
numbers. The limits logging added in #16885 is what shows the cause, and
it is not the stale viewport limit #16861 and #16885 assumed.

`use-floating-panel-layout.ts` sets `maxWidth = constraints.width -
left`. With the 1280 px viewport and 16 px insets the constraint box is
1248 px wide, and `1248 - 988 = 260`. So during the resize the panel was
moved to the right edge, though the step had just dragged it to the top
left and the limits wait before the resize saw room for 296 px.

The sequence:

1. The active drag into the shrunken viewport's corner snaps the panel
back to its anchor, so its horizontal position is "right edge"
(`intent.left === null`).
2. At the 260 px viewport that anchor puts it at left 0. On
`set_viewport_size(viewport)` the next layout pass moves it back to the
right edge, but left 0 is inside the restored viewport too, so
`wait_for_box("viewport restore", is_inside)` can pass before that pass
runs.
3. `drag_monitor_to(0, 0)` then grabs a panel still at left 0 and drops
it at left 0. `finishDrag` only makes an axis absolute when the drag
changed it ("a null axis stays anchored to the far edge"), so the
horizontal anchor stays on the right edge.
4. The native resize fires the layout's `ResizeObserver`,
`placeAxis(null, maxLeft)` puts the panel at the right edge (left 988),
and the width is capped at the 260 px left there.

The component is doing what it is designed to do: a user cannot start a
drag in the frame between a window resize and the layout pass. Only the
test grabs it too early.

## Change

`tests/studio/playwright_chat_ui.py`, test only. After restoring the
viewport, wait for the monitor to stop moving (`wait_for_settled`, the
frame-polled helper `pointer_drag` already uses) before the `is_inside`
check and the drag. The layout pass runs within that wait and restarts
it if it moves the panel, so the drag starts from the panel's real spot.
The comment on the limits wait from #16885 no longer blames a stale
viewport limit.

## Testing

- The failing runs' logged limits match the sequence above exactly
(`left: 988px`, `max-width: 260px`, `1248 - 988 = 260`), on two runs on
different staging repos.
- `python -m py_compile tests/studio/playwright_chat_ui.py`.
- This PR's own `Chat UI Tests (chat)` run exercises the step. The
failure is a timing race, so a single green run cannot prove the fix by
itself; I will keep watching the staging runs after it lands.
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@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: 64d297929f

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

--sidebar: color-mix(in srgb, var(--glass-page-sidebar) var(--clear-alpha), transparent);
--panel-input-surface: color-mix(in srgb, var(--glass-page-input) var(--clear-alpha), transparent);
--panel-surface: var(--background);
--color-background: var(--background);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep background-colored button text opaque in Transparent mode

With Transparent glass enabled, rebinding --background and --color-background also reduces the opacity of foreground text styled with text-background, not just surface fills. For example, the Library's New button in features/library/components/library-toolbar.tsx uses bg-action text-background, and the shared Button's dark variant uses the same combination. At strength 0 their labels and icons become invisible while the action-colored buttons remain solid; intermediate strengths also reduce their contrast. Restore the original opaque background color for these foreground uses, as the existing frosted-glass rules do, or separate surface-opacity tokens from text-color tokens.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fixed in 1aa375f: text-background elements re-pin --background to the solid copy, as the frosted rules do, so their labels stay opaque at any strength.

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 1aa375f514

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

@danielhanchen
danielhanchen merged commit dc916c9 into main Nov 6, 2026
@danielhanchen
danielhanchen deleted the studio-element-outline branch November 6, 2026 14:00
LeoBorcherding added a commit to LeoBorcherding/unsloth that referenced this pull request Nov 6, 2026
Conflicts were the store split against unslothai#16890 and unslothai#16921: elementOutline moves into
lib/appearance-customization.ts with a CUSTOMIZATION_FIELDS entry (chat), and the
material store starts its new scope from the PR's defaults.
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.

[Bug] Glass setting not applied consistently across Unsloth Desktop UI

2 participants