History

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.

Cursor Agent committed 7 months ago

Commit c2725621 parent c0c8c5c2 files · +4 −4Browse files

Unified · Split

2 files
  1. apps/web/src/components/GitActionsControl.logic.test.ts +2 −2
  2. apps/web/src/components/GitActionsControl.logic.ts +2 −2
apps/web/src/components/GitActionsControl.logic.test.ts+2−2
@@ -440,7 +440,7 @@ describe("when: on default branch without open PR", () => { · 439 unmodified lines
440440 );
441441 assert.deepInclude(quick, {
442442 kind: "run_action",
443− action: "commit_push",
443+ action: "push",
444444 label: "Push",
445445 disabled: false,
446446 });
@@ -754,7 +754,7 @@ describe("when: branch has no upstream configured", () => { · 307 unmodified lines
754754 );
755755 assert.deepInclude(quick, {
756756 kind: "run_action",
757− action: "commit_push",
757+ action: "push",
758758 label: "Push",
759759 disabled: false,
760760 });
apps/web/src/components/GitActionsControl.logic.ts+2−2
@@ -214,7 +214,7 @@ export function resolveQuickAction( · 213 unmodified lines
214214 label: "Push",
215215 disabled: false,
216216 kind: "run_action",
217− action: isDefaultBranch ? "commit_push" : "push",
217+ action: "push",
218218 };
219219 }
220220 return {
@@ -248,7 +248,7 @@ export function resolveQuickAction( · 27 unmodified lines
248248 label: "Push",
249249 disabled: false,
250250 kind: "run_action",
251− action: isDefaultBranch ? "commit_push" : "push",
251+ action: "push",
252252 };
253253 }
254254 return {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t