Repository navigation
Fix header gradient banding on plain glass backgrounds - #17403
Merged
danielhanchen merged 2 commits intoNov 12, 2026
Merged
Conversation
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. |
Member
|
@codex review |
1 similar comment
Member
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! 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". |
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Nov 12, 2026
danielhanchen
added a commit
that referenced
this pull request
Nov 15, 2026
With glass off, the 24px header fade under the model selector is drawn over a flat page. Over a flat page every engine rounds some of its gradient pixels one level off the page colour, which shows as a faint line or band below the header. The chat and compare-pane header fades now stay hidden until their own thread scrolls under the header, and fade back out at the top. With nothing scrolled beneath them there is nothing to fade, so the page is exactly flat in every engine. Once content scrolls under the header, the fade softens it as before. The fades keep Tailwind's default Oklab interpolation; switching them to sRGB makes WebKit band. A capture-phase scroll listener on each fade's parent toggles `data-thread-scrolled` on the DOM directly, so scrolling causes no React re-render. Only the thread viewport sets it; code blocks and the full-view dock thread are ignored. The separate plain-glass wallpaper fix is already on main in #17403. ### Measurements Live Studio `/chat` page built from the merge base and from this branch, 1600 x 350, dark theme, glass off, empty chat. Count = pixels inside the fade that differ from the page colour (24, 24, 24): | Engine | DPR | main | this PR | fade opacity at rest / scrolled / back at top | |--------|-----|------|---------|-----------------------------------------------| | Chromium | 1 | 0 / 31440 | 0 / 31440 | 0 / 1 / 0 | | Chromium | 2 | 0 / 125760 | 0 / 125760 | 0 / 1 / 0 | | WebKit | 1 | 0 / 31440 | 0 / 31440 | 0 / 1 / 0 | | WebKit | 2 | 0 / 125760 | 0 / 125760 | 0 / 1 / 0 | | Firefox | 1 | 17030 / 31440 | 0 / 31440 | 0 / 1 / 0 | | Firefox | 2 | 62880 / 125760 | 0 / 125760 | 0 / 1 / 0 | On main the fade's opacity is 1 in every state. The first version of this branch (sRGB fades) left Chromium unchanged and made WebKit band at DPR 1 (0 to 19650 of 31440 pixels); a bare gradient sweep also showed WebKit sRGB banding in 15 of 20 offset, theme and DPR cells, where Oklab was flat in all 20.  ### Tests `tests/chat-header-fade-scroll-gate.test.ts` covers the flag following the thread viewport's scrollTop in the capture phase, other scrollers and the dock leaving it alone, the hidden-by-default CSS gate on a direct parent, and both fade parents carrying the tracker with Oklab kept. The frontend suite (15939 passed, 0 failed) and the production build pass. --------- Co-authored-by: Daniel Han <[email protected]>
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.
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 #17380 and does not change greeting or Settings styling.Validation:
npm run buildand 60 existing tests across the glass, greeting halo, window material, and composer outline suites passed.git diff --checkpassed.The browser checks use production
GlassBackdrop/ChatBackgroundcomponents 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,
/chatheader 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::aftercomputes tocontent: noneon the plain Glass backdrop in both WebKit and Chromium; the Chromium capture is pixel-identical before and after, since Chromium dithers the gradient.