refactor(publish): collapse pending_review/unknown task states into failed

Treat ambiguous terminal states as failures end-to-end: server
normalizes unknown desktop task completions and views to failed, drops
the pending_review aggregate branch, and remaps pending_review to
failed in publish record conversion. admin-web removes the
pending_review status option from article list filters, pushes
pending_review through the failed tone, and folds lingering
publishing/pending entries under the publishing bucket. desktop-client
relabels unknown as 发送失败 in PublishManagement/TasksView, rewrites
the scaffold adapter result to a proper failed error envelope, and
sanitises legacy scaffold-only error messages to a user-friendly note.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-20 11:44:47 +08:00
parent 4014eff427
commit dc68ad044c
11 changed files with 62 additions and 45 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ const publishStatusMap: Record<string, { label: string; color: string }> = {
published: { label: "status.publish.published", color: "success" },
publish_success: { label: "status.publish.publish_success", color: "success" },
publish_failed: { label: "status.publish.publish_failed", color: "error" },
pending_review: { label: "status.publish.pending_review", color: "warning" },
pending_review: { label: "status.publish.failed", color: "error" },
};
export function formatDateTime(value?: string | null, pattern = "YYYY-MM-DD HH:mm"): string {