Remove -webkit-backdrop-filter declarations so blur survives minification - #4362
Merged
Conversation
…tion Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
shaunandrews
requested review from
bcotrim and
sejas
and removed request for
bcotrim
July 27, 2026 19:37
Collaborator
📊 Performance Test ResultsComparing 8627e64 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
sejas
approved these changes
Jul 28, 2026
sejas
left a comment
Member
There was a problem hiding this comment.
Development mode show the blur effect for trunk and also this branch. The fallback is not necessary as electron uses chromium. This change LGTM ! Thanks Shaun!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
How AI was used in this PR
Claude diagnosed the bug from a user report and wrote the change. The investigation ran down several wrong paths first — GPU compositing, accessibility settings, a stale bundle — all of which were ruled out before the build output was inspected directly. The conclusion is backed by reading the emitted CSS before and after, not by reasoning alone. Full trail is on STU-2132.
Proposed Changes
None of the blur effects in the agentic UI have rendered in packaged builds since 29 June. The composer, the site pill, the header and composer edge fades, the suggested-prompt frost, and the Studio Code copy button all draw as flat transparent surfaces, so content behind them shows straight through and overlapping text becomes hard to read. This restores them.
The cause was a hand-written vendor prefix. Vite 8's CSS minifier treats
backdrop-filterand-webkit-backdrop-filteras the same property and collapses the pair, keeping whichever is declared last. Chromium does not implement the-webkit-spelling — it is Safari-only — so every rule that declared the prefixed line second shipped a property Chromium discards.The minifier already emits the
-webkit-prefix on its own, correctly ordered, based on the build target. Our manual declarations were not adding a fallback; they were overwriting the minifier's correct output with a broken one. Removing them lets it do its job, and the emitted CSS now carries both spellings with the standard property last.Nothing changes in development. The dev server does not minify, so both declarations always survived there and Chromium used the standard one — which is why this was invisible to everyone working locally and only ever appeared in nightly and release artifacts.
One file,
apps/ui/src/components/copy-button/style.module.css, happened to declare the two lines in the opposite order and was never broken. Its prefix is removed too, so the pattern is consistent and nobody re-introduces the bug by copying a neighbouring file.Testing Instructions
This cannot be verified with
npm start— the bug only exists in minified output.cd apps/ui && npx vite buildgrep -o '\._layer_[a-z0-9]*_20{[^}]*}' dist/assets/index-*.cssbackdrop-filter:blur(var(--progressive-blur-radius))after the-webkit-one. On trunk the unprefixed declaration is absent entirely.For a visual check, package a build (
npm run make) or install a nightly built from this branch, then confirm:Follow-ups
Not included here, deliberately:
-webkit-fallback in the natural order. A lint rule banning-webkit-backdrop-filter, or a post-build assertion that the emitted CSS still contains the unprefixed property, would close that door. Worth doing separately.prefers-reduced-transparencyentirely. During triage the header edge appeared to still work — that turned out to beProgressiveBlur'sfadeToSurfacegradient, the only thing in the app that degraded gracefully.Pre-merge Checklist