Repository navigation
Add cyclic pane focus shortcuts - #4763
austinywang wants to merge 14 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 6 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds cyclic pane-focus navigation: Workspace and TabManager gain focusNextPane()/focusPreviousPane(); keyboard shortcuts, command-palette commands, and View menu items are wired to those actions; web shortcut metadata/schema and localized strings are added; unit tests cover behavior and shortcut exposure. ChangesPane cycling keyboard navigation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 15 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
…hortcuts-to-change-focus
Greptile SummaryThis PR adds configurable Next Pane and Previous Pane shortcuts (default: Ctrl+Opt+Cmd+]/[) for cycling split-pane focus in stable split-tree order with wrap-around. The feature is fully wired through AppDelegate, the View menu, command palette, Settings, the
Confidence Score: 5/5Safe to merge — all changed paths are additive, follow established patterns, and are covered by new unit tests. The implementation reuses the existing focus/find-preservation path in AppDelegate, delegates through TabManager to a well-bounded Workspace method, and all eight new i18n catalog keys are fully translated across every native and web locale. No existing behavior is modified; the new shortcuts occupy a distinct key combination. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant AppDelegate
participant TabManager
participant Workspace
participant BonsplitController
User->>AppDelegate: Ctrl+Opt+Cmd+] keyEvent
AppDelegate->>AppDelegate: matchConfiguredShortcut(.nextPane)
AppDelegate->>AppDelegate: cmuxRememberFindSelectionBeforePanelFocusMove
AppDelegate->>TabManager: focusNextPane()
TabManager->>Workspace: focusNextPane()
Workspace->>BonsplitController: zoomedPaneId?
alt Pane is zoomed
BonsplitController-->>Workspace: zoomedPaneId
Workspace->>Workspace: "focusedPaneId == zoomedPaneId?"
alt Focus already on zoomed pane
Workspace-->>TabManager: false (no-op)
else Focus elsewhere
Workspace->>Workspace: focusSelectedPanel(inPane: zoomedPaneId)
Workspace-->>TabManager: true
end
else No zoomed pane
BonsplitController-->>Workspace: allPaneIds
Workspace->>Workspace: "count > 1?"
Workspace->>BonsplitController: focusedPaneId
Workspace->>Workspace: "targetIndex = (current + 1 + n) % n"
Workspace->>Workspace: focusSelectedPanel(inPane: targetPaneId)
Workspace-->>TabManager: true
end
TabManager-->>AppDelegate: Bool
AppDelegate-->>User: event consumed
Reviews (11): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile |
|
Addressing the non-threaded CodeRabbit pre-merge note: the locale lookup change is part of this feature, not an unrelated refactor. The new pane-shortcut docs data includes all supported locale keys, and the existing hard-coded en/ja lookup would prevent those new translations from rendering for other locales. The docstring coverage warning is repository-wide baseline/tooling noise, not introduced by this PR's changed Swift/TS paths. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ccc06d3. Configure here.
…hortcuts-to-change-focus # Conflicts: # Resources/Localizable.xcstrings # Sources/TabManager.swift # web/data/cmux.schema.json
…hortcuts-to-change-focus
…hortcuts-to-change-focus

Summary
Testing
Fixes #2076
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.Note
Medium Risk
Changes focus navigation across split panes (user-visible), but reuses existing focus/find-preservation patterns and is covered by new unit tests.
Overview
Adds Next Pane and Previous Pane so users can cycle split-pane focus in stable split-tree order with wrap-around, separate from directional focus and tab/surface cycling.
Focus behavior:
WorkspacewalksbonsplitController.allPaneIds, focuses the selected tab (or first tab) in each target pane, and no-ops when there is only one pane. While a pane is zoomed, cycling does not leave the zoomed pane unless focus is already elsewhere.Wiring: New
nextPane/prevPaneactions default to Ctrl+Option+Command+] and [ (distinct from workspace and surface shortcuts). Routed inAppDelegate(with find-selection preservation before focus moves), View menu, command palette, Settings,cmux.jsonschema,Localizable.xcstrings, and web shortcut docs.LocalizedTextnow preferstext[locale]with ja/en fallback.Tests: Unit coverage for forward/back wrap, single-pane no-op, zoomed-pane behavior, and public shortcut defaults.
Reviewed by Cursor Bugbot for commit 6b43feb. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Adds configurable Next Pane and Previous Pane shortcuts to cycle focus across split panes in stable order with wrap-around. Routed through global shortcuts, View menu, command palette, Settings, schema, and web docs; fixes #2076.
New Features
KeyboardShortcutSettings,web/data/cmux-shortcuts.ts, andweb/data/cmux.schema.jsonupdated; web docs now resolvetext[locale]with ja/en fallback.Bug Fixes
Written for commit 5ab2bfa. Summary will update on new commits.
Summary by CodeRabbit
New Features
Documentation
Tests