-
Notifications
You must be signed in to change notification settings - Fork 6.6k
fix(tui): add missing Ctrl+n/Ctrl+p support to ListSelectionView #7629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Extends keyboard navigation support to approval mode, model selection, and rate limit switch popups, matching the behavior added in openai#1994 for slash commands and file selector.
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Some terminals send Control key chords as C0 control characters without reporting the CONTROL modifier. Add fallback handling for ^N (U+000E) and ^P (U+0010) to ensure consistent navigation across all terminal environments. Follows the same pattern used in textarea.rs (see openai#7530).
|
@codex review |
etraut-openai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Looks good for the most part.
While we like regression tests in the general case, I think these are unnecessary in this specific case.
| } | ||
|
|
||
| #[test] | ||
| fn ctrl_n_moves_selection_down() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that tests are overkill for this functionality. We're trying to be judicious in which tests we add to keep our CI times in check. Please remove these tests.
|
@pppp606, looks like there's also a formatting issue. Should be easy to fix. |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Extend Ctrl+n/Ctrl+p navigation support to selection popups (model picker, approval mode, etc.)
This is a follow-up to #7530, which added Ctrl+n/Ctrl+p navigation to the textarea.
The same keybindings were missing from
ListSelectionView, causing inconsistent behaviorwhen navigating selection popups.
Related
Changes
Test Plan
cargo test -p codex-tui list_selection_view- all tests pass