@devries-cameron20 / t3code-1 / commits / 09ac18db82
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Refactor PR opening logic in GitActionsControl component

- Simplify the promise handling for opening PR links by directly using `void api.shell.openExternal(prUrl).catch(...)` - Enhance error handling by adding a toast notification for failure cases, improving user feedback on PR link issues

Julius Marminge committed Feb 17, 2026 at 16:08 UTC 09ac18db8204e0057a6cf0f73424e4345f2070ab
1 file changed +4 -7
apps/web/src/components/GitActionsControl.tsx
+4 -7
@@ -226,17 +226,14 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp
226 });
227 return;
228 }
229 - const promise = api.shell.openExternal(prUrl);
230 - toastManager.promise(promise, {
231 - loading: { title: "Opening PR...", data: threadToastData },
232 - success: { title: "PR opened", data: threadToastData },
233 - error: (err) => ({
229 + void api.shell.openExternal(prUrl).catch((err) => {
230 + toastManager.add({
231 + type: "error",
232 title: "Unable to open PR link",
233 description: err instanceof Error ? err.message : "An error occurred.",
234 data: threadToastData,
237 - }),
235 + });
236 });
239 - void promise.catch(() => undefined);
237 }, [api, gitStatusForActions?.openPr?.url, threadToastData]);
238
239 const runGitActionWithToast = useCallback(