fix(ui): track List header surface via --list-surface#954
Conversation
In dark mode the Cmd+P command palette painted its "Suggested / Navigation / Panels" section headers as near-black (#1a1917) bands against the warm-grey (#2d2a27) palette body. Root cause: list.css hardcodes the sticky group header background to --surface-base. The List is reused inside popovers (picker, command palette, dialogs) that sit on --surface-raised, so each consumer has to override the header background. The command palette's override was both lower specificity (0,2,0 vs list.css's 0,4,0 chain) and imported before list.css, so it lost twice and the header fell through to the darker base surface. Light mode hid the bug because base and raised are both #ffffff there. Fix the seam instead of escalating the selector war: the List header now reads an inherited custom property, background: var(--list-surface, var(--surface-base)) (default unchanged for page lists). Raised-surface hosts declare --list-surface once on their container, so the header tracks them by inheritance with no specificity or import-order fragility: - command-palette.css: set --list-surface on palette-content; drop the dead background override on the header. - picker.css: set --list-surface on picker-content; drop its now- redundant background override (keeps the static-position override). - dialog.css: set --list-surface on dialog-content, fixing the same black-band twin in grouped dialogs (connect-provider, open-project). Verification: - New snap packages/app/e2e/snap/command-palette-header.snap.ts asserts the dark header background equals --surface-raised (red before fix: rgb(26,25,23); green after: rgb(45,42,39)); light + dark grid checked. - model-picker-header snap stays green (picker change is safe). - Dialog twin confirmed fixed via a throwaway probe through the open-project dialog (header rgb(45,42,39) in dark). - typecheck: 8/8 packages pass.
|
Warning Review limit reached
More reviews will be available in 15 minutes and 1 second. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a dynamic mechanism to set the background surface of nested list sticky headers using a new --list-surface CSS custom property, defaulting to --surface-base. This resolves dark mode visual issues where headers appeared as dark bands in popovers, dialogs, and pickers that use --surface-raised. A new E2E test is also added to prevent regressions. The feedback suggests a more robust and simplified way to resolve the CSS variable in the E2E test by directly assigning the var() function to the probe element's style.
Per review: let the browser resolve var(--surface-raised) on the probe element instead of copying the raw value off documentElement. Same result, two lines shorter, robust to where the token is defined.
Perf delta summaryComparator: pass
|
Bump PawWork desktop release version to 2026.5.28. Changes since v2026.5.27: - feat(ui): fold reasoning into trow block (#948) - feat: align outbound HTTP headers with canonical OpenCode desktop (#940) - feat(app): collapse notification settings to single tri-state control (#938) - fix(ui): track List header surface via --list-surface (#954) - fix(ui): render tooltip shortcut hints as plain sans glyphs (#955) - fix(watcher): isolate macOS workspace roots - fix(session): terminalize stale question blockers - fix(session): unify transport error classification for stream disconnect recovery (#941) - test: add route inventory guardrails - ci: repair electron desktop build + install
Summary
In dark mode the Cmd+P command palette painted its "Suggested / Navigation / Panels" section headers as near-black (
#1a1917) bands against the warm-grey (#2d2a27) palette body. The List component now lets its host surface drive the sticky group-header background through an inherited--list-surfacecustom property, so the same fix also clears the identical twin in grouped dialogs.Why
list.csshardcoded the sticky group-header background to--surface-base. The List is reused inside popovers (picker, command palette, dialogs) that sit on--surface-raised, so every consumer had to override the header background. The command palette's override was both lower specificity (0,2,0vs list.css's0,4,0chain) and imported beforelist.css, so it lost twice and the header fell through to the darker base surface. Light mode hid it because base and raised are both#ffffffthere.Escalating the selector to win the cascade war is fragile (the next consumer hits the same wall). Instead this parameterizes the seam: the header reads
var(--list-surface, var(--surface-base))(default unchanged for page lists), and raised-surface hosts declare--list-surfaceonce on their container. Inheritance has no specificity or import-order pitfalls.command-palette.css: set--list-surfaceonpalette-content; drop the dead background override.picker.css: set--list-surfaceonpicker-content; drop its now-redundant background override (keeps the static-position override).dialog.css: set--list-surfaceondialog-content, fixing the same black-band twin in grouped dialogs (connect-provider, open-project), found by scope-blast.Related Issue
No issue; reported directly. Scope-blast extension to dialogs confirmed with the requester before including.
Human Review Status
Pending
Review Focus
The
--list-surfacecontract inlist.cssand that each raised-surface host sets it. Page-level and sidebar lists set nothing and keep--surface-base(unchanged).picker.csskeeps its0,4,0rule only forposition: static.Risk Notes
Low. Touches a shared component (
list.css), but the default fallback preserves existing page-list behavior; only popover/dialog hosts opt in. No platform/packaging surface touched.How To Verify
Screenshots or Recordings
Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.