From 7f0c95cbe6cde1635d108d7e09d95534aba72641 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sat, 23 May 2026 12:41:22 +0800 Subject: [PATCH] auto-sync: 2026-05-23 12:41:22 --- src/frontend/src/components/EdictBoard.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/components/EdictBoard.tsx b/src/frontend/src/components/EdictBoard.tsx index 569bfda..ca4e677 100644 --- a/src/frontend/src/components/EdictBoard.tsx +++ b/src/frontend/src/components/EdictBoard.tsx @@ -417,10 +417,12 @@ export default function EdictBoard() { const counts: Record = { all: topLevelTasks.length }; topLevelTasks.forEach(t => { counts[t.status] = (counts[t.status] || 0) + 1; }); - const activeCount = topLevelTasks.filter(t => !t.archived).length; - const doneCount = topLevelTasks.filter(t => t.status === 'done').length; - const failedCount = topLevelTasks.filter(t => ['failed', 'blocked'].includes(t.status)).length; - const reviewCount = topLevelTasks.filter(t => t.status === 'review').length; + // 统计始终基于未归档的非终态任务(不受 archiveFilter 影响) + const activeTasks = topLevelTasks.filter(t => !t.archived && !['done','cancelled'].includes(t.status)); + const activeCount = activeTasks.length; + const doneCount = topLevelTasks.filter(t => !t.archived && t.status === 'done').length; + const failedCount = topLevelTasks.filter(t => !t.archived && ['failed', 'blocked'].includes(t.status)).length; + const reviewCount = topLevelTasks.filter(t => !t.archived && t.status === 'review').length; const archivedCount = topLevelTasks.filter(t => t.archived).length; if (v2tasksLoading && tasks.length === 0) return ;