You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(appearance): changed divider colors also paint workspace splits - #37342
Settings → Appearance → Dark/Light Divider Color says it controls "the split divider line between panes", but it only painted splits inside a terminal tab. The workspace tab-group split (terminal | editor, stacked groups) always used the --split-divider token.
Now, when a divider color is changed from its default, the tab-group split uses it too. At the default nothing changes.
How "changed" is detected: the stored value is compared (case-insensitively) with the shipped default (#3f3f46 dark / #d4d4d8 light). No new setting, schema change or migration.
Precedence: user setting → theme token --split-divider → built-in 3:1 color. useSplitDividerSetting sets --split-divider-setting on :root only when the color differs from its default and is a valid CSS color. Otherwise it removes the property. The split reads var(--split-divider-setting, var(--split-divider)), so a plugin theme's inline --split-divider still wins over the built-in color.
Which slot (dark or light): the same one the terminal panes use (selectTerminalTheme(...).useLightVariant). With "Use separate light theme" off, Settings shows only the dark field and the panes use it, so the split follows it too.
Builds on #14893 by @mmarabel. That PR added separate tab-group divider settings; this version reuses the existing divider settings instead, with no new keys.
Dark divider set to #ef4444, light divider set to #2563eb. The "before" shots come from the same profile running origin/main's code.
Before (main)
After
Dark
(screenshot removed: contained real product data)
(screenshot removed: contained real product data)
Light
(screenshot removed: contained real product data)
(screenshot removed: contained real product data)
At the default settings the computed split color is unchanged: rgb(113,113,122) dark and rgb(134,134,144) light, both before and after. --split-divider-setting is not set.
(screenshot removed: contained real product data)
Merge-risk assessment: Low
Renderer only: about 30 lines, plus one CSS var() fallback.
No settings keys, IPC or schema changes. Mixed client/server versions are unaffected because settings stay local to the renderer.
At the default the property is never set, so rendering is byte-identical to main.
Invalid stored values fail CSS.supports('color', …) and fall back to the theme or built-in color.
Mobile has no tab-group splits, and folder workspaces are unaffected.
Negative user-facing tradeoffs
Users who changed their divider color long ago (for example a near-black #171717) will now see that color on the workspace split as well. It may have less contrast on --card than the built-in 3:1 default. This is what [Feature]: Make the workspace tab-group split divider color configurable #14887 asks for, and resetting the setting restores the default.
Choosing a color that equals the default exactly is treated as "unchanged", so the split keeps the built-in or theme color.
Hover and drag still use --split-divider-hover. A custom divider color does not tint the hover state.
With "Use separate light theme" off, a custom dark divider color also paints the split in light mode, matching what the terminal panes do.
Validation
pnpm tc:web passes. oxlint and oxfmt pass on the changed files. pnpm test src/renderer/src/app-shell/use-document-appearance.test.tsx src/renderer/src/lib/terminal-theme.test.ts passes (26 tests).
Real app: dev build launched in the background (ORCA_BACKGROUND_LAUNCH=1) with a throwaway userData and HOME, driven over CDP. Checked computed ::after colors of .tab-group-split-resize-handle:
Dark with a custom color shows the custom color. Light with a custom color shows the custom color.
Light with "separate light theme" off uses the dark custom color, the same as the panes.
Default values set nothing, both before and after. Uppercase defaults (#3F3F46) also set nothing.
A non-color value sets nothing.
Inline theme --split-divider with the setting at default: the theme color shows. With a custom setting: the setting wins.
Review: one Opus sub-agent and Codex (gpt-6.1-sol, xhigh). Both flagged choosing the slot from the app mode instead of the terminal slot; fixed. Codex also flagged lowercasing breaking a case-sensitive var(--X) value; fixed (the value is lowercased only for the default comparison).
Perf
Scanned with the perf-scan skill: the diff and the useDocumentAppearance subscriber path.
Two primitive zustand selectors with O(1) work, selectTerminalTheme being a few string comparisons, plus one effect keyed on [color, light].
Measured over CDP with the dev build: 50 unrelated settings writes caused 0 effect runs (counted setProperty/removeProperty calls for --split-divider-setting) and 0 style recalcs. Changing the divider color caused 1 effect run and about 16 style recalcs totalling about 7 ms. Main also repaints the terminal panes on that same change, and it is a user-driven settings action.
No cost at the default: no inline property is set, and the CSS change only adds a fallback.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Walkthrough
The appearance hook now applies the terminal divider color setting to the workspace split divider. The hook sets a document-level CSS property when the selected color is supported, nonblank, and different from the variant default. The divider uses that property when present and otherwise uses its existing CSS token. The light divider default is now exported.
Merge Risk: Minimal · previous review df77a
The workspace divider setting is appropriately applied without an identified merge-blocking risk.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly identifies the appearance fix and the application of changed divider colors to workspace splits.
Description check
The description is detailed and covers the user impact, implementation, issue link, visual proof, validation, performance, compatibility, and risk. It uses different headings from the template and omi…
Linked Issues check
[#14887] The Expected section requires a user-facing dark and light divider color control that covers the workspace tab-group split (.tab-group-split-resize-handle), with a suitable default. The diff …
Out of Scope Changes check
The whole-PR diff against the merge base changes four renderer files, and each change supports the divider-color objective of #14887: - main.css: adds the --split-divider-setting fallback on the tab-g…
Full details: Description check
Explanation
The description is detailed and covers the user impact, implementation, issue link, visual proof, validation, performance, compatibility, and risk. It uses different headings from the template and omits some checklist sections, but the required decision-making information is present.
Full details: Linked Issues check
Explanation
[#14887] The Expected section requires a user-facing dark and light divider color control that covers the workspace tab-group split (.tab-group-split-resize-handle), with a suitable default. The diff meets this:
src/renderer/src/assets/main.css: the handle background changes from var(--split-divider) to var(--split-divider-setting, var(--split-divider)). The built-in token stays the fallback.
src/renderer/src/hooks/use-split-divider-setting.ts (new): selects terminalDividerColorDark or terminalDividerColorLight by the terminal theme variant. It sets --split-divider-setting on the document root only when the trimmed value differs from the shipped default (case-insensitive), passes CSS.supports('color', value), and is not empty. Otherwise it removes the property. The default therefore keeps the existing #71717a / #868690 workspace color.
src/renderer/src/app-shell/use-document-appearance.ts: calls useSplitDividerSetting() so the hook runs in the app-wide appearance path.
src/renderer/src/lib/terminal-theme.ts: exports DEFAULT_TERMINAL_DIVIDER_LIGHT for the comparison.
The issue warns against binding the terminal keys as the workspace default. The PR does not do that. It uses the terminal keys only as an override when the value differs from the default.
Deviations from the issue's suggested approach (not stated requirements): the PR reuses the existing terminal divider settings instead of adding tab-group settings, adds no Window & Sidebar UI, and does not add a stronger hover/drag variant. Hover and drag still use --split-divider-hover. The issue labels the approach 'Suggested approach (small)'. The PR description and linked-issue objectives both state this difference. The Expected behavior is met.
No automated test was added for the new hook. The issue does not require one. The author reports CDP checks and existing test runs.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff against the merge base changes four renderer files, and each change supports the divider-color objective of #14887:
main.css: adds the --split-divider-setting fallback on the tab-group split handle. This is the consuming side of the objective.
use-split-divider-setting.ts: new hook that maps the stored setting to a CSS custom property. This is the core of the change.
use-document-appearance.ts: adds one hook call so the property is applied app-wide.
terminal-theme.ts: exports an existing constant used by the new hook's default comparison.
The PR adds no settings keys, IPC, schema, or migration changes. It touches no unrelated code paths. The PR description notes that the terminal pane rendering is unchanged at the default.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 3 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
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
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.
Summary
Settings → Appearance → Dark/Light Divider Color says it controls "the split divider line between panes", but it only painted splits inside a terminal tab. The workspace tab-group split (terminal | editor, stacked groups) always used the
--split-dividertoken.Now, when a divider color is changed from its default, the tab-group split uses it too. At the default nothing changes.
How "changed" is detected: the stored value is compared (case-insensitively) with the shipped default (
#3f3f46dark /#d4d4d8light). No new setting, schema change or migration.Precedence: user setting → theme token
--split-divider→ built-in 3:1 color.useSplitDividerSettingsets--split-divider-settingon:rootonly when the color differs from its default and is a valid CSS color. Otherwise it removes the property. The split readsvar(--split-divider-setting, var(--split-divider)), so a plugin theme's inline--split-dividerstill wins over the built-in color.Which slot (dark or light): the same one the terminal panes use (
selectTerminalTheme(...).useLightVariant). With "Use separate light theme" off, Settings shows only the dark field and the panes use it, so the split follows it too.Builds on #14893 by @mmarabel. That PR added separate tab-group divider settings; this version reuses the existing divider settings instead, with no new keys.
Closes #14887
Visual proof
Dark divider set to
#ef4444, light divider set to#2563eb. The "before" shots come from the same profile running origin/main's code.At the default settings the computed split color is unchanged:
rgb(113,113,122)dark andrgb(134,134,144)light, both before and after.--split-divider-settingis not set.(screenshot removed: contained real product data)
Merge-risk assessment: Low
var()fallback.CSS.supports('color', …)and fall back to the theme or built-in color.Negative user-facing tradeoffs
#171717) will now see that color on the workspace split as well. It may have less contrast on--cardthan the built-in 3:1 default. This is what [Feature]: Make the workspace tab-group split divider color configurable #14887 asks for, and resetting the setting restores the default.--split-divider-hover. A custom divider color does not tint the hover state.Validation
pnpm tc:webpasses.oxlintandoxfmtpass on the changed files.pnpm test src/renderer/src/app-shell/use-document-appearance.test.tsx src/renderer/src/lib/terminal-theme.test.tspasses (26 tests).ORCA_BACKGROUND_LAUNCH=1) with a throwaway userData and HOME, driven over CDP. Checked computed::aftercolors of.tab-group-split-resize-handle:#3F3F46) also set nothing.--split-dividerwith the setting at default: the theme color shows. With a custom setting: the setting wins.gpt-6.1-sol, xhigh). Both flagged choosing the slot from the app mode instead of the terminal slot; fixed. Codex also flagged lowercasing breaking a case-sensitivevar(--X)value; fixed (the value is lowercased only for the default comparison).Perf
Scanned with the perf-scan skill: the diff and the
useDocumentAppearancesubscriber path.selectTerminalThemebeing a few string comparisons, plus one effect keyed on[color, light].setProperty/removePropertycalls for--split-divider-setting) and 0 style recalcs. Changing the divider color caused 1 effect run and about 16 style recalcs totalling about 7 ms. Main also repaints the terminal panes on that same change, and it is a user-driven settings action.