From ab6db27ea7b6cf01281402f4aae44b66e577bd98 Mon Sep 17 00:00:00 2001 From: tisonhuang Date: Wed, 4 Mar 2026 20:36:03 +0800 Subject: [PATCH] fix(export): show completed sessions progress in task card --- src/pages/ExportPage.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/pages/ExportPage.tsx b/src/pages/ExportPage.tsx index 8aa55ea..c12ef10 100644 --- a/src/pages/ExportPage.tsx +++ b/src/pages/ExportPage.tsx @@ -871,6 +871,13 @@ const TaskCenterModal = memo(function TaskCenterModal({ const normalizedProgressCurrent = normalizedProgressTotal > 0 ? Math.max(0, Math.min(normalizedProgressTotal, task.progress.current)) : 0 + const completedSessionTotal = normalizedProgressTotal > 0 + ? normalizedProgressTotal + : task.payload.sessionIds.length + const completedSessionCount = Math.min( + completedSessionTotal, + (task.settledSessionIds || []).length + ) const currentSessionRatio = task.progress.phaseTotal > 0 ? Math.max(0, Math.min(1, task.progress.phaseProgress / task.progress.phaseTotal)) : null @@ -891,8 +898,8 @@ const TaskCenterModal = memo(function TaskCenterModal({ />
- {normalizedProgressTotal > 0 - ? `${Math.floor(normalizedProgressCurrent)} / ${normalizedProgressTotal}` + {completedSessionTotal > 0 + ? `已完成 ${completedSessionCount} / ${completedSessionTotal}` : '处理中'} {task.status === 'running' && currentSessionRatio !== null ? `(当前会话 ${Math.round(currentSessionRatio * 100)}%)`