VS Code extension: Sessions view ignores sideBar.foreground, so its text is unreadable when the sidebar and editor backgrounds differ

Open Beginner friendly
#113,738 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript, vscode
Domain
frontend

Research direction

Inspect the Sessions view CSS described in the issue, especially .title_* and the --app-primary-foreground token, and find where the Local/Cloud switch gets its colors. Compare those styles with the existing --vscode-sideBar-background usage. Done when Sessions text and switch colors follow sidebar theme colors, with a fallback to the general foreground, while chat text remains readable.

Written by the indexing model from the issue text.

Description

area:ide bug has repro platform:macos platform:vscode

Versions: Claude Code VS Code extension 2.1.334 (darwin-arm64), VS Code 1.149, macOS. New look.

Problem

The Sessions view in the side bar colors its text with the general foreground theme color, not sideBar.foreground. The chat uses the same foreground color. So when a theme gives the side bar a background very different from the editor's, one of the two is always unreadable:

  • With foreground dark, the chat is readable but session names and other Sessions text are dark on the dark side bar.
  • With foreground light, the Sessions view is readable but the chat text is light on the light editor background.

No setting lets the user fix both, because the extension doesn't read any side-bar-specific text color. VS Code's own views (Explorer, Search) follow sideBar.foreground correctly in the same setup.

Steps to reproduce

  1. Use a light theme (for example Light Modern) with these settings:

    "workbench.colorCustomizations": {
        "sideBar.background": "#252A31",
        "sideBar.foreground": "#F6F7F9"
    }
    
  2. Open Claude Code's Sessions view in the side bar.

Expected: Sessions text uses sideBar.foreground (#F6F7F9) and is readable, like the Explorer.

Actual: Sessions text stays the theme's general foreground (#616161), dark on dark. The Local/Cloud switch also keeps light-theme colors (a white segment and a light gray one).

What we found in the extension's CSS

  • Session titles (.title_*) use var(--vscode-foreground) directly.
  • Other text derives from --app-primary-foreground, which is also built from --vscode-foreground.
  • --vscode-sideBar-foreground is never referenced, although --vscode-sideBar-background is used.
  • There is a data-ground mode meant for an editor and side bar of opposite lightness. In our setup it didn't change the chat's text color, even after a window reload.

Suggested fix

In webviews shown in the side bar (Sessions view, or the chat when docked there), base the text tokens on --vscode-sideBar-foreground and fall back to --vscode-foreground. For example: --app-primary-foreground: var(--vscode-sideBar-foreground, var(--vscode-foreground)). Derive the Local/Cloud switch colors from the side bar colors as well.

Dominant language
TypeScript
Stars
158k
Forks
25.1k
Avg merge
1d 8h
Merged PRs (30d)
4

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anthropics/claude-code

All issues in anthropics/claude-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.