Skip to content

Studio: restore real Glass on the Linux app (live blur, fills, strength and the Windows-style title bar) - #17387

Merged
wasimysaid merged 5 commits into
unslothai:mainfrom
wasimysaid:fix/linux-glass-restore-blur
Nov 10, 2026
Merged

wasimysaid merged 5 commits into
unslothai:mainfrom
wasimysaid:fix/linux-glass-restore-blur

Conversation

@wasimysaid

@wasimysaid wasimysaid commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Since #16957 and #17327, Glass on the Linux desktop app has no live blur at all: every glass surface is a dense or opaque fill. On a machine with a GPU that trade buys nothing and Glass stops looking like glass:

  • The sidebar, composer, menus, dialogs and side panes no longer frost what is behind them. Over a wallpaper image the sidebar is a 96% opaque slab.
  • Glass strength does nothing. Dragging it from 0 to 100 on the chat page changes the computed paint of 0 of 932 elements and 0 pixels, because there is no blur to scale and every fill sits at its cap.

This removes the WebKitGTK no-blur rule and every fill that compensated for it, so Linux Glass uses the same blur, fills and strength as macOS and Windows again.

Kept from those PRs, still under data-glass-cpu, because they are paint costs that do not depend on the blur:

  • Frosted's grain tile (an SVG feTurbulence redrawn on every paint) stays off.
  • Liquid 3D's wide inner glows stay gradients and its lifts keep the smaller blur.

Software compositing. The pause-blur-while-moving path (#17007) skipped WebKitGTK only because there was no blur left to pause; it no longer does. One limit: WebKitGTK masks the WebGL renderer string ("Apple GPU"), so softwareCompositing() only reports true there when WebGL is unavailable or the documented override is set. It does not see llvmpipe.

The composer's blur was never drawn on Linux (second commit). With the blur back, the sidebar frosted the wallpaper but the composer showed it sharp behind a tint, although both compute the same backdrop-filter. The composer and the files panel each hold a "Drop files here" overlay that sits at opacity: 0 with its own backdrop-blur-sm until a file is dragged, and WebKitGTK stops drawing a surface's own backdrop blur while a hidden child of it carries a backdrop-filter. The overlays now take their blur only in the states that show them. In the real app, edge detail behind the composer goes from 24.0 to 1.6 (sidebar 0.8, bare wallpaper 35.2), and putting the hidden overlay's blur back on the live element returns it to 24.0. New tests/glass-hidden-overlay-blur.test.ts pins it.

The Linux title bar now matches Windows (third commit). Linux uses the same in-page title bar as Windows, but three parts of its Glass layout were switched on for Windows only: the frame that joins the title bar strip and the pinned sidebar into one frosted surface with a rounded inner corner, the browser pane's single glass layer below the caption, and the wallpaper blur behind non-chat pages. On Linux the strip behind the window buttons was bare wallpaper. All three now key on shouldUseCustomWindowTitlebar() instead of a Windows check; the data-windows-* attribute names are unchanged. On a rebuilt copy of the Linux page in WebKitGTK 2.54.2 the frame draws as on Windows (its mask and backdrop-filter on one pseudo-element work there), and that build supports the CSS anchor positioning the page layout uses. The look was checked by eye in the running Linux app against Windows screenshots.

Measurements, native Tauri dev build, WebKitGTK 2.54.2, KDE Wayland, Liquid Glass 3D over a wallpaper image, 600-message thread, 238 scripted scroll frames, three alternating runs each:

Rendering Blur Frame p50 / p90 Frames over 25 ms
GPU (NVIDIA) on (this PR) 16 / 18 ms 0 to 9
GPU (NVIDIA) off 16 / 17-18 ms 0 to 9
Software GL (llvmpipe forced) on (this PR) 20-22 / 24-28 ms 18 to 38
Software GL (llvmpipe forced) off 16 / 17 ms 2 to 6
Software GL, motion pause forced on paused while scrolling 16 / 17 ms 1

So with a GPU the live blur is free here, and without one this PR costs about 5 ms a frame on a fast desktop CPU, more on a slower one. That cost is the trade-off of this change. With the motion pause on, scrolling is back to 16 ms and the blur returns at rest, so a reliable software-rendering signal for WebKitGTK (for example from the shell) would close the gap as a follow-up.

Validation:

  • Live in the app: the sidebar and composer compute blur(...) saturate(...) with translucent fills again, and follow Glass strength.
  • tests/glass-webkit-blur.test.ts rewritten: the flag may only swap paint costs (no rule under it touches a blur, a fill or the strength variables); the grain and glow rules are still pinned. tests/glass-motion.test.ts updated for the gating. Full frontend suite (15,608) and the test typecheck pass.

Not checked: the title bar change on Windows itself (the condition is still true there, so it should be unchanged), the drop overlays while a file is actually being dragged, light theme, Frosted and Blurred styles, a real host without a GPU (software GL was forced on a GPU machine), and the AppImage build.

Relation to #17380: that PR's side-pane fill change edits a rule this PR deletes, so whichever lands second needs a small rebase. Its black tab strip came from the opaque fill removed here. Its sheen fix is still needed, since the stripes do not depend on the blur.

unslothai#16957 and unslothai#17327 turned off every live Glass blur on WebKitGTK and
replaced it with dense or opaque fills. With a GPU that blur costs
nothing measurable, and without it Glass on Linux is a flat tint: the
sidebar, composer, menus and dialogs no longer frost what is behind
them, and Glass strength has nothing left to change.

Remove the no-blur rule and every fill that compensated for it, so
Linux Glass uses the same blur, fills and strength as other platforms.

Kept from those changes, still under data-glass-cpu: Frosted's grain
tile stays off and Liquid 3D's wide glows stay gradients, since both
are paint costs that do not depend on the blur.

The pause-blur-while-moving path for software compositing no longer
skips WebKitGTK, which it did only because there was no blur to pause.
The composer and the files panel each hold a "Drop files here" overlay
that sits at opacity 0 with its own backdrop blur until a file is
dragged. WebKitGTK stops drawing a Glass surface's own backdrop blur
while a hidden child of it carries a backdrop-filter, so the composer
showed the wallpaper sharp behind a tint while the sidebar, which has
no such child, frosted it.

The overlays now take their blur only in the states that show them.
Linux uses the same in-page title bar as Windows, but three parts of
its Glass layout were switched on for Windows only: the frame that
joins the title bar strip and the pinned sidebar into one frosted
surface, the browser pane's single glass layer below the caption, and
the wallpaper blur behind non-chat pages. On Linux the strip behind the
window buttons was bare wallpaper.

All three now key on the in-page title bar instead of on Windows. The
data-windows-* attribute names are unchanged.
@wasimysaid wasimysaid changed the title Studio: restore real Glass on the Linux app (live blur, fills and strength) Studio: restore real Glass on the Linux app (live blur, fills, strength and the Windows-style title bar) Nov 10, 2026
@wasimysaid

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T13:31:59.569731Z 0c044ea 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 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: 4ddf42cf93

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

The shared title bar frame is a pseudo-element that also takes
Frosted's grain tile. Linux now uses that frame, and the WebKitGTK
no-grain rule listed only the sidebar, composer and files panel, so the
grain came back on the frame with a pinned sidebar.

Clear it there too, and have the test check every surface the grain
rule paints.
Conflicts with unslothai#17380, which changed the WebKitGTK side-pane fill inside
the no-blur block this branch removes:
- index.css: keep the block removed. The sheen and greeting halo fixes
  from unslothai#17380 sit outside it and merge as they are.
- glass-webkit-blur.test.ts: keep this branch's rewritten tests and
  main's two sheen tests; drop the tests for the removed fills.
@wasimysaid

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 0c044eaba5

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

@wasimysaid
wasimysaid merged commit 3a6cd4e into unslothai:main Nov 10, 2026
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.

1 participant