From e889cc25cf0a749f835f026396c38f69a1ded7dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=87=AF?= Date: Sat, 27 Jun 2026 00:01:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(ai=E5=86=99=E4=BD=9C):=20=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=20in=5Fprogress=20=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E8=AF=AF=E6=98=BE=E7=A4=BA=E3=80=8C=E8=BF=9B=E8=A1=8C=E4=B8=AD?= =?UTF-8?q?=E3=80=8D=E8=BD=AC=E5=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 刷新=重置后,开始过但没跑完的会话 DB status 永远停在 in_progress、且无任何活进程, 历史列表却转圈显示「进行中」,误导用户以为还在运行。改为中性、不转圈的「未完成」 (text-slate-400)。真正在跑的 background(后台挂起,有 executor 驱动)保留「挂起中」转圈。 改 WRITING_STATUS_PILL(侧栏列表) + STATUS_LABELS(下拉)。 Co-Authored-By: Claude Opus 4.8 (1M context) --- .../components/ai-writing/AIWritingHistoryDropdown.tsx | 3 ++- .../open-canvas/components/ai-writing/ResearchSidebar.tsx | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend-web/src/open-canvas/components/ai-writing/AIWritingHistoryDropdown.tsx b/frontend-web/src/open-canvas/components/ai-writing/AIWritingHistoryDropdown.tsx index 2b8cac89..84f425b9 100644 --- a/frontend-web/src/open-canvas/components/ai-writing/AIWritingHistoryDropdown.tsx +++ b/frontend-web/src/open-canvas/components/ai-writing/AIWritingHistoryDropdown.tsx @@ -6,7 +6,8 @@ import { cn } from '@/lib/utils'; import type { AIWritingSessionSummary } from '../../api/ai-writing-sessions'; export const STATUS_LABELS: Record = { - in_progress: { label: '进行中', color: 'text-blue-500' }, + // 刷新=重置后 in_progress 会话已无活进程,显示中性「未完成」而非「进行中」,避免歧义。 + in_progress: { label: '未完成', color: 'text-slate-400' }, // 后台挂起中:后端正自动驱动到定稿(离页/刷新/切号不打断)。 background: { label: '挂起中', color: 'text-sky-500' }, draft_ready: { label: '草稿', color: 'text-amber-500' }, diff --git a/frontend-web/src/open-canvas/components/ai-writing/ResearchSidebar.tsx b/frontend-web/src/open-canvas/components/ai-writing/ResearchSidebar.tsx index dbccda73..73627792 100644 --- a/frontend-web/src/open-canvas/components/ai-writing/ResearchSidebar.tsx +++ b/frontend-web/src/open-canvas/components/ai-writing/ResearchSidebar.tsx @@ -97,8 +97,11 @@ function getTemplateVisual(tpl: ResearchTemplate, index: number): TemplateVisual } // 历史记录状态药丸样式(对齐多智能体会商的历史记录观感)。 +// 注:`in_progress` 不再转圈显示「进行中」——刷新=重置后这些会话已无任何活进程, +// 转圈会误导用户以为还在跑;统一显示为中性、不动的「未完成」。真正还在跑的是 `background` +// (后台挂起,有 AIWritingJobExecutor 驱动),保留「挂起中」转圈。 const WRITING_STATUS_PILL: Record = { - in_progress: { label: "进行中", className: "text-primary", spin: true }, + in_progress: { label: "未完成", className: "text-slate-400" }, background: { label: "挂起中", className: "text-sky-500", spin: true }, draft_ready: { label: "草稿", className: "text-amber-500" }, review_ready: { label: "审核", className: "text-purple-500", dot: true },