anomalyco / anomalyco/opencode
SelectV2 dropdown fails to open after selecting an item (Kobalte Portal rendering bug)
@Hona is already working on this.
Since Jul 24, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Description
After selecting an option from a SelectV2 dropdown (language, theme, color scheme, shell), the next click on the trigger does not render the dropdown popover. The trigger's onClick fires, onOpenChange(true) fires, but the <Kobalte.Content> / <Kobalte.Listbox> never appears in the DOM. Re-clicking eventually recovers but only after several attempts.
Also reproducible on the official desktop .exe build, confirming this is an upstream shared issue, not specific to any deployment target.
Steps to Reproduce
- Open Settings → General
- Click any
SelectV2(Language / Shell / Color Scheme / Theme) - Select an option from the list
- Click the same
SelectV2trigger again - Expected: Dropdown opens normally
- Actual: Nothing appears (or flickers briefly)
Happens 100% of the time on the 2nd open after item selection.
Diagnostic Evidence
With a DOM probe added after onOpenChange(true):
[select-v2] POPOVER MISSING action=settings-language elapsed=1986ms cycle=4
[select-v2] diagnostics: portalInDom=false triggerExpanded=false listboxInDom=false
portalInDom=false— Kobalte's<Portal>is not mounting content todocument.bodytriggerExpanded=false— even thoughonOpenChange(true)was called, trigger'sdata-expandedattribute is not setlistboxInDom=false— no drop-down list in the DOM at all
Root Cause
Kobalte's <Portal> component enters a broken state after the first onChange (item selection). On the next open, onOpenChange(true) fires correctly (the state machine works), but <Kobalte.Content> / <Kobalte.Listbox> are never rendered into the portal. This only happens after an item has been selected — pure open/close without selection does not trigger the bug.
Environment
@kobalte/coreversion: 0.13.x (per workspace catalog)- SolidJS version: 1.9.x (per workspace catalog)
- Browser: Any (reproduced in Chrome)
- OS: Windows (Docker-hosted instance)
Workaround
Forcing Kobalte to unmount/remount after every item selection resolves the issue:
// In SelectV2 component:
const [_mounted, setMounted] = createSignal(true)
const remountKobalte = () => {
setMounted(false)
requestAnimationFrame(() => setMounted(true))
}
// In JSX:
<Show when={_mounted()}>
<Kobalte ...>
</Show>
// In onChange:
onChange={(next) => {
const v = next == null ? null : Array.isArray(next) ? ((next[0] as T) ?? null) : (next as T)
local.onSelect?.(v)
stop()
setTimeout(remountKobalte, 0) // force fresh instance after selection
}}
Plugins
No response
OpenCode version
No response
Steps to reproduce
[select-v2] POPOVER MISSING action=settings-language elapsed=1986ms cycle=4
[select-v2] diagnostics: portalInDom=false triggerExpanded=false listboxInDom=false
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
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.