[FEATURE]: Improve UX of question tool multi-select #4582

Closed
opened 2026-02-16 17:44:40 -05:00 by yindo · 3 comments
Owner

Originally created by @shanebishop1 on GitHub (Jan 9, 2026).

Originally assigned to: @rekram1-node on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

The current question tool response UX is a bit unintuitive imo - what does the team think about matching the pattern that pnpm uses for approve-builds? This would mean hitting space to toggle selections and enter to confirm/submit. This approach would also sidestep this tab key conflict issue since we could cut out that part of the flow (and also save the user a keystroke, which is nice).

Also, it would be nice to be able to use the number keys for choosing single-choice questions.

Let me know your thoughts 🙂

Ref: pnpm uses ↑↓/jk navigate - space select - ⏎ submit
E.g:

Image
Originally created by @shanebishop1 on GitHub (Jan 9, 2026). Originally assigned to: @rekram1-node on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request The current question tool response UX is a bit unintuitive imo - what does the team think about matching the pattern that pnpm uses for `approve-builds`? This would mean hitting space to toggle selections and enter to confirm/submit. This approach would also sidestep [this tab key conflict issue](https://github.com/anomalyco/opencode/issues/7496) since we could cut out that part of the flow (and also save the user a keystroke, which is nice). Also, it would be nice to be able to use the number keys for choosing single-choice questions. Let me know your thoughts 🙂 Ref: pnpm uses `↑↓/jk navigate - space select - ⏎ submit` E.g: <img width="1157" height="120" alt="Image" src="https://github.com/user-attachments/assets/5182aefc-d5c7-4d3f-9e26-2b5c9dd3fee3" />
yindo added the opentuidiscussion labels 2026-02-16 17:44:40 -05:00
yindo closed this issue 2026-02-16 17:44:41 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 9, 2026):

This issue is directly related to #7496: Question Tool Keyboard Conflict and Agent Switch Issue. Your proposed solution (space to toggle selections and enter to confirm) is an excellent way to address the tab key conflict mentioned in that issue.

Additionally, you may want to consider #7462: Ability to turn off the "question form behavior", which discusses concerns about the question form UX being unintuitive.

@github-actions[bot] commented on GitHub (Jan 9, 2026): This issue is directly related to #7496: Question Tool Keyboard Conflict and Agent Switch Issue. Your proposed solution (space to toggle selections and enter to confirm) is an excellent way to address the tab key conflict mentioned in that issue. Additionally, you may want to consider #7462: Ability to turn off the "question form behavior", which discusses concerns about the question form UX being unintuitive.
Author
Owner

@Hipfox commented on GitHub (Jan 10, 2026):

About Question Tool UX Issues and Recommendations

Following up on #7496 I've conducted a thorough code analysis of the Question Tool implementation. Here's a comprehensive breakdown of the current issues and how the proposed changes would address them.

Current Keyboard Binding Analysis

Action UI Hint Actual Implementation Problem
Switch tabs ⇆ tab left/right or h/l Misleading
Select option ↑↓ up/down or k/j ✓ Correct
Confirm/Toggle enter return ✓ Correct
Dismiss esc escape ✓ Correct

Root cause in code (question.tsx:150-162): Currently no handler for "tab" key - event bubbles to global agent_cycle

Additional UX Issues Discovered

  1. Enter Key Behavior is Context-Dependent (Confusing)

The Enter key has 4 different behaviors depending on state:

Context Enter Behavior UI Label
Single question, single-select Select + Submit immediately "submit"
Multi-question, single-select Select + Move to next tab "confirm"
Multi-select mode Toggle selection "toggle"
Confirm tab Submit all answers "submit"

This is implemented at question.tsx:357:

  {confirm() ? "submit" : multi() ? "toggle" : single() ? "submit" : "confirm"}
  1. No Way to Go Back to Previous Questions

In multi-question mode, after moving to the next question (or Confirm tab), users can only go back using left/h. But:

  • The UI shows ⇆ tab which doesn't work
  • There's no explicit "back" hint

How the Proposed Changes Address These Issues

Issue Current Proposed (pnpm-style) Improvement
Tab conflict Tab triggers agent switch Space for toggle, no Tab Eliminates conflict
Toggle confusion Enter toggles in multi-select Space always toggles Consistent mental model
Quick selection Navigate then Enter Number keys for single-choice Fewer keystrokes
Enter ambiguity 4 different behaviors Enter always confirms Predictable

Suggested Implementation

Building on @shanebishop1's proposal:

Mode Proposed UI Hints
Single-select 1-4 select · ↑↓/jk navigate · enter submit
Multi-select space toggle · ↑↓/jk navigate · enter done
Multi-question ←→/hl switch · esc dismiss

Additional Recommendations

Consume Tab key event even if not used, to prevent bubbling:

if (evt.name === "tab") {
  evt.preventDefault()
  // optionally: same as right arrow

References

@Hipfox commented on GitHub (Jan 10, 2026): ## About Question Tool UX Issues and Recommendations Following up on #7496 I've conducted a thorough code analysis of the Question Tool implementation. Here's a comprehensive breakdown of the current issues and how the proposed changes would address them. ### Current Keyboard Binding Analysis | Action | UI Hint | Actual Implementation | Problem | | -------------- | ------- | ------------------------- | ------------ | | Switch tabs | `⇆ tab` | `left`/`right` or `h`/`l` | ❌ Misleading | | Select option | `↑↓` | `up`/`down` or `k`/`j` | ✓ Correct | | Confirm/Toggle | `enter` | `return` | ✓ Correct | | Dismiss | `esc` | `escape` | ✓ Correct | **Root cause in code** (`question.tsx:150-162`): Currently no handler for "tab" key - event bubbles to global agent_cycle ### Additional UX Issues Discovered 1. Enter Key Behavior is Context-Dependent (Confusing) The Enter key has 4 different behaviors depending on state: | Context | Enter Behavior | UI Label | | ------------------------------ | --------------------------- | --------- | | Single question, single-select | Select + Submit immediately | "submit" | | Multi-question, single-select | Select + Move to next tab | "confirm" | | Multi-select mode | Toggle selection | "toggle" | | Confirm tab | Submit all answers | "submit" | This is implemented at question.tsx:357: ``` {confirm() ? "submit" : multi() ? "toggle" : single() ? "submit" : "confirm"} ``` 2. No Way to Go Back to Previous Questions In multi-question mode, after moving to the next question (or Confirm tab), users can only go back using left/h. But: - The UI shows ⇆ tab which doesn't work - There's no explicit "back" hint ### How the Proposed Changes Address These Issues | Issue | Current | Proposed (pnpm-style) | Improvement | | ---------------- | ----------------------------- | ----------------------------- | ------------------------- | | Tab conflict | Tab triggers agent switch | Space for toggle, no Tab | ✅ Eliminates conflict | | Toggle confusion | Enter toggles in multi-select | Space always toggles | ✅ Consistent mental model | | Quick selection | Navigate then Enter | Number keys for single-choice | ✅ Fewer keystrokes | | Enter ambiguity | 4 different behaviors | Enter always confirms | ✅ Predictable | ### Suggested Implementation Building on @shanebishop1's proposal: | Mode | Proposed UI Hints | | -------------- | ------------------------------------------ | | Single-select | 1-4 select · ↑↓/jk navigate · enter submit | | Multi-select | space toggle · ↑↓/jk navigate · enter done | | Multi-question | ←→/hl switch · esc dismiss | ### Additional Recommendations Consume Tab key event even if not used, to prevent bubbling: ``` if (evt.name === "tab") { evt.preventDefault() // optionally: same as right arrow ``` ### References - Tab key conflict: #7496 - Related commit: e37fd9c (Question Tool implementation)
Author
Owner

@shanebishop1 commented on GitHub (Jan 17, 2026):

@kitlangton made some PRs recently which improved the question UX and addressed most of my concerns. Closing this issue.

@shanebishop1 commented on GitHub (Jan 17, 2026): @kitlangton made some PRs recently which improved the question UX and addressed most of my concerns. Closing this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4582