BACK-466 - Add Vim jump and half-page motions to TUI board columns#661
Open
alessandro-rizzo wants to merge 1 commit into
Open
BACK-466 - Add Vim jump and half-page motions to TUI board columns#661alessandro-rizzo wants to merge 1 commit into
alessandro-rizzo wants to merge 1 commit into
Conversation
Add gg/G to jump to the top/bottom of the focused board column and Ctrl+d/Ctrl+u to move the selection by half a page. Motions clamp inside the column (no fall-through to search) and also drive move mode. Index math lives in a pure resolveVimMotionIndex helper; board key handlers are thin wrappers. Help popup and tests updated. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Adds familiar Vim vertical-navigation motions to the focused column of the terminal Kanban board (
backlog board), extending the existingh/j/k/lbindings:gggpresses within 400ms; a lonegis a no-op)GCtrl+dCtrl+uAll four motions clamp inside the column and never hand focus to the search box, so the existing
j/kboundary→search behavior is unchanged. They also work in move mode, repositioning the move target (top/bottom/half-page) within the valid range.Full-page
Ctrl+f/Ctrl+bis intentionally out of scope to avoid clashing with the existingCtrl+fsearch shortcut.Implementation
src/ui/task-viewer-with-search.ts— new pure, exportedresolveVimMotionIndex(motion, currentIndex, totalItems, visibleHeight)(+VimVerticalMotiontype) that does all clamped index math, mirroring the existingshouldMoveFromListBoundaryToSearch/resolveSearchExitTargetIndexhelpers.src/ui/board.ts— four thinscreen.keyhandlers + a sharedapplyVimMotionclosure that reads the list's rendered height (falling back to task count) and routes throughselectColumnRow(navigation) ormoveOp.targetIndex(move mode).src/ui/components/help-popup.ts— addedgg/GandC-d/urows to the board shortcuts.src/test/board-vim-motion.test.ts— unit tests for the helper (top/bottom, half-page clamping both ends, empty list, odd-height rounding, tiny-height minimum step).Testing
bunx tsc --noEmit— passesbun run check .(changed files) — passesbun test— 1250 pass / 0 fail🤖 Generated with Claude Code