Skip to content

Conversation

@pppp606
Copy link

@pppp606 pppp606 commented Dec 5, 2025

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 behavior
when navigating selection popups.

Related

Changes

  • Added Ctrl+n as alternative to Down arrow in selection popups
  • Added Ctrl+p as alternative to Up arrow in selection popups
  • Added unit tests for the new keybindings

Test Plan

  • cargo test -p codex-tui list_selection_view - all tests pass
  • Manual testing: verified Ctrl+n/p navigation works in model selection popup

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.
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@pppp606
Copy link
Author

pppp606 commented Dec 5, 2025

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Dec 5, 2025
Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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).
@etraut-openai
Copy link
Collaborator

@codex review

Copy link
Collaborator

@etraut-openai etraut-openai left a 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() {
Copy link
Collaborator

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.

@etraut-openai etraut-openai added the needs-response Additional information is requested label Dec 5, 2025
@etraut-openai
Copy link
Collaborator

@pppp606, looks like there's also a formatting issue. Should be easy to fix.

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Hooray!

ℹ️ 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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-response Additional information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants