From 650c9c773b0526279072736495cebf62378c0a1f Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 24 Mar 2026 16:36:16 -0700 Subject: [PATCH] Preserve git action toast progress until HTTP completion - Keep progress timestamps intact on `action_finished` and `action_failed` - Let the HTTP response path clear the active toast so the running description does not flash away --- apps/web/src/components/GitActionsControl.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/web/src/components/GitActionsControl.tsx b/apps/web/src/components/GitActionsControl.tsx index afbc718147..4d563d77fd 100644 --- a/apps/web/src/components/GitActionsControl.tsx +++ b/apps/web/src/components/GitActionsControl.tsx @@ -347,13 +347,16 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions progress.lastOutputLine = null; break; case "action_finished": - progress.phaseStartedAtMs = null; - progress.hookStartedAtMs = null; - break; + // Don't clear timestamps here — the HTTP response handler (line 496) + // sets activeGitActionProgressRef to null and shows the success toast. + // Clearing timestamps early causes the "Running for Xs" description + // to disappear before the success state renders, leaving a bare + // "Pushing..." toast in the gap between the WS event and HTTP response. + return; case "action_failed": - progress.phaseStartedAtMs = null; - progress.hookStartedAtMs = null; - break; + // Same reasoning as action_finished — let the HTTP error handler + // manage the final toast state to avoid a flash of bare title. + return; } updateActiveProgressToast();