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 <neil@stably.ai>
This commit is contained in:
Serhii Savenko
2026-10-26 10:00:15 -07:00
committed by GitHub
co-authored by Neil
parent d4500b486d
commit 8fbee4334f
2 changed files with 5 additions and 2 deletions
@@ -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)
})
@@ -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})`