fix(input): allow ctrl+n & ctrl+p keybinds in session navigator modal - #2271
fix(input): allow ctrl+n & ctrl+p keybinds in session navigator modal#2271jplew wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughThe change adds configurable session navigator up and down bindings with ChangesSession navigator bindings
Estimated code review effort: 3 (Moderate) | ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThe PR makes Session Navigator movement configurable in both normal and search-focused views while preserving existing movement commands.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported printable-binding conflict is addressed by rejecting the unmodified and Shift-only character bindings accepted by navigator search input.
|
| Filename | Overview |
|---|---|
| src/app/input/modal.rs | Routes configured navigator movement bindings before mode-specific handling and tests normal, search-focused, and built-in movement. |
| src/config/keybinds.rs | Adds an independent navigator binding registry and rejects unmodified or Shift-only character bindings that would conflict with search input. |
| src/config/model.rs | Adds the navigator movement fields consistently across deserialization, overlays, effective configuration, and defaults. |
| src/ui/keybind_help.rs | Displays the effective Session Navigator movement bindings in navigation help. |
| docs/next/website/src/data/config-reference.json | Documents both new configuration keys and their defaults. |
Reviews (2): Last reviewed commit: "fix(input): configure session navigator ..." | Re-trigger Greptile
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/app/input/modal.rs (1)
1897-1931: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTest a non-default navigator binding.
Both tests use only the default bindings. A hardcoded Ctrl+N/Ctrl+P implementation would pass them.
src/app/input/modal.rs#L1897-L1931: setstate.keybinds.navigator.upandstate.keybinds.navigator.downto non-default direct bindings. Test both normal and search-focused navigator states.src/ui.rs#L1440-L1473: set the same non-default bindings. Assert that keybinding help displays their labels.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c4d677b9-0d6c-46c8-a8c3-acec20449f24
📒 Files selected for processing (7)
docs/next/website/src/data/config-reference.jsonsrc/app/input/modal.rssrc/config/keybinds.rssrc/config/model.rssrc/main.rssrc/ui.rssrc/ui/keybind_help.rs
7fb7692 to
9fffd06
Compare
|
Addressed the automated review feedback in 9fffd06: printable search-input bindings are now rejected, and tests exercise non-default |
Summary
It pains me that I can't rebind up/down motion in the Navigator modal (prefix+g) to Vim/Emacs-style
ctrl+nandctrl+p.This PR fixes Session Navigator movement so
ctrl+n/ctrl+pare configurable and work both before and after focusing search. The default bindings preserve the existing search-focused behavior while extending it to the normal navigator view.keys.navigate_navigator_upandkeys.navigate_navigator_downj/kand arrow-key movement plus navigator commandsVerification
ZIG=/home/ubuntu/Sites/.tools/zig-x86_64-linux-0.15.2/zig just checkDocs
Updated the unreleased config reference and generated default-config comments for the new bindings.