From f5affd74d7dc9cc523481facdec7661697905c44 Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Tue, 20 Jan 2026 20:32:37 -0800 Subject: [PATCH] feat(desktop): open create PR link after publishing branch Automatically opens the GitHub PR creation page when a user publishes a branch for the first time, streamlining the PR workflow. --- .../components/CommitInput/CommitInput.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/ChangesView/components/CommitInput/CommitInput.tsx b/apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/ChangesView/components/CommitInput/CommitInput.tsx index 5ffa60369f0..5f363a251c5 100644 --- a/apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/ChangesView/components/CommitInput/CommitInput.tsx +++ b/apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/ChangesView/components/CommitInput/CommitInput.tsx @@ -102,8 +102,19 @@ export function CommitInput({ commitMutation.mutate({ worktreePath, message: commitMessage.trim() }); }; - const handlePush = () => - pushMutation.mutate({ worktreePath, setUpstream: true }); + const handlePush = () => { + const isPublishing = !hasUpstream; + pushMutation.mutate( + { worktreePath, setUpstream: true }, + { + onSuccess: () => { + if (isPublishing) { + createPRMutation.mutate({ worktreePath }); + } + }, + }, + ); + }; const handlePull = () => pullMutation.mutate({ worktreePath }); const handleSync = () => syncMutation.mutate({ worktreePath }); const handleCreatePR = () => createPRMutation.mutate({ worktreePath });