From 8fbee4334ffedc166e89d396e33455686637af51 Mon Sep 17 00:00:00 2001 From: Serhii Savenko Date: Mon, 26 Oct 2026 19:00:15 +0200 Subject: [PATCH] fix(appearance): make match-terminal sidebar text inherit the terminal foreground (#29157) Match Terminal only redefined --foreground on the sidebar surfaces, but inherited text color comes from body's already-computed color, so labels without their own color class (e.g. project names) stayed the app foreground. Set color directly on the surface as well. Fixes #29151 Co-authored-by: Neil --- src/renderer/src/components/sidebar/Sidebar.test.tsx | 6 ++++-- src/renderer/src/lib/left-sidebar-appearance.ts | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/components/sidebar/Sidebar.test.tsx b/src/renderer/src/components/sidebar/Sidebar.test.tsx index d9e1edb2d87..356b420b76c 100644 --- a/src/renderer/src/components/sidebar/Sidebar.test.tsx +++ b/src/renderer/src/components/sidebar/Sidebar.test.tsx @@ -166,9 +166,11 @@ describe('Sidebar', () => { }) const markup = renderSidebar() + const sidebarRootTag = markup.slice(0, markup.indexOf('>')) - expect(markup).toContain('--worktree-sidebar:#101820') - expect(markup).toContain('--worktree-sidebar-foreground:#f0f4f8') + expect(sidebarRootTag).toContain('--worktree-sidebar:#101820') + expect(sidebarRootTag).toContain('--worktree-sidebar-foreground:#f0f4f8') + expect(sidebarRootTag).toMatch(/[;"]color:#f0f4f8/) expect(markup).toContain('data-testid="workspace-kanban-drawer"') expect(markup.match(/--worktree-sidebar:#101820/g)).toHaveLength(2) }) diff --git a/src/renderer/src/lib/left-sidebar-appearance.ts b/src/renderer/src/lib/left-sidebar-appearance.ts index ba56ecde136..56771c47ea3 100644 --- a/src/renderer/src/lib/left-sidebar-appearance.ts +++ b/src/renderer/src/lib/left-sidebar-appearance.ts @@ -74,6 +74,7 @@ function buildSurfaceVariables(args: { if (overrideTextTokens) { vars['--background'] = background vars['--foreground'] = foreground + vars.color = foreground vars['--card'] = `color-mix(in srgb, ${foreground} 4%, ${background})` vars['--card-foreground'] = foreground vars['--accent'] = `color-mix(in srgb, ${foreground} 9%, ${background})`