Skip to content

fix(appearance): sidebar appearance reaches the right panel and tab bar - #31166

Closed
thomas-seres wants to merge 3 commits into
stablyai:mainfrom
thomas-seres:fix/chrome-appearance-right-sidebar-tabs
Closed

thomas-seres wants to merge 3 commits into
stablyai:mainfrom
thomas-seres:fix/chrome-appearance-right-sidebar-tabs

Conversation

@thomas-seres

@thomas-seres thomas-seres commented Oct 20, 2026 •

Copy link
Copy Markdown

ELI5

When you set the sidebar to "Match Terminal" or "Tinted", only the left sidebar changed color. The tab bar at the top and the panel on the right stayed the default gray, so the window looked like two different themes stitched together. Now the whole frame around your terminal uses the same colors.

What Changed

Before: with Settings → Appearance → Left Sidebar Appearance set to Match Terminal or Tinted, the left sidebar took the terminal or tint colors. The tab strip, the titlebar and the right sidebar (files, source control, checks…) kept the stock theme colors.

After: the tab strip (and the thin drag strip above it), the full-width titlebar and the right sidebar follow the same setting. Default mode looks exactly as before.

Mechanism: the setting works by putting CSS color variables on specific elements (inline style), not on the whole page. Until now those variables were only set on the left column. This PR:

  • adds useChromeAppearanceStyle (src/renderer/src/hooks/use-chrome-appearance-style.ts), which wraps the existing resolveLeftSidebarStyleVariables. The left sidebar and the app shell layout already had their own copies of this logic; both now use the hook.
  • applies those variables to the right sidebar root, the tab strip, the drag strip and the titlebars.
  • in Tinted mode, also sets --card. Tab strips and titlebars paint with --card, which Tinted didn't override before, so they stayed untinted.
  • renames the setting label to "Sidebar & Panel Appearance" in all 6 locales and adds "tabs" and "panel" search keywords. The stored setting key (leftSidebarAppearanceMode) is unchanged, so existing preferences carry over.

Why

The variables stay on the chrome elements only and are not set on <html>. Setting them globally would also recolor editor content, markdown previews, dialogs and other surfaces that are meant to keep the app theme. Reusing the existing resolver also means each mode keeps a single definition. The hook picks only the settings fields it reads, so unrelated settings changes don't re-render every tab strip.

Not in scope: the status bar, popovers and dialogs (these already don't follow the setting on the left side either), and plugin panels.

Linked Issue

Fixes #31165

Visual Proof

Mode Before After
Match Terminal before-match-terminal after-match-terminal
Match Terminal, collapsed sidebar before-collapsed-match-terminal after-collapsed-match-terminal
Tinted before-tinted after-tinted
Default (unchanged) before-default after-default

Testing

  • I manually tested these changes locally (macOS; app launched hidden via the Playwright Electron harness, screenshots captured over CDP in Default, Match Terminal and Tinted)
  • Automated tests added/updated, or explained why not below
    • New use-chrome-appearance-style.test.tsx: default → no override; Match Terminal → terminal-derived --sidebar/--card/--border; Tinted → tinted --card; the style object stays stable across unrelated settings writes.
    • AppearancePane.test.tsx: the setting can now be found by searching "tab bar".
    • TabGroupSplitLayout.test.ts: mocks the new hook (that test calls the component as a plain function).
  • pnpm lint, pnpm tc, pnpm run check:code-quality:changed, the e2e app build, and the settings / tab-group / sidebar / right-sidebar / app-shell test suites pass locally.

AI Disclosure

Implemented with Claude Code (Claude Opus 5.5), then reviewed and verified by me.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Renderer-only styling change: no IPC, wire-format or persisted-settings change. SSH/remote, Windows, Linux and mobile are unaffected beyond the shared colors, and there are no path or shortcut changes.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ccb7365a-d44b-4db7-9675-877e0da551b8
📥 Commits

Reviewing files that changed from the base of the PR and between 8db6377ad54957894ad1e7c46dc17908e232b54f and 47e71091b16b05678f4f72e105af97c7c7f05d60.

📒 Files selected for processing: 7
  • src/renderer/src/components/settings/LeftSidebarAppearanceSetting.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
🚧 Files skipped from review as they are similar to previous changes: 7
  • src/renderer/src/components/settings/LeftSidebarAppearanceSetting.tsx
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/ja.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

A shared useChromeAppearanceStyle hook now resolves appearance styles for app chrome surfaces. Titlebars, window controls, sidebars, the tab strip, and the terminal focus-release surface apply the style. Tinted surface variables now include a computed card color. Appearance-setting labels, descriptions, search terms, tests, and translations cover sidebars, the tab bar, and the side panel.

Priority: Normal

Merge Risk: Minimal · up to 47e71

The collapsed header now matches the themed tab strip, and the appearance setting remains searchable in Korean. No outstanding issue identified here prevents merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 45.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 14 files. (6 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: extending sidebar appearance to the right panel and tab bar.
Description check Passed The description is complete and aligned with the template. It explains the user impact, implementation, rationale, linked issue, visual proof, testing, scope, AI disclosure, and checklist status.
Linked Issues check Passed Issue #31165 requires Match Terminal and Tinted modes to style the app chrome around the terminal, including both sidebars, the tab bar, and titlebars. useChromeAppearanceStyle reuses `resolveLeftSi…
Out of Scope Changes check Passed The changes remain within issue #31165. The hook removes duplicate appearance-resolution logic. The --card addition supports the required tinted chrome surfaces. Updated labels, descriptions, search…
Full details: Linked Issues check

Explanation

Issue #31165 requires Match Terminal and Tinted modes to style the app chrome around the terminal, including both sidebars, the tab bar, and titlebars. useChromeAppearanceStyle reuses resolveLeftSidebarStyleVariables and scopes the variables to the chrome elements. The hook is applied to the sidebars, tab strip, drag strip, titlebars, and window controls. Tinted mode now defines --card, which supports the tab and titlebar surfaces. The stored setting key remains unchanged. Tests cover resolver output, memoization, settings search, and affected layout behavior.

Full details: Out of Scope Changes check

Explanation

The changes remain within issue #31165. The hook removes duplicate appearance-resolution logic. The --card addition supports the required tinted chrome surfaces. Updated labels, descriptions, search keywords, and locale strings describe the expanded setting scope. The added and updated tests support the implementation. No unrelated IPC, persistence, path, shortcut, status-bar, dialog, popover, or plugin-panel changes are shown.

Full details: Docstring Coverage

Explanation

Docstring coverage is 45.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 14 files. (6 skipped: 6 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Style the floating header when the sidebar is collapsed. · AppWorkspaceShell.tsx:141

src/renderer/src/app-shell/AppWorkspaceShell.tsx:141
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Style the floating header when the sidebar is collapsed.

When a workspace is active and sidebarOpen is false, the floating .titlebar-left receives no appearance variables. Its stock background remains visible beside the newly tinted tab strip. Apply the chrome style to the floating header too; keep its existing width condition. The layout permits this floating-header state, and the header background falls back to the stock --card. (raw.githubusercontent.com)


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f380fc77-951d-46a3-b6ef-9b49fe89c996
📥 Commits

Reviewing files that changed from the base of the PR and between 98e7dbe and 2b397b56e819d85b9197cd5afc68a8eb5d8a6471.

📒 Files selected for processing: 19
  • src/renderer/src/app-shell/AppWorkspaceShell.tsx
  • src/renderer/src/app-shell/use-app-chrome-layout.ts
  • src/renderer/src/components/right-sidebar/index.tsx
  • src/renderer/src/components/settings/AppearancePane.test.tsx
  • src/renderer/src/components/settings/LeftSidebarAppearanceSetting.tsx
  • src/renderer/src/components/settings/appearance-sidebar-search.ts
  • src/renderer/src/components/sidebar/index.tsx
  • src/renderer/src/components/tab-group/TabGroupPanel.tsx
  • src/renderer/src/components/tab-group/TabGroupSplitLayout.test.ts
  • src/renderer/src/components/tab-group/TabGroupSplitLayout.tsx
  • src/renderer/src/hooks/use-chrome-appearance-style.test.tsx
  • src/renderer/src/hooks/use-chrome-appearance-style.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/left-sidebar-appearance.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@thomas-seres

Copy link
Copy Markdown
Author

Addressed the outside-diff note in 8db6377ad5: the floating .titlebar-left (collapsed sidebar) now gets the appearance vars too, while keeping its width only when the sidebar is open. It paints with --card, so it now matches the themed tab strip it sits on.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Update the tint-strength description across all locales. · LeftSidebarAppearanceSetting.tsx:39-68

src/renderer/src/components/settings/LeftSidebarAppearanceSetting.tsx:39-68
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Update the tint-strength description across all locales.

Tinted applies the tint to the sidebars, tab strip, titlebars, and side panel, but this description still says the tint applies only to the sidebar. Update the fallback and all six locale entries so users see the correct scope.

Suggested fix
- 'Controls how strongly the tint is mixed into the sidebar.'
+ 'Controls how strongly the tint is mixed into the sidebars, tab bar, titlebars, and side panel.'

Apply equivalent localized wording in en.json, es.json, fr.json, ja.json, ko.json, and zh.json.


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 49206bf5-d3be-4707-a478-42fe9f3cd46f
📥 Commits

Reviewing files that changed from the base of the PR and between 2b397b56e819d85b9197cd5afc68a8eb5d8a6471 and 8db6377ad54957894ad1e7c46dc17908e232b54f.

📒 Files selected for processing: 2
  • src/renderer/src/app-shell/AppWorkspaceShell.tsx
  • src/renderer/src/app-shell/WindowControls.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@thomas-seres

Copy link
Copy Markdown
Author

Addressed the outside-diff tint-strength note in 47e71091b1: the description now reads "Controls how strongly the tint is mixed into the sidebar, tab bar, and side panel surfaces." — matching the tint-color description — in the fallback and all six locales.

Match Terminal and Tinted only styled the left column, so the tab strip,
titlebars and right sidebar kept stock tokens. Share the scoped vars via
useChromeAppearanceStyle, tint --card in tinted mode, and rename the
setting to Sidebar & Panel Appearance.
The collapsed-sidebar header floats over the now-themed tab strip and the
Windows/Linux window controls overlay themed chrome; both read stock tokens
until now.
@thomas-seres
thomas-seres force-pushed the fix/chrome-appearance-right-sidebar-tabs branch from 47e7109 to 1e7329c Compare October 24, 2026 15:30
@thomas-seres

Copy link
Copy Markdown
Author

Rebased on latest main (single import conflict in TabGroupPanel.tsx, resolved).
CodeRabbit's notes are addressed in 3025a0c and 1e7329c.
pnpm tc, the affected test suites and the changed-code quality gate pass locally.

CI hasn't run yet: the fork workflows are waiting for approval.
@nwparker @OrcaWin could one of you approve the workflow run?
@brennanb2025 the locale change is just the renamed setting label + 2 search keywords.

@nwparker

nwparker commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Closing as superseded by #36567: Match Terminal is now a full app theme that colors the whole window and keeps low-contrast terminal palettes legible. Thank you for this PR, it shaped the design.

@nwparker nwparker closed this Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Sidebar appearance (Match Terminal / Tinted) doesn't reach the tab bar and right sidebar

2 participants