[Bug] Custom theme diffAdded/diffRemoved overrides ignored in file-diff renderer
Bug Description
Custom theme diffAdded/diffRemoved overrides are ignored in the file-diff view
Summary: A custom theme (~/.claude/themes/<slug>.json) with valid overrides for diffAdded/diffRemoved loads and is selectable, but the tool file-diff renderer (Edit/Write/Update output) never applies the overridden colors — it always uses the base theme's stock diff backgrounds.
Version: Claude Code 2.1.181 (macOS)
Repro:
- Create ~/.claude/themes/dark-diff.json:
{
"name": "Dark darker diffs",
"base": "dark",
"overrides": {
"diffAdded": "rgb(8,40,18)",
"diffRemoved": "rgb(48,12,14)"
}
}
- /theme → select "Dark darker diffs" (it appears in the list, confirming the file parses).
- Trigger any file diff.
Expected: Added/removed lines use the overridden backgrounds.
Actual: They render with the base dark theme's defaults (diffAdded = rgb(34,92,43)). No change at all.
Root cause (from inspecting the bundle): The diff component resolves its theme via the currentTheme hook, which for any custom:<slug> setting collapses to the base name ("dark") and discards the overrides. The override-aware resolvedTheme palette (which does contain the merged overrides, and which other UI uses) is never consulted on the diff path. So custom diff-color overrides can never take effect.
Impact / motivation: The dark theme's added-line green (rgb(34,92,43)) has poor contrast with the dimmed-gray syntax color used for comments — comments in added blocks are nearly unreadable. Custom themes are the documented way to fix this, but the one place it matters (the diff) ignores them.
Requests (either would resolve it):
- Honor custom-theme diffAdded/diffRemoved/Dimmed/Word overrides in the file-diff renderer (resolve diff colors via resolvedTheme, not the base currentTheme).
- Or darken the dark theme's default diff backgrounds for better contrast with comment/dimmed foreground colors.
Environment Info
- Platform: darwin
- Terminal: tmux
- Version: 2.1.181
- Feedback ID: ed0272a6-3953-4f81-bfe8-a8bc094b6277
Errors
[]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗