anomalyco / anomalyco/opencode

TUI: question dialog keyboard trapped after switching tabs while custom-answer field is focused

Open
#47,624 2 comments 0 reactions 1 assignee View on GitHub

@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
  1. Ask a question that produces multiple questions (tab bar with Confirm tab)
  2. Click "Type your own answer", type something
  3. Mouse-click the "Confirm" tab
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.