You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 feat: add l/h keybinds to mark hunks as read/unread (#509)
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:
- [x] Press `l` on unread hunk → marks as read, advances to next unread
hunk
- [x] Press `h` on read hunk → marks as unread
- [x] Works correctly when `showReadHunks` is enabled (no
auto-navigation)
- [x] Works correctly when `showReadHunks` is disabled (auto-navigation)
- [x] Typechecks pass
---
_Generated with `cmux`_
---------
Signed-off-by: Test <test@example.com>
Co-authored-by: Test <test@example.com>
0 commit comments