Repository navigation
Forward Cmd+Up / Cmd+Down to browser pane (#4635) - #4637
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR enables ChangesCommand+vertical arrow key routing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 16 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (16 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR fixes issue #4635 by routing
Confidence Score: 5/5Safe to merge — the change is narrow, deterministic, and fully guarded by existing first-responder and marked-text checks. The routing addition is a single exact-equality predicate on modifier flags and two keyCode values; all pre-existing guards remain intact, the positive and negative test coverage matches every exclusion boundary called out in the PR description, and the excluded shortcuts (Cmd+Left/Right, Cmd+Option+Arrow) are independently verified. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[keyDown / performKeyEquivalent] --> B{firstResponderIsBrowser?}
B -- No --> Z[Default AppKit routing]
B -- Yes --> C{firstResponderHasMarkedText?}
C -- Yes --> Z
C -- No --> D{keyCode in 123..126?}
D -- No --> Z
D -- Yes --> E[Normalize flags strip numericPad/function/capsLock]
E --> F{normalizedFlags empty?}
F -- Yes --> G[Forward via keyDown plain arrows]
F -- No --> H{normalizedFlags == .command AND keyCode == 125 or 126?}
H -- Yes --> I[Forward via keyDown Cmd+Up / Cmd+Down NEW]
H -- No --> Z
Reviews (2): Last reviewed commit: "test: cover Cmd Option Up browser routin..." | Re-trigger Greptile |
Summary
Fixes #4635.
Browser-focused vertical document navigation now gets routed through the existing trusted
keyDownforwarding path instead of falling into the command-equivalent/menu fallback. The change is intentionally narrow: browser content owns plain arrows plus command-only Cmd+Up/Cmd+Down, while modified cmux shortcuts such as Cmd+Option+Arrow stay out of the browser forwarding path.Routing change
shouldDispatchBrowserArrowViaFirstResponderKeyDownto return true for browser-focused Cmd+Up and Cmd+Down.NSWindow.cmux_performKeyEquivalent: the browser pane gets these keys only when the focused responder belongs to the WKWebView.Re-verified combos
Code-level routing coverage:
keyDownwhen the WKWebView is first responder.keyDownwhen the WKWebView is first responder.Runtime Google Docs verification/video was not produced in this workspace because the task explicitly reserves dev builds and launches for HQ.
Tests
0b29e8bc1.b43445b07.fd8c1b18dafter Greptile feedback.Summary by CodeRabbit
Release Notes