From 56d13faa1a0890e34f12852c20bfba6e6d58842c Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 24 Mar 2026 16:38:56 -0700 Subject: [PATCH] Preserve git action progress until HTTP completion (#1388) --- 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 afbc718147444439a74fde0f0d23e102ec5bea34..4d563d77fdc58f46ee701f75beba5c481da68abf 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(); -- 2.54.0