authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-03-24 16:38:56-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-03-24 23:38:56+00:00
log56d13faa1a0890e34f12852c20bfba6e6d58842c
tree9e68f637518eb7620e9a853175bac250452c083c
parent2a435aef66f6330bec2c4ad87de450cb75467227
signature Signed by PGP key B5690EEEBB952194

Preserve git action progress until HTTP completion (#1388)


1 files changed, 9 insertions(+), 6 deletions(-)

apps/web/src/components/GitActionsControl.tsx+9-6
...@@ -347,13 +347,16 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions...@@ -347,13 +347,16 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions
347 progress.lastOutputLine = null;347 progress.lastOutputLine = null;
348 break;348 break;
349 case "action_finished":349 case "action_finished":
350 progress.phaseStartedAtMs = null;350 // Don't clear timestamps here — the HTTP response handler (line 496)
351 progress.hookStartedAtMs = null;351 // sets activeGitActionProgressRef to null and shows the success toast.
352 break;352 // Clearing timestamps early causes the "Running for Xs" description
353 // to disappear before the success state renders, leaving a bare
354 // "Pushing..." toast in the gap between the WS event and HTTP response.
355 return;
353 case "action_failed":356 case "action_failed":
354 progress.phaseStartedAtMs = null;357 // Same reasoning as action_finished — let the HTTP error handler
355 progress.hookStartedAtMs = null;358 // manage the final toast state to avoid a flash of bare title.
356 break;359 return;
357 }360 }
358361
359 updateActiveProgressToast();362 updateActiveProgressToast();