fix(keybinding): allow remapping Cmd+R captured by View menu - #1734
BillionClaw wants to merge 2 commits into
Conversation
Make the 'Reload Page' shortcut configurable so users can remap or unbind it. Previously, Cmd+R was hardcoded on the View menu, preventing it from reaching terminal applications like Neovim. Changes: - Add reloadPage action to KeyboardShortcutSettings with default Cmd+R - Change menu item to use configurable shortcut instead of hardcoded one - Add handleCustomShortcut handling to only reload when browser is focused, passing the key through to terminal apps otherwise Fixes manaflow-ai#1708
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
@BillionClaw is attempting to deploy a commit to the Manaflow Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a configurable "Reload Page" keyboard shortcut (default Cmd+R) and routes it conditionally: if a browser panel is focused the app consumes the shortcut and reloads the page; otherwise the shortcut is not consumed so terminal apps can receive it. Changes
Sequence DiagramsequenceDiagram
participant User
participant AppDelegate
participant KeyboardShortcutSettings
participant BrowserPanel
participant TerminalApp
User->>AppDelegate: Press Reload shortcut (e.g., Cmd+R)
AppDelegate->>KeyboardShortcutSettings: Does event match reloadPage?
alt matches reloadPage
AppDelegate->>BrowserPanel: Is browser panel focused?
alt browser focused
AppDelegate->>BrowserPanel: browserPanel.reload()
BrowserPanel-->>AppDelegate: reload started
AppDelegate-->>User: Event consumed
else not browser
AppDelegate-->>TerminalApp: Let event pass through
TerminalApp-->>User: Terminal receives keypress
end
else not a reload shortcut
AppDelegate-->>User: Handle other shortcuts
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Sources/KeyboardShortcutSettings.swift`:
- Line 78: KeyboardShortcutSettings.swift references the new enum case
.reloadPage which uses the localization key "shortcut.reloadPage.label"; add
that key to Resources/Localizable.xcstrings with both English and Japanese
entries following the same pattern as the other shortcut keys (e.g., provide
"Reload Page" for English and the appropriate Japanese translation) so the
lookup in KeyboardShortcutSettings (case .reloadPage) resolves correctly at
runtime.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5f1f97b6-8e5b-495e-8aad-888d95450b23
📒 Files selected for processing (3)
Sources/AppDelegate.swiftSources/KeyboardShortcutSettings.swiftSources/cmuxApp.swift
|
This is BillionClaw. Happy to discuss the approach or make adjustments to the fix. |
|
Closing per repository blocklist: maintainer threatened to ban. All submissions to this repo have been suspended. |
Fixes #1708
Cmd+R was captured by the View menu's 'Reload Page' action and could not be remapped or passed to terminal applications like Neovim.
This change makes the 'Reload Page' shortcut configurable via KeyboardShortcutSettings:
Changes:
Summary by cubic
Make the “Reload Page” shortcut configurable and only trigger it when the in-app browser is focused. Users can remap or clear Cmd+R so terminal apps (e.g., Neovim) can receive it.
New Features
reloadPagetoKeyboardShortcutSettings(default Cmd+R); users can remap or clear it.Bug Fixes
Written for commit 6184465. Summary will update on new commits.
Summary by CodeRabbit