Add support to enter select mode when user has 10+ opts #585
+48
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Problem
I have a user that brought up a concern around the automatic selection of an option when
1
is selected but there are 10+ options. The user expected to enter a select mode so they could enter 10, but it automatically selected option 1. Unfortunately this started a deletion of their branch (as the select prompt was to select a branch to delete), which the user was surprised by.Screen.Recording.2025-03-13.at.11.25.33.PM.mov
Solution
This PR is proposing to enter the select mode when the user selects
1
and there are 10+ options (2 when there are 20+, etc).Screen.Recording.2025-03-13.at.11.26.49.PM.mov
This is anticipated to make the select option a little bit safer, though does introduce some (albeit minor) inconsistency by not auto-selecting. The benefit, however, is that we can now better support options 10+! I also doubt that most prompts actually have 10+ options unless choosing from a big list, and so this may be preferable anyways.