Repository navigation
Studio: remove Liquid Glass stripes and greeting rings, and the black browser tab strip on Linux - #17380
Conversation
…n Linux On WebKitGTK, Glass drops its live blur and uses dense fills. Two things showed through as a result. The liquid sheen fades about 2% of white out across half the surface. WebKitGTK does not dither gradients, so over a flat fill each 8-bit step drew as a wide diagonal stripe on the sidebar, composer, browser toolbar and dialogs. The sheen is now off on that path. The side panes took a fully opaque fill. The browser's tab strip is its own layer (z-40), and WebKitGTK painted that opaque layer black when the pane opened, hiding the tabs until something restyled it. The side panes now use the same 96% cap as the sidebar.
The diagonal stripes also show on the macOS app. The cause is the same: WebKit does not dither gradients, so the sheen's few percent of white steps down in wide bands. Chromium dithers the same gradient smooth, so Windows keeps it. Key the override on data-glass-layers (the WebKit flag) instead of the WebKitGTK-only data-glass-cpu, and move it next to the sheen definitions it overrides.
Firefox does not dither the sheen gradient either and draws the same wide bands. It sets no engine flag, so the override sits behind @supports (-moz-appearance: none), with a repeated attribute to match the specificity of the dark sheens it overrides.
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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. |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ 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. 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". |
The welcome greeting sits on a soft elliptical halo that darkens a background image behind the text. Glass with no image draws a plain backdrop in the page colour, so there the halo is the same colour as what it covers. It changed nothing, and blending it rounded a step dark in places, which drew faint rings around the greeting (visible on macOS, one-step lines on Linux). Draw the halo only where the wallpaper is an image.
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.
…th and the Windows-style title bar) (#17387) 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.
Plain glass backgrounds inherit the image wallpaper's 150px header contrast fade. Blending that fade over the same page colour produces subtle horizontal bands in WebKit. Restrict the existing fade selector to wallpapers without `data-glass-backdrop`. Plain glass becomes uniform while image wallpapers retain their header contrast fade. This changes one selector, using the existing marker without adding platform branches or override rules. It builds on merged unslothai#17380 and does not change greeting or Settings styling. Validation: - `npm run build` and 60 existing tests across the glass, greeting halo, window material, and composer outline suites passed. - 24 before/after component comparisons in Linux Playwright Chromium and WebKit, covering light/dark liquid glass, clear glass, image wallpapers, and solid controls. - WebKit dark liquid glass: the sampled header background changes from RGB 23/24 bands to uniform RGB 24; 6,000 pixels change in the 1200×200 header crop. - Every image-wallpaper and solid-theme control is pixel-identical. Chromium plain-glass captures are also identical; the visible banding reproduced in WebKit. - `git diff --check` passed. The browser checks use production `GlassBackdrop`/`ChatBackground` components and the production stylesheet in a controlled header scene, with seeded wallpaper state. These are not full native-app or cross-OS captures. ### Before / after (Studio built from the merge base and from this branch) Dark theme, Liquid Glass, no background image, `/chat` header region in Playwright WebKit. The lower row stretches contrast 40x so the 1-level steps are visible. Before: the column through the chat header alternates RGB 24/23 in 11 runs over the 150px fade. After: uniform RGB 24. The fade's `::after` computes to `content: none` on the plain Glass backdrop in both WebKit and Chromium; the Chromium capture is pixel-identical before and after, since Chromium dithers the gradient.  --------- Co-authored-by: Daniel Han <[email protected]>
Two rendering defects with Glass on (Liquid Glass / Liquid Glass 3D).
Diagonal stripes on glass surfaces (macOS and Linux apps, Safari, Firefox). The liquid sheen fades about 2% of white out across half the surface. WebKit and Firefox do not dither gradients, so each 8-bit step draws as a wide diagonal stripe. In dark theme that is five bands across the Settings dialog, and the same on the sidebar, the composer and the browser toolbar. Chromium dithers the same gradient into a fine pixel pattern, so Windows and Chrome/Edge do not show it. The sheen is now off on WebKit (
data-glass-layers) and on Firefox (@supports (-moz-appearance: none)); the rims and the short edge glows are unchanged, and Chromium keeps the sheen.Rings around the welcome greeting with Glass on and no image (reported on macOS). The greeting sits on a soft elliptical halo that darkens a background image behind the text. Glass with no image draws a plain backdrop in the page colour, so the halo is the same colour as what it covers: it changes nothing, and blending it rounds a step dark in places, which draws concentric rings. The halo is now drawn only where the wallpaper is an image (
data-wallpaper-image).Black strip across the top of the browser pane (Linux app). On the WebKitGTK path that drops live blur and uses dense fills (#16957, #17327), the side panes took a fully opaque fill. The browser's tab strip is its own layer (
z-40), and WebKitGTK paints that opaque layer black when the pane opens, hiding the tabs until something restyles it. A fill just under opaque, or noz-index, draws correctly. The side panes now use the same 96% cap the sidebar already uses. This change is limited tohtml[data-glass][data-glass-cpu].Validation:
index.cssonto a test page (dark Liquid Glass 3D, a plain surface and a composer surface): Firefox renders both flat after the change, Chromium still renders the sheen.tests/welcome-halo-image-only.test.ts.z-index: autodrew correctly.tests/glass-webkit-blur.test.tsupdated for the pane fill and extended to pin both sheen overrides; full frontend suite passes.Not checked: macOS itself (the stripes and the rings there were reported by macOS users; I have no Mac to confirm either fix on), Studio's own UI in Firefox (only the test page above), light theme, a wallpaper image, and pages other than chat and Settings.