diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 9f625762c..53424e24e 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -1899,15 +1899,18 @@ export default function ChatView({ threadId }: ChatViewProps) { ? (draftThread?.envMode ?? "local") : "local"; + const shouldTickNow = !!activeWorkStartedAt && (isWorking || !latestTurnSettled); + useEffect(() => { - if (phase !== "running") return; + if (!shouldTickNow) return; + setNowTick(Date.now()); const timer = window.setInterval(() => { setNowTick(Date.now()); }, 1000); return () => { window.clearInterval(timer); }; - }, [phase]); + }, [shouldTickNow]); const beginSendPhase = useCallback((nextPhase: Exclude) => { setSendStartedAt((current) => current ?? new Date().toISOString());