copy(web): api 标签与整理状态统一

整理记录状态改为排队中 / 整理中 / 已整理 / 部分整理 / 整理失败(列表摘要、组汇总、队列面板同口径);
下载计划「等你批准」「准备提交」;资源评估「可下载」「信息不全」「已跳过」;任务状态带「中」;
识别等待提示改匹配「TMDB 结果在后台查询」。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-10-07 02:10:19 +08:00
1 parent 148b12f279
commit 592f40ccf8
23 files changed
+58 -59

No files matched your search

@@ -26,7 +26,7 @@ function ScrapeQueueItem({ run }: { run: EngineRun }) {
const scrapeId = input.scrapeRecordId ?? input.recordId;
const scrape = useScrapeRecords(scrapeId ? [scrapeId] : []);
const record = scrape.data?.records[0];
const status = run.status === "pending" ? "排队" : run.status === "sleeping" ? "等待" : "执行中";
const status = run.status === "pending" ? "排队中" : run.status === "sleeping" ? "等待中" : "整理中";
return (
<li className="pg-slab space-y-2 rounded-xl p-4">
<div className="flex flex-wrap items-center gap-2">
@@ -85,7 +85,7 @@ function QueueItem({ run }: { run: EngineRun }) {
const progress = record ? recordFileProgress(record) : null;
const title = record ? recordTitle(record) : (download.data?.name ?? run.business?.title ?? "整理任务");
const source = record?.source.path ?? download.data?.contentPath ?? download.data?.savePath;
const status = run.status === "pending" ? "排队" : run.status === "sleeping" ? "等待" : "执行中";
const status = run.status === "pending" ? "排队中" : run.status === "sleeping" ? "等待中" : "整理中";
return (
<li className="pg-slab space-y-2 rounded-xl p-4">
<div className="flex flex-wrap items-center gap-2">
@@ -114,9 +114,9 @@ describe("整理记录列表:整理方式、分类、分组", () => {
const st = (...xs: PublicOrganizationRecord["status"][]) => xs.map((status) => ({ status }));
expect(groupIssues(st("succeeded", "succeeded"))).toEqual([]);
expect(groupIssues(st("succeeded", "failed", "partial", "running", "queued"))).toEqual([
{ label: "失败", n: 1, tone: "destructive" },
{ label: "部分成功", n: 1, tone: "warning" },
{ label: "进行中", n: 2, tone: "neutral" },
{ label: "整理失败", n: 1, tone: "destructive" },
{ label: "部分整理", n: 1, tone: "warning" },
{ label: "整理中", n: 2, tone: "neutral" },
]);
});
@@ -80,9 +80,9 @@ export function groupIssues(
): { label: string; n: number; tone: "destructive" | "warning" | "neutral" }[] {
const n = (f: (s: PublicOrganizationRecord["status"]) => boolean) => rows.filter((r) => f(r.status)).length;
return [
{ label: "失败", n: n((s) => s === "failed"), tone: "destructive" as const },
{ label: "部分成功", n: n((s) => s === "partial"), tone: "warning" as const },
{ label: "进行中", n: n((s) => s === "queued" || s === "running"), tone: "neutral" as const },
{ label: "整理失败", n: n((s) => s === "failed"), tone: "destructive" as const },
{ label: "部分整理", n: n((s) => s === "partial"), tone: "warning" as const },
{ label: "整理中", n: n((s) => s === "queued" || s === "running"), tone: "neutral" as const },
{ label: "已取消", n: n((s) => s === "cancelled"), tone: "neutral" as const },
].filter((x) => x.n > 0);
}