Inline arrow-key prompts for interactive CLI commands - #792
Open
martian56 wants to merge 9 commits into
Open
Conversation
martian56
requested review from
DamianB-BitFlipper,
JannikSt,
JohannesHa,
burnpiro,
d42me,
kcoopermiller and
willccbb
as code owners
July 15, 2026 10:04
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 interactive prompts across the CLI are plain text today — type a number to pick from a numbered list,
y/Nto confirm, and so on. This swaps them for inline arrow-key prompts (viaquestionary), so choosing a coding agent, a team, a GPU config, or which teammates to share a pod with works the way people expect from a modern CLI: arrow keys to move, space to toggle in multi-selects, enter to confirm.It started with
prime lab setup— picking coding agents was the roughest spot, a flat comma-separated list where you had to type names — and once that was arrow-key driven the rest felt inconsistent, so I brought the whole CLI in line.What changed
utils/prompt.py(confirm,select_item_interactive/require_selection,prompt_for_value) now backs onto questionary, so most commands pick it up for free.loginandswitch, thefeedbackcategory, and the remote-owner picker in the verifiers bridge.config,deployments,rl,logout,images,secrets,env, andsandbox.questionaryto the dependencies.Testing
Interactive tests drive questionary through a prompt_toolkit pipe — there's a
keysfixture intests/conftest.pythat queues keystrokes (keys.select(),keys.confirm(),keys.text(),keys.check()), so the existingCliRunnerflows keep working without real TTY input.The suite passes locally except for failures that predate this change and are unrelated to it — Unix-only
fcntl, a few symlink/path assertions, and the textual TUI tests — all of which fail the same way onmainon Windows.Before
After
Before
After
Before
After
Before
After
Before
After