Skip to content

Comments

feat(config): add theme mode override option#14558

Open
kevinWangSheng wants to merge 2 commits intoanomalyco:devfrom
kevinWangSheng:feat/theme-mode-override
Open

feat(config): add theme mode override option#14558
kevinWangSheng wants to merge 2 commits intoanomalyco:devfrom
kevinWangSheng:feat/theme-mode-override

Conversation

@kevinWangSheng
Copy link

@kevinWangSheng kevinWangSheng commented Feb 21, 2026

Issue for this PR

Closes #4464

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a theme_mode config option (light / dark / system) so users can override terminal theme auto-detection. Terminals like Zellij and JetBrains IDEs misreport the system theme, making the TUI unreadable.

When set to light or dark, the config value takes priority over terminal detection.

How did you verify your code works?

Set theme_mode: "light" in opencode.json and verified the TUI renders in light mode regardless of terminal setting.

Screenshots / recordings

N/A - would need specific terminal to demo.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Allow users to manually set light/dark mode via the `theme_mode` config
option, bypassing terminal auto-detection. This fixes issues with terminals
(Zellij, JetBrains IDEs) that misreport the system theme.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Feb 21, 2026
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found potentially related PRs that may address similar theme mode functionality:

  1. PR feat(tui): add appearance setting with dark/light/system modes #7182 - feat(tui): add appearance setting with dark/light/system modes

    • This appears to be directly related - it adds dark/light/system mode selection similar to the current PR
  2. PR feat(tui): add system dark/light mode matching #9719 - feat(tui): add system dark/light mode matching

    • This also relates to system dark/light mode detection, which overlaps with the theme detection logic in the current PR

These PRs should be reviewed to determine if they address the same issue or if there's overlap in functionality. PR #7182 in particular seems to have very similar goals to the current PR #14558.

The Config type in the SDK did not include the new theme_mode field,
which would cause a typecheck failure. Added the field to both v1 and v2
SDK generated types and removed the `as` cast in theme.tsx since the
type now properly includes the property.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Feb 21, 2026
@github-actions
Copy link
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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/FEATURE] Light Mode doesn't work in Zellij

1 participant