修复确认生成后的任务列表对账

问题:客户端确认 Quote 后只刷新一次任务,遇到短暂投影延迟时任务列表为空且流程静默成功。

修复:按 quoteId 有界重试任务列表,合并 REST 与实时推送快照,缺任务时显示明确错误;补充 Store 与页面回归测试。
This commit is contained in:
2026-08-03 15:48:04 +08:00
parent 78e4de91e4
commit fab0e4034c
4 changed files with 92 additions and 2 deletions

View File

@@ -405,6 +405,7 @@ describe('ImageCanvas Workspace-first design experience', () => {
.mockResolvedValueOnce([{
...taskFixture,
taskId: 'task-two',
quoteId: 'quote-one',
status: 'queued',
resultAssets: [],
}]);
@@ -421,6 +422,7 @@ describe('ImageCanvas Workspace-first design experience', () => {
expect.stringMatching(/^turn-/),
));
await waitFor(() => expect(fetchImageWorkspaceTasksMock).toHaveBeenCalledTimes(2));
expect(await screen.findByTestId('design-task-task-two')).toBeInTheDocument();
});
it('renders a new task pushed by the design event stream without repeated polling', async () => {