You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
app: custom themes from ~/.config/opencode/themes are not listed in the GUI theme picker #54235
Custom theme files placed in ~/.config/opencode/themes/*.json are correctly discovered and listed by the TUI, but the desktop/web UI never loads them: its theme picker lists only the themes embedded in packages/ui/src/theme/themes/. The UI exposes a registerTheme() extension point in packages/ui/src/theme/context.tsx, but nothing calls it, so user-defined desktop themes (the desktop-theme.json format used by https://opencode.ai/theme/) cannot be used in the GUI.
Environment
opencode version: 2.0.26
OS: Fedora 44 (Linux 7.2.8-200.fc44.x86_64 x64)
Terminal: ghostty (custom theme is written for the GUI, not the TUI)
Shell: zsh
Install/channel: release (latest)
Active plugins: @dietrichgebert/ponytail, superpowers (local git install)
Reproduction
Create a valid desktop theme file with name/id/light/dark (palette + overrides), e.g. export it from https://opencode.ai/theme/
Save it as ~/.config/opencode/themes/adwaita.json
Open the desktop app, open settings → theme picker
Theme does not appear in the list (only built-in themes)
Expected Behavior
Custom themes in the global themes directory (~/.config/opencode/themes/*.json, and project .opencode/themes/) should show up in the GUI theme picker, like they already do in the TUI via /themes.
Actual Behavior
The picker shows only embedded themes. No error is shown; the file is silently ignored.
Observed in the code (tag v2.0.26):
packages/tui/src/theme/discovery.ts — TUI discovers themes/*.json in Global.Path.config and .opencode/ dirs ✔
packages/ui/src/theme/context.tsx — GUI ids() list comes from import.meta.glob("./themes/*.json") (embedded only); registerTheme is exported but has no callers anywhere in the repo ✖
Additional Context
A single file that satisfies both formats (TUI defs/theme keys and desktop name/id/light/dark) is accepted by the TUI but ignored by the GUI, so swapping file locations does not help.
Request: make the app read the same themes directories as the TUI (or call registerTheme for custom files found at startup), so https://opencode.ai/theme/ exports are usable in the GUI.
Feature is highly desirable for the GUI since the theme tool outputs the desktop format.
Reacted by Akam Foad, r4mp, CHEN Xuan, Devis Lucato and romain-l
Thanks for the detailed write-up and for tracing it to registerTheme! You're asking for the desktop and web app to load custom theme files from ~/.config/opencode/themes/ and .opencode/themes/, as the TUI already does, so themes exported from https://opencode.ai/theme/ can be picked in the GUI. Maintainers will consider it.
Related:
feat(app): discover TUI themes in Desktop #53041: an open PR that adds this. The desktop app would load theme files from the user config folder and from .opencode/themes, in both the desktop format and the TUI format.
Still present in 2.0.28, and also on macOS (26.2, arm64), so this isn't
Linux-specific.
One addition that may help rule out the format question: I used an unmodified copy of the built-in default theme as a negative control.
I extracted the default theme object from the shipped opencode-cli
binary, wrote it verbatim to ~/.config/opencode/themes/zztest.json,
and fully quit and restarted the desktop app. It does not appear in the
picker either.
Since that file is byte-for-byte a theme the application itself ships
and accepts, this rules out schema, format and validation problems
entirely — the directory is simply never read. That matches your finding
that registerTheme has no callers: the string "themes" does not occur
anywhere in the shipped app.asar, while the directory scan is present
in opencode-cli.
Two smaller points:
Setting theme.name in ~/.config/opencode/cli.json to a custom theme
silently falls back to a built-in theme. No warning, no toast, and
nothing in ~/.local/share/opencode/log/. Surfacing an "unknown theme"
hint would have made this self-diagnosable.
YES please add this
the text is full white is burning my eyes, it should be hsv (0, 0%, 80%)
it would be nice if we can make the bold text has different color also
Activity
opencode-agent commentedon Oct 10, 2026
Thanks for the detailed write-up and for tracing it to
registerTheme! You're asking for the desktop and web app to load custom theme files from~/.config/opencode/themes/and.opencode/themes/, as the TUI already does, so themes exported from https://opencode.ai/theme/ can be picked in the GUI. Maintainers will consider it.Related:
.opencode/themes, in both the desktop format and the TUI format.This can't be done with a plugin for now, because plugins can only reach themes in the TUI, not in the desktop or web app.
LeonMueller-OneAndOnly commentedon Oct 12, 2026
This would be a very welcome addition!
r4mp commentedon Oct 13, 2026
Still present in 2.0.28, and also on macOS (26.2, arm64), so this isn't
Linux-specific.
One addition that may help rule out the format question: I used an
unmodified copy of the built-in default theme as a negative control.
I extracted the default theme object from the shipped
opencode-clibinary, wrote it verbatim to
~/.config/opencode/themes/zztest.json,and fully quit and restarted the desktop app. It does not appear in the
picker either.
Since that file is byte-for-byte a theme the application itself ships
and accepts, this rules out schema, format and validation problems
entirely — the directory is simply never read. That matches your finding
that
registerThemehas no callers: the string"themes"does not occuranywhere in the shipped
app.asar, while the directory scan is presentin
opencode-cli.Two smaller points:
theme.namein~/.config/opencode/cli.jsonto a custom themesilently falls back to a built-in theme. No warning, no toast, and
nothing in
~/.local/share/opencode/log/. Surfacing an "unknown theme"hint would have made this self-diagnosable.
~/.config/opencode/themes/as the global theme directory withoutnoting that this applies to the terminal client only. Until feat(app): discover TUI themes in Desktop #53041
lands, a sentence there would save people the debugging round-trip.
Happy to see #53041 merged — it would make existing TUI-format files work
in the GUI unchanged.
abulak9999-star commentedon Oct 21, 2026
YES please add this
the text is full white is burning my eyes, it should be hsv (0, 0%, 80%)
it would be nice if we can make the bold text has different color also
dluc commentedon Oct 28, 2026
This would be a very welcome addition!