B6/B7: failed终态前端可见 + SSE事件链核实

B6 错误态:
- 后端已加 TaskStatus.FAILED + 异常区分重试中/耗尽(014迁移ALTER status ENUM)
- 前端 TaskStatus 类型加 failed
- RecentTasksBar/history STATUS_LABEL 补 failed 标签
- history 页 HISTORY_STATUSES 纳入 failed(否则失败任务前端找不到)
- FatalErrorBanner + useSse error 不再静默丢弃

B7: 核实 SSE(ticket换JWT) + 事件消费链无缺口,标绿

tsc EXIT=0
This commit is contained in:
yangqianqian
2026-06-16 12:45:13 +08:00
parent ea423e8a32
commit 1b488752e6
13 changed files with 102 additions and 11 deletions

View File

@@ -7,6 +7,7 @@ import { ImageProgressCardSkeleton } from '@/components/tasks/ImageProgressCard'
import { ImageProgressHeader } from '@/components/tasks/ImageProgressHeader';
import { ImageActionBar } from '@/components/tasks/ImageActionBar';
import { SseStatusBar } from '@/components/tasks/SseStatusBar';
import { FatalErrorBanner } from '@/components/tasks/FatalErrorBanner';
import { useSse } from '@/hooks/useSse';
import { useGenerationStore } from '@/stores/generationStore';
import { useTaskStore } from '@/stores/taskStore';
@@ -50,6 +51,7 @@ export default function ImageSelectionPage() {
)}
<SseStatusBar status={connectionStatus} attempt={reconnectAttempt} />
<div className="p-6 flex-1 overflow-auto">
<FatalErrorBanner />
<ImageProgressHeader imageTotal={imageTotal} imageDone={imageDone} pendingCount={pendingCount} />
{/* 图片网格(谁好谁先冒) */}
<div className="grid grid-cols-3 xl:grid-cols-5 gap-3">