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.

Refactor PR opening logic in GitActionsControl component

Julius Marminge09ac18db8204
diff --git a/apps/web/src/components/GitActionsControl.tsx b/apps/web/src/components/GitActionsControl.tsx
index e30ff30df..68599e0aa 100644
--- a/apps/web/src/components/GitActionsControl.tsx
+++ b/apps/web/src/components/GitActionsControl.tsx
@@ -226,17 +226,14 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp
});
return;
}
- const promise = api.shell.openExternal(prUrl);
- toastManager.promise(promise, {
- loading: { title: "Opening PR...", data: threadToastData },
- success: { title: "PR opened", data: threadToastData },
- error: (err) => ({
+ void api.shell.openExternal(prUrl).catch((err) => {
+ toastManager.add({
+ type: "error",
title: "Unable to open PR link",
description: err instanceof Error ? err.message : "An error occurred.",
data: threadToastData,
- }),
+ });
});
- void promise.catch(() => undefined);
}, [api, gitStatusForActions?.openPr?.url, threadToastData]);
const runGitActionWithToast = useCallback(