From 1edd872c554f666ba43353da7e6f0605ecec311b Mon Sep 17 00:00:00 2001 From: weichen Date: Mon, 12 Oct 2026 07:45:08 +0000 Subject: [PATCH] Prefer progress cards over duplicate CurrentTaskCard Why: When a slow-lane progress card is active, hide the plan/todos CurrentTaskCard so the work column has one authoritative task object. Evidence: npx vitest run (workbench-progress + full suite) Impact: Workbench work tab; tidyCards skips done+danger failures. Refs: fast-slow-channel-display-u1-plan W4 Co-authored-by: Cursor --- src/components/Workbench.tsx | 8 +++++++- src/store.ts | 3 ++- test/workbench-progress.test.ts | 26 ++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 test/workbench-progress.test.ts diff --git a/src/components/Workbench.tsx b/src/components/Workbench.tsx index 0d72972..f6ba34f 100644 --- a/src/components/Workbench.tsx +++ b/src/components/Workbench.tsx @@ -91,6 +91,11 @@ function FilesTab() { return
} +/** U1:同会话存在后台 progress 卡(进行中/待确认)时,progress 为权威对象,隐藏 CurrentTaskCard 避免双标题。 */ +export function hasActiveProgressCard(cards: ActivityCard[]): boolean { + return cards.some(c => c.kind === 'progress' && (c.status === 'active' || c.status === 'action_required')) +} + function WorkTab({ plan, todos, filter, inboxScope, projectCards, cards }: { plan: Parameters[0]['plan'] todos: Parameters[0]['todos'] @@ -99,10 +104,11 @@ function WorkTab({ plan, todos, filter, inboxScope, projectCards, cards }: { projectCards: ActivityCard[] cards: ActivityCard[] }) { + const showCurrentTask = !hasActiveProgressCard(cards) return ( <>
- + {showCurrentTask ? : null}