Conversation
Navigate to the previous/next workspace using Cmd+Up and Cmd+Down arrows, wrapping around at the edges. Shortcuts are also exposed in the Workspace menu for discoverability.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds two workspace navigation commands and keyboard shortcuts (Command+UpArrow, Command+DownArrow) plus shortcut handling and manager methods to cycle selection to the previous/next workspace with wraparound; commands are disabled when there is ≤1 workspace. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant AppCommands as ShellraiserApp.Commands
participant Shortcuts as WorkspaceManager+Shortcuts
participant Manager as WorkspaceManager
participant Window as Window/Sidebar
User->>AppCommands: Press Cmd+Up / Cmd+Down
AppCommands->>Shortcuts: Deliver key event
Shortcuts->>Shortcuts: Check modifiers (Command-only) and keyCode
alt Cmd+Up/Down matched
Shortcuts->>Manager: selectPreviousWorkspace() / selectNextWorkspace()
Manager->>Window: read workspaces & selectedWorkspaceId
Manager->>Manager: compute wrapped target index
Manager->>Window: selectWorkspace(targetId)
Window->>AppCommands: UI selection updates
else Not matched
Shortcuts->>Shortcuts: fallback handling / ignore
end
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
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/Shellraiser/Services/Workspaces/WorkspaceManager`+Shortcuts.swift:
- Around line 59-70: The handler currently always returns true for Cmd+Up/Down
even when no workspace switch occurs, swallowing the event; modify the logic
around hasCommand/... and the keyCode switch to only claim the event when a
workspace change actually happened — either make selectPreviousWorkspace() and
selectNextWorkspace() return a Bool indicating success and return that Bool, or
check workspace count/validity before calling and only return true if a switch
occurred; update the switch branch for event.keyCode and the surrounding
condition to consult that success value before returning true.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 661913eb-5b86-45b4-afcf-b86c8b8791ae
📒 Files selected for processing (3)
Sources/Shellraiser/App/ShellraiserApp.swiftSources/Shellraiser/Services/Workspaces/WorkspaceManager+Shortcuts.swiftSources/Shellraiser/Services/Workspaces/WorkspaceManager+WorkspaceLifecycle.swift
Return Bool from selectPreviousWorkspace/selectNextWorkspace so the shortcut handler only consumes the event when a switch actually happened — e.g. with a single workspace the key is now passed through to the terminal.
Navigate to the previous/next workspace using Cmd+Up and Cmd+Down arrows, wrapping around at the edges. Shortcuts are also exposed in the Workspace menu for discoverability.
Summary by CodeRabbit