anomalyco / anomalyco/opencode
TUI: question dialog keyboard trapped after switching tabs while custom-answer field is focused
@simonklee is already working on this.
Since Sep 6, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
When a question dialog has multiple questions (tabs) and I'm typing a custom
"Type your own answer" reply, mouse-clicking another tab leaves the dialog stuck
in edit mode. Clicking the "Confirm" tab traps the keyboard completely: no
keypress does anything, including Esc. Only recovery is clicking a question tab
and pressing Esc to exit edit mode.
Cause: selectTab() in packages/tui/src/cli/cmd/tui/routes/session/question.tsx
changes the tab without resetting store.editing, which disables both keymap
blocks (editing keymap requires !confirm(), navigation keymap requires
!editing). The CLI footer handles this correctly via questionSetTab() setting
editing: false. Present on v1.18.29 and current dev.
Plugins
No response
OpenCode version
1.18.29
Steps to reproduce
- Ask a question that produces multiple questions (tab bar with Confirm tab)
- Click "Type your own answer", type something
- Mouse-click the "Confirm" tab
- Press any key — nothing responds, Esc included
Screenshot and/or share link
No response
Operating System
Fedora 44 (Linux x86-64)
Terminal
Ghostty
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.