From 525980c14cc5f0f27a034cd207c74fc5fbc0f0e7 Mon Sep 17 00:00:00 2001 From: bytecii Date: Tue, 24 Feb 2026 03:34:17 -0800 Subject: [PATCH] update --- src/store/chatStore.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/store/chatStore.ts b/src/store/chatStore.ts index 45924a6e..cf7dead3 100644 --- a/src/store/chatStore.ts +++ b/src/store/chatStore.ts @@ -2711,11 +2711,15 @@ const chatStore = (initial?: Partial) => (task) => task.content !== '' ); setTaskInfo(taskId, taskInfo); - // Sync taskRunning with the filtered taskInfo (user edits should be reflected - setTaskRunning( - taskId, - taskInfo.map((task) => ({ ...task })) - ); + // Sync taskRunning with the filtered taskInfo (user edits should be reflected). + // Skip for replay: taskRunning already reflects the completed state from playback + // and resetting it would revert the Done counters back to Pending. + if (!type) { + setTaskRunning( + taskId, + taskInfo.map((task) => ({ ...task })) + ); + } // IMPORTANT: Set isConfirm BEFORE sending API requests to prevent race condition // where backend sends to_sub_tasks SSE event before we mark task as confirmed