Skip to content

feat(tui): Ctrl+P / Ctrl+N navigate slash-command autocomplete#3196

Closed
1Git2Clone wants to merge 2 commits into
Hmbown:codex/v0.8.60from
1Git2Clone:feat/slash-ctrl-n-p
Closed

feat(tui): Ctrl+P / Ctrl+N navigate slash-command autocomplete#3196
1Git2Clone wants to merge 2 commits into
Hmbown:codex/v0.8.60from
1Git2Clone:feat/slash-ctrl-n-p

Conversation

@1Git2Clone

@1Git2Clone 1Git2Clone commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Ctrl+P (up) and Ctrl+N (down) as alternatives to arrow keys for navigating the inline slash-command autocomplete popup. Includes an additional guard on the global Ctrl+P file-picker handler so it yields when the slash menu is open.

Verification

  • cargo check -p codewhale-tui
  • cargo clippy -p codewhale-tui (clean, 4 pre-existing fleet warnings unrelated)
  • cargo test -p codewhale-tui -- slash_menu_up_wraps slash_menu_down_wraps (2/2 pass)
  • cargo build --release -p codewhale-tui
  • feature works when using the app

Adds Emacs-style Ctrl+P (up) and Ctrl+N (down) as alternatives to
arrow keys for navigating the inline slash-command popup when it is
visible. Both arms gate on slash_menu_open and call the existing
select_previous_slash_menu_entry / select_next_slash_menu_entry
helpers — no new logic. Composer history handling already yields when
the menu is open, so no conflict.

Also updates KEYBINDINGS.md to document the new chords.
@1Git2Clone 1Git2Clone requested a review from Hmbown as a code owner June 13, 2026 13:32

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@github-actions

Copy link
Copy Markdown

Thanks @1Git2Clone for taking the time to contribute.

This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered.

Please read CONTRIBUTING.md for the expected contribution shape. A maintainer can grant recurring PR access by commenting /lgtm on a pull request.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds Ctrl+P and Ctrl+N keybindings to navigate the slash-command palette menu, and updates the keybindings documentation accordingly. A conflict was identified where the global Ctrl+P keybinding (which opens the file picker) is handled earlier in the event loop, preventing the new navigation shortcut from working when the slash menu is open. A fix was suggested to ensure the file picker is not triggered when the slash menu is active.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread crates/tui/src/tui/ui.rs
@1Git2Clone 1Git2Clone closed this Jun 13, 2026
@1Git2Clone 1Git2Clone reopened this Jun 13, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@1Git2Clone 1Git2Clone marked this pull request as draft June 13, 2026 13:44

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@1Git2Clone 1Git2Clone marked this pull request as ready for review June 13, 2026 13:47

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@1Git2Clone

1Git2Clone commented Jun 13, 2026

Copy link
Copy Markdown
Contributor Author

idk why my deepseek requested you as the reviewer Hmbown, I'm sorry for that 😔

at least it's just 10 lines of code I guess

nv55qzp

Edit: okay I saw it's just a .github/CODEOWNERS thing nevermind

@1Git2Clone

Copy link
Copy Markdown
Contributor Author

Now that I think about it—the Command Palette could also work the same way with Ctrl+N/P because j/k is very convenient but whenever you want to type out a command and look through options you can't use j and k, not to mention you can't use them as the first letters of your search if you ever need them to be.

@Hmbown do tell me if you want me to include that in the scope of this PR

@github-actions

Copy link
Copy Markdown

Thanks @1Git2Clone — your contribution landed in 6ac93e81c7c9 on main:

feat(tui): add Ctrl+P/N slash-menu navigation

Closing this PR now that the code is on main. Credit lives in the commit message and (where applicable) the CHANGELOG.md entry for the next release. Apologies for not closing this at the time of the merge — the auto-close workflow is new in v0.8.31.

If you want to land more work and would prefer your future PRs merge cleanly without a harvest step, the CONTRIBUTING.md doc has a short note on what makes a contribution mergeable as-is.

@github-actions github-actions Bot closed this Jun 14, 2026
pull Bot pushed a commit to dolfly/DeepSeek-TUI that referenced this pull request Jun 14, 2026
Adds Ctrl+P and Ctrl+N as Emacs-style alternatives for slash-command autocomplete navigation while keeping the global Ctrl+P file picker from stealing focus when the slash menu is open.

Harvested from PR Hmbown#3196 by @1Git2Clone.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant