From 4026a23dcf2bedc0203907ec05d75c4d7f4a72a2 Mon Sep 17 00:00:00 2001 From: ogt Date: Fri, 10 Jul 2026 11:21:57 +0800 Subject: [PATCH] fix(work-items): surface AI agent lifecycle item --- apps/web/messages/en.json | 2 +- apps/web/messages/zh-TW.json | 2 +- .../app/[locale]/awooop/work-items/page.tsx | 48 ++++++++++++++++++- 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index 8cb424809..a5815d15e 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -9535,7 +9535,7 @@ "mainlineProgress": { "eyebrow": "Mainline Work Progress", "title": "All Work Items And Priority Order", - "subtitle": "Reads the production priority work-order readback and surfaces totals, completion, current P0, next action, and the first 8 ordered items before the deeper automation / ledger views.", + "subtitle": "Reads the production priority work-order readback and surfaces totals, completion, current P0, next action, and the active / spotlight ordered items before the deeper automation / ledger views.", "loading": "Reading production work-order", "completion": "Overall completion", "currentP0": "Current P0", diff --git a/apps/web/messages/zh-TW.json b/apps/web/messages/zh-TW.json index 0b9c7362c..7316e2266 100644 --- a/apps/web/messages/zh-TW.json +++ b/apps/web/messages/zh-TW.json @@ -9535,7 +9535,7 @@ "mainlineProgress": { "eyebrow": "主線工作進度", "title": "全部工作項目與優先順序", - "subtitle": "直接讀正式 priority work-order readback,先看總數、完成度、目前 P0、下一步與前 8 個 ordered items;細節再下鑽 automation / ledger。", + "subtitle": "直接讀正式 priority work-order readback,先看總數、完成度、目前 P0、下一步與活躍/聚焦 ordered items;細節再下鑽 automation / ledger。", "loading": "讀取正式 work-order", "completion": "整體完成度", "currentP0": "目前 P0", diff --git a/apps/web/src/app/[locale]/awooop/work-items/page.tsx b/apps/web/src/app/[locale]/awooop/work-items/page.tsx index 2605feab9..9ab9902e2 100644 --- a/apps/web/src/app/[locale]/awooop/work-items/page.tsx +++ b/apps/web/src/app/[locale]/awooop/work-items/page.tsx @@ -11122,6 +11122,51 @@ function commanderStatusTone(status: string) { } } +const MAINLINE_WORK_PROGRESS_SPOTLIGHT_IDS = new Set([ + "CIR-P1-AI-002", + "CIR-P0-AILOOP-001", + "CIR-P0-LOG-001", + "CIR-P0-TG-001", + "CIR-P0-IA-001", + "CIR-P1-UI-001", + "CIR-P1-OPENCLAW-001", + "CIR-P2-UX-002", +]); + +function pickMainlineVisibleWorkItems( + items: CommanderInsertedRequirementWorkItem[], + nextId: string, + limit = 12 +) { + const selected: CommanderInsertedRequirementWorkItem[] = []; + const seen = new Set(); + const addItem = (item?: CommanderInsertedRequirementWorkItem) => { + const id = item?.id; + if (!id || seen.has(id)) { + return; + } + selected.push(item); + seen.add(id); + }; + + addItem(items.find((item) => item.id === nextId)); + for (const item of items) { + const status = item.status ?? "pending"; + if ( + status === "in_progress" || + status === "blocked" || + MAINLINE_WORK_PROGRESS_SPOTLIGHT_IDS.has(item.id ?? "") + ) { + addItem(item); + } + } + for (const item of items) { + addItem(item); + } + + return selected.slice(0, limit); +} + function MainlineWorkProgressStrip({ priority, loading, @@ -11161,7 +11206,7 @@ function MainlineWorkProgressStrip({ const activeBlockers = summary?.active_p0_live_active_blockers ?? []; const primaryBlocker = summary?.active_p0_primary_blocker ?? activeBlockers[0] ?? "--"; - const visibleItems = items.slice(0, 8); + const visibleItems = pickMainlineVisibleWorkItems(items, nextId); const statusMetrics = [ { key: "done", @@ -11569,6 +11614,7 @@ function CommanderInsertedRequirementsPanel({ }; const spotlightIds = new Set([ nextId, + "CIR-P1-AI-002", "CIR-P0-AILOOP-001", "CIR-P0-LOG-001", "CIR-P0-TG-001",