From c4a660013431fdd9bb5e5d9a9715d933e17041c4 Mon Sep 17 00:00:00 2001 From: lanrtop Date: Fri, 3 Jul 2026 13:37:22 +0900 Subject: [PATCH] =?UTF-8?q?fix(onboarding):=20=E6=A8=A1=E6=9D=BF=E5=88=86?= =?UTF-8?q?=E5=8F=91=E6=8A=A5=E5=91=8A=E8=AF=86=E5=88=AB=20appended/update?= =?UTF-8?q?d=20=E4=BA=94=E6=80=81=EF=BC=8C=E4=B8=8D=E5=86=8D=E8=AF=AF?= =?UTF-8?q?=E6=98=BE=20=E2=9C=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit noteapp 实测追加管理块成功但 UI 渲染成红叉——前端映射只认旧三态, 新增 action 落入 failed 默认分支。改映射表覆盖五态, updated/appended 展示后端 detail(含版本信息)。 Rules-Applied: R12 --- src/components/dashboard/BlueprintModal.tsx | 43 ++++++++++++--------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/src/components/dashboard/BlueprintModal.tsx b/src/components/dashboard/BlueprintModal.tsx index f46909f..cff2e72 100644 --- a/src/components/dashboard/BlueprintModal.tsx +++ b/src/components/dashboard/BlueprintModal.tsx @@ -53,6 +53,19 @@ const STATUS_CONFIG: Record = { + written: { icon: "✓", color: "text-green-600", label: "已写入" }, + updated: { icon: "↑", color: "text-blue-600", label: null }, + appended: { icon: "+", color: "text-blue-600", label: null }, + skipped: { icon: "○", color: "text-gray-400", label: "已存在" }, + failed: { icon: "✗", color: "text-red-600", label: null }, +}; + const TASK_PREFIX: Record = { done: "✅", in_progress: "🔵", @@ -1289,25 +1302,17 @@ function GovernancePanel({ {packTemplates && (

模板分发

- {packTemplates.map((t) => ( -

- - {t.action === "written" ? "✓" : t.action === "skipped" ? "○" : "✗"} - - {t.name} - - {t.action === "written" ? "已写入" : t.action === "skipped" ? "已存在" : t.detail} - -

- ))} + {packTemplates.map((t) => { + const style = + TEMPLATE_ACTION_STYLE[t.action] ?? TEMPLATE_ACTION_STYLE.failed; + return ( +

+ {style.icon} + {t.name} + {style.label ?? t.detail} +

+ ); + })}
)} {buffStatus?.status === "active" ? (