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
TUI: dialog-theme-list changes theme live on navigate/filter #56147
dialog-theme-list.tsx calls themes.set() live during onMove and onFilter — navigating or filtering the theme list changes your theme immediately with no way to preview without committing.
The live theme change while you move through or filter the list is meant to be a preview. When the dialog closes without a selection (e.g. you press Esc), dialog-theme-list.tsx puts your original theme back in its onCleanup handler (if (!confirmed) themes.set(initial)). So you should be able to preview themes without committing to one.
To work out whether something isn't behaving as intended, could you tell us:
Your OpenCode version (opencode --version), OS and terminal
The exact steps you took (e.g. open the theme list, move to another theme, press Esc)
What you expected and what actually happened. For example, did the previewed theme stay active or stay saved in your config after you cancelled the dialog, or after a restart?
You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done editing.
Thank you for the detailed response. I understand the intent - live theme change as a preview, with onCleanup reverting if not confirmed.
However, I still consider this a UX issue for the following reasons:
Surprising behavior during navigation: When a user opens the theme list to browse available themes, simply moving up/down with arrow keys changes their active theme immediately. This means the entire TUI theme changes as they arrow through the list, which is disruptive and disorienting. Users expect to preview a theme before applying it, not have it applied automatically on every arrow key press.
No way to preview without committing: While onCleanup reverts on dialog close without confirmation, there's no intermediate state where the user can see what a theme looks like without it being applied. The current behavior forces a commitment on every navigation step.
Inconsistent with other dialogs: Other selection dialogs in the TUI (model, agent, variant, skills) don't change state on navigation - they only apply changes on explicit selection.
Suggested fix: Only call themes.set() on onSelect (confirmation), not on onMove or onFilter. The onFilter could show a preview of filtered results without changing the theme, and onMove could highlight without applying.
I'll keep this issue open as a UX improvement request.
To restate the request: in the theme list, moving with the arrow keys or filtering should only highlight a theme, and the theme should change only when you confirm a selection, like the model, agent and variant dialogs. The full-TUI live preview can be disorienting when you just want to browse.
I've marked this as a feature request. Maintainers will consider it, for example whether to drop the live preview or make it optional. Thanks for the clear write-up!
I'd like to work on this. The current behavior is themes.set() in both onMove and onFilter in dialog-theme-list.tsx, plus an onCleanup that restores initial on cancel, so browsing the list writes kv.json on every arrow key. DialogSelect already tracks its own highlighted row and accepts current, so the fix is to drop those three calls and apply the theme only in onSelect: Esc then closes without writing anything, and Enter applies the highlighted theme, the same as the model, agent and variant dialogs. That removes the live preview on purpose, per the earlier reply. I'll add a test that moving and cancelling leaves the theme unchanged and that confirming applies it. This stays inside the dialog and doesn't touch the external-config hot reload in #37423. Unless there's any objections, I'll open a PR against dev.
Activity
opencode-agent commentedon Oct 16, 2026
Thanks for the report, @Addin!
The live theme change while you move through or filter the list is meant to be a preview. When the dialog closes without a selection (e.g. you press Esc),
dialog-theme-list.tsxputs your original theme back in itsonCleanuphandler (if (!confirmed) themes.set(initial)). So you should be able to preview themes without committing to one.To work out whether something isn't behaving as intended, could you tell us:
opencode --version), OS and terminalYou can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done editing.
Addin commentedon Oct 16, 2026
Thank you for the detailed response. I understand the intent - live theme change as a preview, with
onCleanupreverting if not confirmed.However, I still consider this a UX issue for the following reasons:
Surprising behavior during navigation: When a user opens the theme list to browse available themes, simply moving up/down with arrow keys changes their active theme immediately. This means the entire TUI theme changes as they arrow through the list, which is disruptive and disorienting. Users expect to preview a theme before applying it, not have it applied automatically on every arrow key press.
No way to preview without committing: While
onCleanupreverts on dialog close without confirmation, there's no intermediate state where the user can see what a theme looks like without it being applied. The current behavior forces a commitment on every navigation step.Inconsistent with other dialogs: Other selection dialogs in the TUI (model, agent, variant, skills) don't change state on navigation - they only apply changes on explicit selection.
Suggested fix: Only call
themes.set()ononSelect(confirmation), not ononMoveoronFilter. TheonFiltercould show a preview of filtered results without changing the theme, andonMovecould highlight without applying.I'll keep this issue open as a UX improvement request.
opencode-agent commentedon Oct 16, 2026
Thanks for explaining, @Addin. That makes sense.
To restate the request: in the theme list, moving with the arrow keys or filtering should only highlight a theme, and the theme should change only when you confirm a selection, like the model, agent and variant dialogs. The full-TUI live preview can be disorienting when you just want to browse.
I've marked this as a feature request. Maintainers will consider it, for example whether to drop the live preview or make it optional. Thanks for the clear write-up!
ColonelToad commentedon Nov 1, 2026
I'd like to work on this. The current behavior is themes.set() in both onMove and onFilter in dialog-theme-list.tsx, plus an onCleanup that restores initial on cancel, so browsing the list writes kv.json on every arrow key. DialogSelect already tracks its own highlighted row and accepts current, so the fix is to drop those three calls and apply the theme only in onSelect: Esc then closes without writing anything, and Enter applies the highlighted theme, the same as the model, agent and variant dialogs. That removes the live preview on purpose, per the earlier reply. I'll add a test that moving and cancelling leaves the theme unchanged and that confirming applies it. This stays inside the dialog and doesn't touch the external-config hot reload in #37423. Unless there's any objections, I'll open a PR against dev.