Repository navigation
Fix workspace number shortcut rebinding - #5616
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughPrintable-Option-text bypass logic in ChangesOption+digit shortcut bypass and routing fix
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 21 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (21 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 |
|
I built this and can confirm it works |
…-5588-select-workspace-by-number # Conflicts: # Sources/AppDelegate.swift
Resolve AppDelegate.swift conflict in NSWindow.cmux_performKeyEquivalent: combine this PR's conditional Option-text bypass (shouldBypassPrintableOptionTextForShortcutRouting, which lets configured Option+digit workspace/surface shortcuts reach selectWorkspaceByNumber) with main's browserWebKitKeyDownReentry guard. Keep the reentry local at outer scope since later branches reference it. Regenerate .github/swift-file-length-budget.tsv for the merged tree; swift-warning-budget.tsv already matches main. Take main's ghostty submodule pointer (branch did not modify ghostty). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Second sync after main advanced (1df5237 -> baec525). Sources/AppDelegate.swift auto-merged with this PR's Option+digit shortcut routing intact. Regenerate .github/swift-file-length-budget.tsv for the merged tree; warning budget and ghostty pointer match main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Regenerate .github/swift-file-length-budget.tsv via swift_file_length_budget.py (budget respected) - Untrack .claude/scheduled_tasks.lock (local Claude session lock file) and add to .gitignore; resolves CodeRabbit source-control-artifacts finding and removes a recurring merge-churn source Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…kspace-by-number # Conflicts: # .github/swift-file-length-budget.tsv # Sources/AppDelegate.swift # cmux.xcodeproj/project.pbxproj
…kspace-by-number # Conflicts: # .github/swift-file-length-budget.tsv
…kspace-by-number # Conflicts: # .github/swift-file-length-budget.tsv
…empty-workspace-group entrypoints (menu/shortcut/handler) reverted by refactor's AppDelegate/cmuxApp winning the merge
Closes #5588
Summary
selectWorkspaceByNumberwhen workspace digits are rebound toOption+1...9.TabManagerinstead of only the cached app-level manager.Two-commit red to green structure
a0215cf26adds the failing regression test only. On the pre-fix dispatcher,Option+2is consumed by the printable Option-text bypass beforeselectWorkspaceByNumbercan run.fce2dfa60adds the fix, so the regression should go green.Repro notes
On current
origin/main(1c2083178) on macOS 26.4.1, I could not reproduce the defaultCmd+2failure from the issue: both the DEBUG shortcut injector and a real System EventsCmd+2switched fromworkspace:1toworkspace:2, and the terminal did not receive2. The existingtestCmdDigitRoutesToEventWindowWhenActiveManagerIsStalealso already covers the default numbered route.I did reproduce the related route from the issue body:
/Users/austinwang/manaflow/cmuxterm-hq/scripts/reload-cloud.sh --tag issue-5588-select-workspace-by-numberandhttp://127.0.0.1:17320/issue-5588-select-workspace-by-number.workspace:1.set_shortcut workspace_digits opt+1, thensimulate_shortcut opt+2.OK,current-workspacestayedworkspace:1, and noworkspaceDigitaction log appeared.current-workspacebecomesworkspace:2and the debug log showsshortcut.action name=workspaceDigit digit=2followed byws.switch.begin.Verification
/Users/austinwang/manaflow/cmuxterm-hq/scripts/reload-cloud.sh --tag issue-5588-select-workspace-by-numberhttp://127.0.0.1:17320/issue-5588-select-workspace-by-numberCmd+2switchesworkspace:1->workspace:2on the tagged socket.Option+2switchesworkspace:1->workspace:2on the tagged socket.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Fixes workspace and surface number shortcut rebinding so Option+1…9 selects the right target in the focused window instead of typing symbols. Handles Option+digit before the terminal fallback, honors "when" clauses, keeps the WebKit keyDown reentry guard, and avoids work for non-digit keys (closes #5588).
Bug Fixes
Refactors
Written for commit 11cfc2b. Summary will update on new commits.
Summary by CodeRabbit
Release Notes
Bug Fixes
Tests