feat: 同步动作与首帧编辑能力并统一工作区反馈

接入动作时间轴、密度审计、人工视线目标和后台首帧编辑;独立读取已保存提示词,并在首帧晋升前重新核对持久化质量状态。
统一 NMessage 结果反馈、局部 loading 和业务说明间距,保留真实长任务进度与部分失败语义。
验证:pnpm check(49 个文件、393 项测试)、pnpm build;当前环境无法完成 localhost 浏览器验收及真实后端联调。
This commit is contained in:
GouJ committed 2026-10-12 20:05:03 +08:00
1 parent 83482a70c5
commit 7a60db3ced
76 files changed
+2485 -457

No files matched your search

+16 -7
View File
@@ -1522,7 +1522,7 @@ describe('工作台页面交互', () => {
await image.trigger('click')
await flushPromises()
expect(document.querySelector('.n-image-preview')?.getAttribute('src')).toBe(image.attributes('src'))
expect(fetcher.mock.calls).toHaveLength(1)
expect(fetcher.mock.calls).toHaveLength(2)
expect(fetcher.mock.calls.every(([, init]) => !init?.method || init.method === 'GET')).toBe(true)
})
@@ -1530,6 +1530,15 @@ describe('工作台页面交互', () => {
const shot = designedShot()
const fetcher = vi
.fn<typeof fetch>()
.mockResolvedValueOnce(
jsonResponse({
shotId: shot.shotId,
videoPrompt: null,
negativePrompt: null,
status: 'missing',
updatedAt: ''
})
)
.mockResolvedValueOnce(
new Response(
JSON.stringify({
@@ -1589,7 +1598,7 @@ describe('工作台页面交互', () => {
await flushPromises()
expect(wrapper.get('pre').text()).toContain('form-db')
expect(wrapper.get('pre').text()).toContain('地面积水')
expect(fetcher.mock.calls[1]?.[0]).toBe('/api/storyboard-shots/shot-db-1-1/generation-spec')
expect(fetcher.mock.calls[2]?.[0]).toBe('/api/storyboard-shots/shot-db-1-1/generation-spec')
expect(fetcher.mock.calls.every(([, init]) => init?.method !== 'POST')).toBe(true)
})
@@ -1870,11 +1879,11 @@ describe('工作台页面交互', () => {
attachTo: document.body,
props: { projectId: fixture.id, shot: designedShot(), disabled: false }
})
expect(fetcher).toHaveBeenCalledTimes(1)
expect(fetcher).toHaveBeenCalledTimes(2)
await flushPromises()
expect(fetcher.mock.calls[0]?.[0]).toBe('/api/storyboard-shots/shot-db-1-1/references')
expect(fetcher.mock.calls[1]?.[0]).toBe('/api/storyboard-shots/shot-db-1-1/references')
await wrapper.setProps({ shot: { ...designedShot('shot-db-1-2'), visualState: null } })
expect(fetcher.mock.calls[0]?.[1]?.signal?.aborted).toBe(true)
expect(fetcher.mock.calls[1]?.[1]?.signal?.aborted).toBe(true)
finish(
new Response(
'{"data":{"shotId":"shot-db-1-1","references":[],"missing":[{"subjectId":"x","subjectName":"旧镜头人物","reason":"缺图"}]}}'
@@ -1907,7 +1916,7 @@ describe('工作台页面交互', () => {
props: { projectId: fixture.id, shot: designedShot(), disabled: false }
})
expect(fetcher.mock.calls.every(([, init]) => init?.method === 'GET')).toBe(true)
await confirmGeneration('读取/生成提示词')
await confirmGeneration('生成提示词')
const post = fetcher.mock.calls.find(([, init]) => init?.method === 'POST')!
expect(post[0]).toBe('/api/storyboard-shots/shot-db-1-1/video-prompt')
expect(JSON.parse(post[1]!.body as string)).toEqual({ force: false })
@@ -1931,7 +1940,7 @@ describe('工作台页面交互', () => {
props: { projectId: fixture.id, episodeNo: 1, shot: designedShot(), disabled: false }
})
await confirmGeneration('读取/生成提示词')
await confirmGeneration('生成提示词')
expect(getOperation(fixture.id).recovery).toEqual({
target: 'keyframe',