anomalyco / anomalyco/opencode
fix(ui): all dropdown selects stop opening after first selection in settings
@Hona is already working on this.
Since Jul 29, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
All dropdown selects (theme, color scheme, language, shell, sound, etc.) in the settings dialog stop responding after a value is selected. After choosing an item, clicking the trigger again does not open the dropdown — it remains closed with no response.
Steps to reproduce
- Open the settings dialog
- Click any dropdown (e.g. Theme, Color Scheme, Language)
- Select an item from the list — the dropdown closes and the value updates
- Click the same dropdown trigger again
- The dropdown does not open
Cause
In packages/ui/src/v2/components/select-v2.tsx and packages/ui/src/components/select.tsx, the onChange handler calls the user's onSelect callback synchronously before Kobalte's internal close() runs. For selects that trigger reactive state updates (e.g. theme.setTheme()), the SolidJS store update is batched together with the close() signal. When the batch flushes, the theme CSS application (modifying <style> element textContent) and the dropdown close animation/portal cleanup happen in the same microtask, leaving Kobalte's internal state inconsistent and preventing subsequent opens.
Fix
Defer onSelect via queueMicrotask so Kobalte fully completes selection handling (close(), portal cleanup) before the reactive update runs:
// Before (select-v2.tsx:166-170)
onChange={(next) => {
const v = next == null ? null : Array.isArray(next) ? ((next[0] as T) ?? null) : (next as T)
local.onSelect?.(v)
stop()
}}
// After
onChange={(next) => {
const v = next == null ? null : Array.isArray(next) ? ((next[0] as T) ?? null) : (next as T)
queueMicrotask(() => local.onSelect?.(v))
stop()
}}
Same fix applies to the legacy Select component in packages/ui/src/components/select.tsx:126-129.
Operating System
macOS
OpenCode version
Latest dev branch
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.