fix: replace raw codes and internal IDs in the console with Chinese labels

Found in v0.2 visual QA (docs/plan/09-visual-qa.md):
- actor strings (admin_session:<uuid>, user:<uuid>, system) -> 管理员/系统/API Key
  in policy revisions, subscriptions, inbox, trash, business tasks, organize detail
- cache volume without key shows the downloader name instead of instance:<uuid>
- download timeline/plan: task and organize statuses, plan purpose, priority and
  status reason localized; audit gets labels for capability/files/site/feed actions
- organize record reason uses conflict detail (没有可入库的主视频) instead of
  blocked:no_main_video; slot/candidate reasons drop inflight:<uuid>
- identity decision summary no longer shows no_viable_candidate
- upstream test: 'Connection error.' classified as network, with a Chinese hint
- new policy draft prefills key default (placeholder looked like a value)
- dialog/sheet close sr-only text in Chinese

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-28 15:22:15 +08:00
1 parent d7eb6a45d0
commit 46d37d87fe
23 files changed
+176 -43

No files matched your search

@@ -12,8 +12,10 @@ import { consolePath } from "~/components/console/nav.ts";
import { PageHeader } from "~/components/console/page-header.tsx";
import { StatusBadge } from "~/components/console/status-badge.tsx";
import { useQueryState } from "~/components/console/use-query-state.ts";
import { PRIORITY } from "~/components/library/labels.ts";
import { Button } from "~/components/ui/button.tsx";
import { relTime } from "~/components/workbench/release-fields.ts";
import { planReasonText } from "~/lib/labels.ts";
import { formatBytes, formatDateTime } from "~/lib/utils.ts";
export const meta = () => [{ title: "下载计划 · UHD 媒体自动化控制台" }];
@@ -41,7 +43,7 @@ export default function DownloadPlansPage() {
cell: (p) => (
<div className="min-w-0">
<p className="text-foreground">
{PURPOSE[p.purpose]} · 优先级 {p.priority}
{PURPOSE[p.purpose]} · 优先级 {PRIORITY[p.priority as keyof typeof PRIORITY] ?? p.priority}
</p>
<p className="truncate font-mono text-meta text-muted-foreground">{p.id.slice(0, 8)}</p>
</div>
@@ -63,7 +65,7 @@ export default function DownloadPlansPage() {
key: "reason",
header: "说明",
hideBelow: "lg",
cell: (p) => <span className="line-clamp-1 text-muted-foreground">{p.statusReason ?? "—"}</span>,
cell: (p) => <span className="line-clamp-1 text-muted-foreground">{planReasonText(p.statusReason) ?? "—"}</span>,
},
{
key: "at",
@@ -107,7 +109,7 @@ export default function DownloadPlansPage() {
open={!!openPlan}
onOpenChange={(o) => !o && setOpenPlan(null)}
title={openPlan ? `${PURPOSE[openPlan.purpose]}计划` : ""}
description={openPlan?.statusReason ?? undefined}
description={planReasonText(openPlan?.statusReason) ?? undefined}
footer={
linkedDownload ? (
<Button asChild size="sm">