fix: repeat copy-mode navigation keys - #2372
Conversation
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughCopy-mode navigation now supports explicit terminal key-repeat events for arrows, Page Up/Down, Home, and End. Dedicated input leases route these events through copy-mode handling while preserving existing repeat behavior for other keys. ChangesCopy-navigation repeat handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Terminal
participant AppState
participant InputLeaseTable
participant CopyModeHandler
Terminal->>AppState: Send key press
AppState->>InputLeaseTable: Record RepeatCopyNavigation
Terminal->>AppState: Send KeyEventKind::Repeat
AppState->>InputLeaseTable: Check copy-navigation lease
AppState->>CopyModeHandler: Replay navigation repeat_count times
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/app/input/copy_mode.rs (1)
1187-1199: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd coverage for both repeat routers.
This test exercises
App::route_client_input, which covers the headless routing path. The PR also changessrc/app/runtime.rs, and the allowlist includes PageUp, PageDown, Home, and End. Add one runtime-path test and cases for the remaining allowlisted keys.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e08b7c75-531f-4917-9e1a-26f5e9b923ae
📒 Files selected for processing (5)
docs/next/CHANGELOG.mdsrc/app/input/copy_mode.rssrc/app/input/lease.rssrc/app/mod.rssrc/app/runtime.rs
|
@coderabbitai review |
|
Summary
Reproduction
macOS Ghostty reports held arrows as Kitty
Repeatevents; Linux Ghostty reports repeated presses. Before this change, the macOS Ghostty → SSH path moved once. The patched build repeats continuously.Tests
just checkRefs #2371