diff --git a/apps/web/src/components/GitActionsControl.tsx b/apps/web/src/components/GitActionsControl.tsx index 27d9bb68ced5a6f98f507ecb7f1e268ed651dc00..c9c84f41bba60a552062784be0a2a564c819a7ee 100644 --- a/apps/web/src/components/GitActionsControl.tsx +++ b/apps/web/src/components/GitActionsControl.tsx @@ -272,9 +272,9 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp const prUrl = result.pr.url ?? gitStatus?.openPr?.url; const shouldOfferPushCta = action === "commit" && result.commit.status === "created"; const shouldOfferOpenPrCta = - (action === "commit_push" || action === "commit_push_pr") && !!prUrl; + (action === "commit_push" || action === "commit_push_pr") && !!prUrl && !isDefaultBranch; const shouldOfferCreatePrCta = - action === "commit_push" && !prUrl && result.push.status === "pushed"; + action === "commit_push" && !prUrl && result.push.status === "pushed" && !isDefaultBranch; const closeResultToast = () => { toastManager.close(progressToastId); }; @@ -329,6 +329,7 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp api, gitStatus?.hasWorkingTreeChanges, gitStatus?.openPr?.url, + isDefaultBranch, maybeConfirmPushToDefaultBranch, runImmediateGitActionMutation, setActiveDialogAction, @@ -449,7 +450,7 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp render={