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 ;