From aa42ed5c7a7f661f17ee81fbfb83adbca6923cd8 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Mon, 18 May 2026 11:54:19 +0800 Subject: [PATCH] auto-sync: 2026-05-18 11:54:19 --- src/frontend/src/components/EdictBoard.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/frontend/src/components/EdictBoard.tsx b/src/frontend/src/components/EdictBoard.tsx index b3c7986..5a091cb 100644 --- a/src/frontend/src/components/EdictBoard.tsx +++ b/src/frontend/src/components/EdictBoard.tsx @@ -281,6 +281,19 @@ export default function EdictBoard() { { key: 'blocked', label: '阻塞', icon: '🚧' }, ]; + // 构建子 Task 索引:parent_id → { total, done, activeStage } + const subtaskIndex: Record = {}; + tasks.forEach(t => { + if (t.parent_task) { + if (!subtaskIndex[t.parent_task]) subtaskIndex[t.parent_task] = { total: 0, done: 0, activeStage: null }; + subtaskIndex[t.parent_task].total++; + if (t.status === 'done') subtaskIndex[t.parent_task].done++; + if (['working', 'claimed', 'review'].includes(t.status) && !subtaskIndex[t.parent_task].activeStage) { + subtaskIndex[t.parent_task].activeStage = t.stage || t.status; + } + } + }); + let filtered = tasks.filter(t => !t.parent_task); // 只显示顶层 Task if (statusFilter !== 'all') filtered = filtered.filter(t => t.status === statusFilter); if (searchQuery.trim()) {