Repository navigation
Conversation
Use the existing createPR mutation instead of manually constructing URLs. This matches the button behavior and handles pushing unpushed branches.
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds a workspace-level hotkey (meta+shift+p) that opens the workspace's GitHub PR URL if present, or creates a PR (pushing if required) and opens its URL; wires mutations/usePRStatus and shows success/error toasts. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant HotkeyHandler as Hotkey Handler
participant WorkspacePage as Workspace Page
participant PRStatus as PR Status Hook
participant CreatePR as createPR Mutation
participant OpenURL as openUrl Mutation
participant Toast as Toast Notification
User->>HotkeyHandler: Press meta+shift+p
HotkeyHandler->>WorkspacePage: trigger OPEN_GITHUB_PR
WorkspacePage->>PRStatus: read PR status (usePRStatus)
PRStatus-->>WorkspacePage: returns pr?.url (or null)
alt PR URL exists
WorkspacePage->>OpenURL: openUrl(pr.url)
OpenURL-->>Toast: success toast rgba(76,175,80,0.5)
else No PR URL
alt workspace.worktreePath exists
WorkspacePage->>CreatePR: createPR(worktreePath)
CreatePR-->>WorkspacePage: returns compareUrl
WorkspacePage->>OpenURL: openUrl(compareUrl)
OpenURL-->>Toast: success toast rgba(76,175,80,0.5)
else No worktreePath
WorkspacePage-->>Toast: error toast rgba(244,67,54,0.5)
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Failure to add the new IP will result in interrupted reviews. 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 |
Kitenite
left a comment
There was a problem hiding this comment.
CMD+Shift+R is the hard refresh shortcut for chrome (good for some debugging). Is there any other command you'd prefer?
Avoids conflict with Chrome hard refresh (⌘⇧R)
Fair enough - could move it to something like (⌘P for PR). Technically this would be print, but afaik there wont ever really be a print in this app. And really we are printing to a PR :P |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/`$workspaceId/page.tsx:
- Around line 244-248: The openUrl mutation
(electronTrpc.external.openUrl.useMutation) lacks error handling so failures are
silent; update its useMutation call to provide an onError handler that surfaces
the failure (e.g., call toast.error with a descriptive message including
error.message) and/or log the error via console.error or processLogger to ensure
visibility to the user and logs.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/`$workspaceId/page.tsx:
- Around line 244-253: The createPR mutation currently only shows a toast on
error and openUrl uses a nonstandard log prefix; update both onError handlers to
log errors with the standardized prefix and context. In the
electronTrpc.external.openUrl.useMutation onError replace the console.error line
with a prefixed message like "[external/openUrl] Failed to open URL:" plus the
error object, and in electronTrpc.changes.createPR.useMutation add a
console.error call that logs with prefix "[changes/createPR] Failed to create
PR:" along with the error (while keeping the existing toast behavior). Ensure
you reference the existing openUrl and createPR mutation handlers so the change
is localized to their onError callbacks.
045e93f to
0f75d1b
Compare
|
My concern is it's not a very common action. Do you think it might be better if we ship a similar button to the PR button in Conductor instead? |
As in like this so ⌘⇧P with the below button updated? Pre-superset days I would use GitHub Desktop as it had some nice built in shortcuts for merging, pushing, PRing - only one missing right now is this shortcut. ⌘⇧P is fine by me if you want to make it less prominent Converting this button into a general create PR action would also be pretty sweet if In GH Desktop this shortcuts serves to view your PR (or create it if it doesn't presently exist) |
|
Just downloaded Conductor to see how that button worked and it is doing way too much LOL |
…component Move PR actions out of the commit dropdown into a standalone split-button with hotkey display, copy URL support, and the openUrl mutation. Update the GitHub PR shortcut from ⌘P to ⌘⇧P to avoid conflicts.

Summary
⌘⇧Rto quickly open or create a GitHub PR from the current workspace⌘Rbut that is presently taken by the refresh commandBehavior
Test plan
⌘⇧R→ should open the PR in browser⌘⇧R→ should create PR and open GitHub compare pageSummary by CodeRabbit