feat(publish-dedup): disable already-published accounts and rework retry UX

In the admin publish modal, fetch the article's publish records, disable
accounts that already succeeded for the same article/platform, label
queued/publishing accounts inline, and route the success notification by
created vs existing task counts (with a dedicated warning for the
`desktop_publish_duplicate` server error).

Replace the "再次发送" mutation/popconfirm on both admin and desktop publish
management views with a "重新创建发布任务" action that calls the same Create
endpoint, only enables on failed/aborted/unknown rows, and reports created
vs existing task counts (with a tailored warning for `unknown` results
that may have already succeeded).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-26 18:43:42 +08:00
parent 24dd832218
commit aff2c5f6ea
6 changed files with 311 additions and 107 deletions
+1
View File
@@ -83,6 +83,7 @@ const errorMessageMap: Record<string, string> = {
desktop_account_client_missing: '所选账号还没有绑定桌面客户端,暂时无法发布',
desktop_account_not_found: '所选桌面账号不存在,请刷新后重试',
desktop_client_offline: '当前登录账号的桌面客户端未在线,请先打开 desktop-client',
desktop_publish_duplicate: '内容已在发布队列中,未重复提交',
desktop_publish_job_store_unavailable: '发布队列暂时不可用,请稍后重试',
compliance_blocked: '内容合规检测已阻断本次发布',
compliance_needs_ack: '内容合规检测需要确认风险后才能发布',