From c27256209082f36e4bb0c3183c7ca52158befdaf Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 1 Apr 2026 23:16:03 +0000 Subject: [PATCH] fix: use 'push' instead of 'commit_push' for clean working tree on default branch When isDefaultBranch is true and there are no working tree changes, resolveQuickAction was returning action 'commit_push' instead of 'push'. This caused unnecessary commit resolution steps (staging, diff context, AI commit message generation) only to discover there's nothing to commit. The dedicated 'push' action was introduced precisely for this case and requiresDefaultBranchConfirmation already handles it correctly. --- apps/web/src/components/GitActionsControl.logic.test.ts | 4 ++-- apps/web/src/components/GitActionsControl.logic.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/GitActionsControl.logic.test.ts b/apps/web/src/components/GitActionsControl.logic.test.ts index f21c924c79..53c7f8672d 100644 --- a/apps/web/src/components/GitActionsControl.logic.test.ts +++ b/apps/web/src/components/GitActionsControl.logic.test.ts @@ -440,7 +440,7 @@ describe("when: on default branch without open PR", () => { ); assert.deepInclude(quick, { kind: "run_action", - action: "commit_push", + action: "push", label: "Push", disabled: false, }); @@ -754,7 +754,7 @@ describe("when: branch has no upstream configured", () => { ); assert.deepInclude(quick, { kind: "run_action", - action: "commit_push", + action: "push", label: "Push", disabled: false, }); diff --git a/apps/web/src/components/GitActionsControl.logic.ts b/apps/web/src/components/GitActionsControl.logic.ts index 80906a982b..02b3d2eff0 100644 --- a/apps/web/src/components/GitActionsControl.logic.ts +++ b/apps/web/src/components/GitActionsControl.logic.ts @@ -214,7 +214,7 @@ export function resolveQuickAction( label: "Push", disabled: false, kind: "run_action", - action: isDefaultBranch ? "commit_push" : "push", + action: "push", }; } return { @@ -248,7 +248,7 @@ export function resolveQuickAction( label: "Push", disabled: false, kind: "run_action", - action: isDefaultBranch ? "commit_push" : "push", + action: "push", }; } return {