fix(downloads): humanized reasons and TechInfo on the download panel (DL-2b)
- board organize hint uses DEAI-2 reasonLine; add transfer_failed, blocked, blocked_by_conflict, main_failed, not_imported_kind, target_root_not_managed, download_removed to the reason table with tests - download detail / plans tab: internal ids, raw codes and JSON moved into TechInfo - library versions tech block switched to TechInfo (TODO(DEAI-2)) - copy: glossary terms (no 接管/候选), plan reason codes no longer shown raw Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
8315ece4d1
commit
3f1c4d6c3b
11 files changed
+105
-65
No files matched your search
@@ -1,4 +1,6 @@
|
||||
import { looksLikeCode } from "@umt/contracts";
|
||||
import type { StatusTone } from "~/components/console/status-badge.tsx";
|
||||
import { reasonLine } from "~/lib/reasons.ts";
|
||||
|
||||
// 状态值 → 中文文案 + 语气。状态徽章必须带文字,这里集中维护常用的几组。
|
||||
|
||||
@@ -154,5 +156,9 @@ const PLAN_REASON: Record<string, string> = {
|
||||
"organize:succeeded": "整理成功",
|
||||
"organize:partial": "部分整理成功",
|
||||
"organize:failed": "整理失败",
|
||||
authorized: "已批准",
|
||||
"reserved:agent": "智能体已预留空间",
|
||||
};
|
||||
export const planReasonText = (v: string | null | undefined) => (v ? (PLAN_REASON[v] ?? v) : null);
|
||||
/** 不认识的内部码走原因码表,仍不认识就不显示(原码在技术信息里) */
|
||||
export const planReasonText = (v: string | null | undefined) =>
|
||||
v ? (PLAN_REASON[v] ?? (looksLikeCode(v) ? reasonLine(v, "") || null : v)) : null;
|
||||
Reference in new issue
Block a user