fix(input): ignore modified j/k/up/down in session navigator - #2377
fix(input): ignore modified j/k/up/down in session navigator#2377atomsbaza wants to merge 2 commits into
Conversation
The Char('j')/Char('k')/Down/Up match arms in handle_navigator_key
had no modifier guard, unlike every sibling arm in the same match
block, so Ctrl+K, Alt+J, etc. also moved the navigator selection.
refs herdrdev#1981
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe navigator now moves with unmodified ChangesNavigator input handling
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR prevents modified j/k and arrow keys from moving the Session Navigator selection.
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The modifier guards narrowly prevent modified movement keys from changing navigator selection while preserving the intended unmodified bindings.
|
| Filename | Overview |
|---|---|
| src/app/input/modal.rs | Restricts navigator row movement to unmodified keys and adds focused regression coverage for Ctrl+J/K. |
Reviews (1): Last reviewed commit: "Merge branch 'master' into fix/navigator..." | Re-trigger Greptile
Summary
handle_navigator_key'sChar('j') | DownandChar('k') | Upmatch arms had no modifier guard, unlike every sibling arm in the same match block ('a','b','w','i','d', all guarded withkey.modifiers.is_empty()or an explicitCONTROLcheck). This meant Ctrl+K, Alt+J, etc. also moved the Session Navigator's row selection.This is a narrow fix for that specific bug (reported as part of #1981 — see the "Also observed: ctrl+k moves the selection up even when navigate_pane_up is unset" note there). It does not address the broader ask in #1981 of making
navigate_pane_up/navigate_pane_downremap the Session Navigator's row movement — that's a different, spatial-pane-focus feature (Mode::Navigate) from the Session Navigator modal (Mode::Navigator, opened viagoto/prefix+g), and extending config into the Navigator would be a behavior change rather than a bug fix, so I left that for a maintainer decision / discussion.Test plan
navigator_ignores_modified_j_and_kinsrc/app/input/modal.rs, which fails on the pre-fix code (Ctrl+K/Ctrl+J move the selection) and passes with the fix.cargo fmt --checkclean.cargo nextest run --locked: 3037/3037 passed (one unrelated pre-existing flaky integration test,live_handoff_keeps_unmanaged_agent_name_bound_to_saved_session, confirmed to fail identically on unmodifiedmaster).refs #1981