fix(ui): add ctrl+n/ctrl+p emacs navigation across all list views#885
Open
MauriceDHanisch wants to merge 1 commit intoasheshgoplani:mainfrom
Open
fix(ui): add ctrl+n/ctrl+p emacs navigation across all list views#885MauriceDHanisch wants to merge 1 commit intoasheshgoplani:mainfrom
MauriceDHanisch wants to merge 1 commit intoasheshgoplani:mainfrom
Conversation
ctrl+n (next line) and ctrl+p (previous line) are standard emacs cursor movement keys. They were partially present — sub-dialogs like the zoxide picker and branch picker already used them — but inconsistently missing from the main session list and several other surfaces. This makes navigation consistent everywhere: - Main session list (home.go): ctrl+n/ctrl+p as aliases for j/down and k/up respectively. - New session dialog: ctrl+n/ctrl+p in the path-suggestions dropdown and the recent-sessions picker; ctrl+n/ctrl+p fall through to field-level navigation (next/prev field) when not on a path field with suggestions. Also adds j/k as aliases in the recent-sessions picker, which previously only accepted ctrl+n/down and ctrl+p/up. - Skill dialog: ctrl+n/ctrl+p as aliases for j/down and k/up. - Watcher panel: ctrl+n/ctrl+p as aliases for j/down and k/up. All changes include corresponding tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ctrl+n(next line) andctrl+p(previous line) are the most fundamental emacs cursor movement keys, but they only worked in some parts of the TUI. Navigation was inconsistent:j/kctrl+n/ctrl+pj/k)Changes
internal/ui/home.go— addctrl+p/ctrl+nas aliases fork/jin the main session list.internal/ui/newdialog.go:ctrl+n/ctrl+palongsidej/k.j/kalongside the existingctrl+n/ctrl+p.ctrl+n/ctrl+poutside a path field with active suggestions: fall through to form field navigation (mirrorsdown/shift+tab+up), including the conductor and multi-repo sub-list handling.internal/ui/skill_dialog.go— addctrl+n/ctrl+pas aliases forj/k.internal/ui/watcher_panel.go— addctrl+n/ctrl+pas aliases forj/k.Tests
Every changed surface has new tests:
TestHome_TerminalNavigationKeysextended withctrl+n/ctrl+pcases.TestNewDialog_CtrlN_CtrlP_FieldNavigation— field navigation in the new-session form.TestNewDialog_CtrlP_WrapsToLastField— wrap-around on first field.TestNewDialog_SuggestionsDropdown_CtrlN_CtrlP— dropdown navigation.TestNewDialog_RecentPicker_JK—j/kin recent-sessions picker.TestSkillDialog_CtrlN_CtrlP_Navigation— skill dialog navigation.TestWatcherPanel_CtrlN_CtrlP_Navigation— watcher panel navigation.Notes
j/kand arrow-key bindings are untouched.ctrl+f/ctrl+b(page forward/back) andctrl+u/ctrl+d(half-page) already work inhome.go— this PR does not touch those.