From 1fe3cf53a7ea192bc1b440dfeb5c6a3b3a75b12d Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sat, 14 Feb 2026 23:53:29 -0800 Subject: [PATCH] Hide PR CTAs on default branch and make git invalidation non-blocking - Only show open/create PR actions after push on non-default branches - Fire git query invalidation without awaiting mutation success handlers - Tweak disabled button classes to keep split-button borders/radii aligned --- apps/web/src/components/GitActionsControl.tsx | 7 ++++--- apps/web/src/lib/gitReactQuery.ts | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) 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={