Repository navigation
Fix Ghostty keybindings for workspace navigation (#135) - #4027
austinywang wants to merge 10 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughAdds Page Up/Page Down as canonical shortcut keys (parsing, key-code mapping, localization, and schema), extends AppDelegate to read and store Ghostty previous/next tab triggers, routes Ghostty tab-navigation into workspace selection while preserving cmux surface-navigation authority, and adds unit/integration tests for parsing, recording, and Ghostty routing. ChangesPage Up/Page Down and Ghostty Tab Navigation
🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
Poem
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (14 passed)
✨ 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 SummaryRoutes Ghostty
Confidence Score: 5/5Safe to merge; the routing guard correctly prevents Ghostty defaults from stealing cmux surface shortcuts, the page key matching path is consistent across all call sites, and all 19 locales are covered. The change is well-scoped: new shortcut slots are wired through every layer (recording, parsing, key-code lookup, direct-match flag, schema, and localization) in a consistent way, regression tests cover both the arrow-key and page-key routing paths, and the surface-navigation guard correctly preserves cmux priority. Sources/AppDelegate.swift — the startup call to refreshGhosttyNavigationShortcuts is wrapped in MainActor.assumeIsolated unnecessarily; cmuxTests/AppDelegateShortcutRoutingTests.swift — the new withTemporaryGhosttyConfig helper uses process-global setenv with a 50 ms RunLoop gate. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[NSEvent keyDown] --> B{matchConfiguredShortcut nextSidebarTab or prevSidebarTab?}
B -- yes --> C[Route to workspace nav]
B -- no --> D{shouldRouteGhosttyTabNavShortcut?}
D --> E{matchShortcut with ghosttyNextTab or ghosttyPrevTab?}
E -- no or shortcut nil --> F[Pass event through]
E -- yes --> G{matchConfiguredShortcut nextSurface or prevSurface?}
G -- yes cmux owns it --> F
G -- no --> C
subgraph Boot and reload
H[App launch or ghosttyConfigDidReload] --> I[refreshGhosttyNavigationShortcuts]
I --> J[storedShortcutFromGhosttyTrigger for each goto_split and tab action]
end
Reviews (6): Last reviewed commit: "fix: localize page key labels" | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Resources/Localizable.xcstrings`:
- Around line 83436-83441: Update the Japanese localization entries for the
keyboard shortcuts shortcut.key.pageUp and shortcut.key.pageDown by replacing
the English values "Page Up" and "Page Down" in the "ja" stringUnit.value fields
with the correct Japanese translations "ページアップ" and "ページダウン" respectively so
they match the other translated key names in the localization file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 59ceeab9-042e-4bfd-bd6f-9bef249b69d7
📒 Files selected for processing (7)
Resources/Localizable.xcstringsSources/AppDelegate.swiftSources/KeyboardShortcutSettings.swiftcmuxTests/AppDelegateShortcutRoutingTests.swiftcmuxTests/KeyboardShortcutSpaceKeyTests.swiftcmuxTests/WorkspaceUnitTests.swiftweb/data/cmux.schema.json
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 7acfc85. Configure here.

Closes #135
Summary
Tests
Note
Medium Risk
Changes global shortcut routing and Ghostty config integration; conflict rules with surface navigation must stay correct to avoid surprising tab/surface behavior.
Overview
Ghostty
previous_tab/next_tabkeybinds from the Ghostty config now drive cmux workspace prev/next tab when they do not collide with cmux’s own surface shortcuts (Cmd+Shift+[/]). Shortcut reload is renamed torefreshGhosttyNavigationShortcuts, loads those two triggers, maps Page Up/Down from Ghostty physical keys (with key codes 116/121), and refreshes on the MainActor.Page Up and Page Down are supported end-to-end in the shortcut stack: recording, parsing, display, direct key-code matching,
cmux.schema.json, and localized labels. Regression tests cover Ghostty tab routing (Cmd+Opt+arrows, Ctrl+Page Up/Down) and page-key parsing/recording.Reviewed by Cursor Bugbot for commit 3da86d7. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Routes Ghostty
previous_tab/next_tabkeybindings to cmux workspace navigation and adds first-class Page Up/Down support and labels. Fixes #135; keeps cmux surface shortcuts (Cmd+Shift+[/]) authoritative and runs Ghostty config reload/observers on the MainActor.Bug Fixes
New Features
web/data/cmux.schema.json.Written for commit 3da86d7. Summary will update on new commits. Review in cubic
Summary by CodeRabbit
New Features
Tests
Localization