You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TUI: question dialog keyboard trapped after switching tabs while custom-answer field is focused #47624
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)
I can take this. I’ll submit a minimal fix that resets the custom-answer editing state when switching question tabs, together with a focused regression test.
Preflight found the existing open PR #44240, which addresses the same selectTab / stale editing root cause. I won’t open a duplicate PR. I also have a focused local component regression test for the Confirm-tab keyboard trap and can offer it if the maintainers or the PR author would find it useful.
Hi, I have also faced the same bug. @ishuowang I checked the PR you mentioned and it appears to be closed due to automated cleanup, so no maintainer actually got to see it. If the PR owner will not reopen in a few days I will make a new PR myself.
Thanks for the report. Current v2 code clears custom-answer editing mode when switching question tabs, addressing the keyboard trap described here, so I'm closing this as resolved. If it returns on the latest v2, please open a new issue with your version and steps.
Activity
ishuowang commentedon Sep 8, 2026
I can take this. I’ll submit a minimal fix that resets the custom-answer editing state when switching question tabs, together with a focused regression test.
ishuowang commentedon Sep 8, 2026
Preflight found the existing open PR #44240, which addresses the same
selectTab/ staleeditingroot cause. I won’t open a duplicate PR. I also have a focused local component regression test for the Confirm-tab keyboard trap and can offer it if the maintainers or the PR author would find it useful.resonanceee commentedon Sep 24, 2026
Hi, I have also faced the same bug. @ishuowang I checked the PR you mentioned and it appears to be closed due to automated cleanup, so no maintainer actually got to see it. If the PR owner will not reopen in a few days I will make a new PR myself.
resonanceee commentedon Oct 17, 2026
v2 seems to fix this issue
neriousy commentedon Oct 20, 2026
Thanks for the report. Current v2 code clears custom-answer editing mode when switching question tabs, addressing the keyboard trap described here, so I'm closing this as resolved. If it returns on the latest v2, please open a new issue with your version and steps.