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.
This commit is contained in:
Cursor Agent committed 2026-04-01 23:16:03 +00:00
1 parent c0c8c5c1d7
commit c272562090
2 files changed
+4 -4

No files matched your search

@@ -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,
});
@@ -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 {