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.

Close result toast only after push confirmation

Julius Marmingecce74f913c03
diff --git a/apps/web/src/components/GitActionsControl.tsx b/apps/web/src/components/GitActionsControl.tsx
index 49d3d82a9..c189145cf 100644
--- a/apps/web/src/components/GitActionsControl.tsx
+++ b/apps/web/src/components/GitActionsControl.tsx
@@ -215,13 +215,16 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp
action,
commitMessage,
forcePushOnlyProgress = false,
+ onConfirmed,
}: {
action: GitStackedAction;
commitMessage?: string;
forcePushOnlyProgress?: boolean;
+ onConfirmed?: () => void;
}) => {
const confirmed = await maybeConfirmPushToDefaultBranch(action);
if (!confirmed) return;
+ onConfirmed?.();
const progressStages = buildGitActionProgressStages({
action,
@@ -274,19 +277,19 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp
title: resultToast.title,
description: resultToast.description,
timeout: 0,
- ...(shouldOfferPushCta
- ? {
- actionProps: {
- children: "Push",
- onClick: () => {
- closeResultToast();
- void runGitActionWithToast({
- action: "commit_push",
- forcePushOnlyProgress: true,
- });
- },
- },
- }
+ ...(shouldOfferPushCta
+ ? {
+ actionProps: {
+ children: "Push",
+ onClick: () => {
+ void runGitActionWithToast({
+ action: "commit_push",
+ forcePushOnlyProgress: true,
+ onConfirmed: closeResultToast,
+ });
+ },
+ },
+ }
: shouldOfferOpenPrCta
? {
actionProps: {