opencode
opencode copied to clipboard
bug: theme selector crashes when filtering produces no results
Description
The theme selector dialog crashes with a TypeError when typing characters during theme search that produce no matching results.
[17:02:02] [ERROR] Error: undefined is not an object (evaluating 'opt.value')
TypeError: undefined is not an object (evaluating 'opt.value')
at onMove (src/cli/cmd/tui/component/dialog-theme-list.tsx:26:17)
at moveTo (src/cli/cmd/tui/ui/dialog-select.tsx:83:11)
at <anonymous> (src/cli/cmd/tui/ui/dialog-select.tsx:65:9)
This is because the .value property is accessed on an undefined.
Plugins
N/A
OpenCode version
1.1.23
Steps to reproduce
- Open the theme selector in opencode.
- Start typing a theme name which is not listed, I typed
sonokai. - When typing the letter
nforsonokai, the application errors, and prints out error logs in the console.
Screenshot and/or share link
Operating System
macOS 26.2
Terminal
Ghostty 1.2.3