Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

Scope default-branch PR confirmation to full stack

Julius Marmingee4df6fcf8e90
diff --git a/apps/web/src/components/GitActionsControl.logic.test.ts b/apps/web/src/components/GitActionsControl.logic.test.ts
index 451f496fb..628f2f359 100644
--- a/apps/web/src/components/GitActionsControl.logic.test.ts
+++ b/apps/web/src/components/GitActionsControl.logic.test.ts
@@ -737,10 +737,10 @@ describe("when: branch has no upstream configured", () => {
});
describe("requiresDefaultBranchConfirmation", () => {
- it("requires confirmation only for direct push on default branch", () => {
+ it("requires confirmation for push actions on default branch", () => {
assert.isFalse(requiresDefaultBranchConfirmation("commit", true));
assert.isTrue(requiresDefaultBranchConfirmation("commit_push", true));
- assert.isFalse(requiresDefaultBranchConfirmation("commit_push_pr", true));
+ assert.isTrue(requiresDefaultBranchConfirmation("commit_push_pr", true));
assert.isFalse(requiresDefaultBranchConfirmation("commit_push", false));
});
});
diff --git a/apps/web/src/components/GitActionsControl.logic.ts b/apps/web/src/components/GitActionsControl.logic.ts
index d752a90ce..9a9476e4c 100644
--- a/apps/web/src/components/GitActionsControl.logic.ts
+++ b/apps/web/src/components/GitActionsControl.logic.ts
@@ -282,7 +282,7 @@ export function requiresDefaultBranchConfirmation(
isDefaultBranch: boolean,
): boolean {
if (!isDefaultBranch) return false;
- return action === "commit_push";
+ return action === "commit_push" || action === "commit_push_pr";
}
export function resolveDefaultBranchActionDialogCopy(input: {
diff --git a/apps/web/src/components/GitActionsControl.tsx b/apps/web/src/components/GitActionsControl.tsx
index 216e123c8..f0819bb22 100644
--- a/apps/web/src/components/GitActionsControl.tsx
+++ b/apps/web/src/components/GitActionsControl.tsx
@@ -347,6 +347,7 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions
action: "commit_push",
forcePushOnlyProgress: true,
onConfirmed: closeResultToast,
+ featureBranch,
});
},
},
@@ -372,6 +373,7 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions
void runGitActionWithToast({
action: "commit_push_pr",
forcePushOnlyProgress: true,
+ featureBranch,
});
},
},