diff --git a/apps/desktop/scripts/dev-electron.mjs b/apps/desktop/scripts/dev-electron.mjs
index dacbb99c668b2205762b5955a5486d725778b5b2..be7d8380fb7172b0d35436d3e8b4a714f3d13810 100644
--- a/apps/desktop/scripts/dev-electron.mjs
+++ b/apps/desktop/scripts/dev-electron.mjs
@@ -15,10 +15,13 @@ await waitOn({
});
const command = process.platform === "win32" ? "electronmon.cmd" : "electronmon";
+const childEnv = { ...process.env };
+delete childEnv.ELECTRON_RUN_AS_NODE;
+
const child = spawn(command, ["dist-electron/main.js"], {
stdio: "inherit",
env: {
- ...process.env,
+ ...childEnv,
VITE_DEV_SERVER_URL: devServerUrl,
},
});
diff --git a/apps/web/src/components/GitActionsControl.tsx b/apps/web/src/components/GitActionsControl.tsx
index 28ed5eeb5d8ba1371f8c0b25476135e20bcd9d8a..1da8325b823acb21942fb273f8d7a4a580b4e19d 100644
--- a/apps/web/src/components/GitActionsControl.tsx
+++ b/apps/web/src/components/GitActionsControl.tsx
@@ -8,11 +8,9 @@ import { queryOptions, useMutation, useQuery, useQueryClient } from "@tanstack/r
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import {
CheckIcon,
- CircleIcon,
CloudUploadIcon,
GitCommitIcon,
Loader2Icon,
- MinusIcon,
XIcon,
} from "lucide-react";
import { GitHubIcon } from "./Icons";
@@ -64,20 +62,11 @@ function GitActionIcon(props: { icon: GitActionIconName; disabled: boolean }) {
return ;
}
-function GitProgressStatusIcon(props: { status: GitProgressStepStatus }) {
- if (props.status === "running") {
- return ;
- }
- if (props.status === "completed") {
- return ;
- }
- if (props.status === "skipped") {
- return ;
- }
- if (props.status === "failed") {
- return ;
- }
- return ;
+function runningStepMessage(stepId: GitProgressStep["id"]): string {
+ if (stepId === "generate") return "Generating commit message...";
+ if (stepId === "commit") return "Committing changes...";
+ if (stepId === "push") return "Pushing branch...";
+ return "Preparing pull request...";
}
function gitActionModalTitle(): string {
@@ -315,6 +304,20 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp
gitModalProgress.length > 0 ||
gitModalError !== null ||
gitModalResult !== null);
+ const activeGitProgressStep = useMemo(
+ () => gitModalProgress.find((step) => step.status === "running") ?? null,
+ [gitModalProgress],
+ );
+ const gitProgressToastStatus = isGitModalActionRunning
+ ? "running"
+ : gitModalError
+ ? "failed"
+ : "done";
+ const gitProgressToastMessage = isGitModalActionRunning
+ ? runningStepMessage(activeGitProgressStep?.id ?? "commit")
+ : gitModalError
+ ? "Git action failed."
+ : "Done.";
const refreshGitStatus = useCallback(async () => {
if (!api || !gitCwd) return;
@@ -803,92 +806,40 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp
{showGitProgressToast && (
-
-
-
-
- Git actions
-
-
- {isGitModalActionRunning
- ? "Running action..."
- : gitModalError
- ? "Action failed"
- : "Action complete"}
-
-
-
-
- {gitModalProgress.length > 0 && (
-
- {gitModalProgress.map((step, index) => {
- const borderClass =
- index < gitModalProgress.length - 1 ? "border-b border-border/70" : "";
-
- return (
-
-
-
-
-
-
{step.label}
- {step.detail && (
-
- {step.detail}
-
- )}
-
-
- );
- })}
-
- )}
- {gitModalError && (
-
- {gitModalError}
-
- )}
-
- {!isGitModalActionRunning && gitModalResult && gitProgressToastOpenPrUrl && (
-
+
+
+ {gitProgressToastStatus === "running" ? (
+
+ ) : gitProgressToastStatus === "failed" ? (
+
+ ) : (
+
)}
+
+ {gitProgressToastMessage}
+ {!isGitModalActionRunning && gitModalResult && gitProgressToastOpenPrUrl && (
-
+ )}
+
)}