Skip to content

Conversation

@ThomasK33
Copy link
Member

Add vim-style keybindings for marking hunks in the code review panel:

  • l: mark selected hunk as read (reviewed)
  • h: mark selected hunk as unread (unreviewed)

Implementation

The keybindings follow vim conventions where l (right) moves forward/marks as done, and h (left) moves backward/unmarks.

Auto-navigation logic: When showReadHunks is disabled and a user presses l to mark a hunk as read, the selection automatically advances to the next unread hunk. This maintains keyboard navigation flow and prevents the selection from becoming invalid. The logic reuses the same pattern as handleToggleRead for consistency.

Testing

Manual testing:

  • Press l on unread hunk → marks as read, advances to next unread hunk
  • Press h on read hunk → marks as unread
  • Works correctly when showReadHunks is enabled (no auto-navigation)
  • Works correctly when showReadHunks is disabled (auto-navigation)
  • Typechecks pass

Generated with cmux

Test added 2 commits November 4, 2025 17:17
Add vim-style keybindings for marking hunks in code review panel:
- l: mark selected hunk as read (reviewed)
- h: mark selected hunk as unread (unreviewed)

Includes auto-navigation logic to maintain keyboard flow when hunks
are filtered out after marking as read (when showReadHunks is false).

Follows existing patterns from handleToggleRead for consistent UX.

Change-Id: I0f9a9ece1d7678af6e4214e98a71f2f8d0d2073a
Signed-off-by: Test <[email protected]>
Change-Id: I4744166633851256bd816785e3c4bdb661b8d7ac
Signed-off-by: Test <[email protected]>
@ThomasK33 ThomasK33 added this pull request to the merge queue Nov 5, 2025
Merged via the queue into main with commit e99516e Nov 5, 2025
13 checks passed
@ThomasK33 ThomasK33 deleted the review-vim-keys branch November 5, 2025 12:27
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