perf(short-drama-agent-front): 优化记录加载与工作区体验

This commit is contained in:
GJ committed 2026-11-06 20:56:25 +08:00
1 parent d0264c08ce
commit db9aea1694
111 files changed
+1680 -1290

No files matched your search

@@ -147,7 +147,7 @@ function server() {
createdAt: '2026-10-08T00:00:00Z',
updatedAt: '2026-10-08T00:00:01Z'
}
else if (path.endsWith('/checkpoints')) data = context.checkpoints.value
else if (path.endsWith('/checkpoints?view=summary')) data = context.summaryQuery.data.value
else if (path.endsWith('/subject-forms')) data = [form]
else if (path.endsWith('/production/entry-readiness')) data = { ready: true, derivedAssets: { shotCount: 1 } }
else if (path.includes('/storyboard-visual-states'))
@@ -464,7 +464,7 @@ describe('高级串联生产的安全边界', () => {
button('确认启动串联生产').click()
await flushPromises()
expect(posts()).toHaveLength(1)
expect(document.body.textContent).toContain('流程返回不等于成片完成')
expect(document.body.textContent).toContain('成片进度请到素材页查看')
expect(document.body.textContent).toContain(receipt.errors[0])
expect(document.body.textContent).toContain('已提交 1')
expect(document.body.textContent).toContain('任务已分发,等待视频完成')
@@ -67,7 +67,7 @@ describe('历史首帧输入', () => {
await wrapper.get('.n-collapse-item__header-main').trigger('click')
await flushPromises()
expect(wrapper.text()).toContain('当次描述 one')
expect(wrapper.text()).toContain('原件字节已变化')
expect(wrapper.text()).toContain('原图已变化')
expect(wrapper.text()).toContain('@CH01')
expect(wrapper.text()).toContain('@CH02')
expect(wrapper.find('img').exists()).toBe(false)
@@ -75,7 +75,7 @@ describe('历史首帧输入', () => {
await flushPromises()
expect(wrapper.text()).toContain('当次描述 two')
expect(wrapper.text()).not.toContain('当次描述 one')
expect(wrapper.text()).toContain('原件不可用')
expect(wrapper.text()).toContain('原图不可用')
expect(fetcher.mock.calls.map(([url]) => url)).toEqual([
'/api/storyboard-shots/shot/keyframes/one/generation-input?projectId=project',
'/api/storyboard-shots/shot/keyframes/two/generation-input?projectId=project'
+1 -1
View File
@@ -99,7 +99,7 @@ describe('镜头生产数据契约', () => {
expect(issueLabel('missing_identity_anchor')).toBe('缺少演员母版')
expect(issueLabel('identity_unlocked')).toBe('演员身份未锁定')
expect(productionStatusLabel('in_progress')).toBe('任务进行中')
expect(productionStatusLabel('unknown')).toBe('unknown')
expect(productionStatusLabel('unknown')).toBe('待确认')
})
it('视频地址与图片使用相同的安全协议限制', () => {
@@ -1,3 +1,4 @@
import { testCheckpointSummaries } from '@/testing/project-context'
import { generationProfile, imageCatalog } from '../../fixtures/generation'
import { flushPromises, mount } from '@vue/test-utils'
import { afterEach, describe, expect, it, vi } from 'vitest'
@@ -458,7 +459,15 @@ describe('精简公开资产回归', () => {
it('项目不再提供任务数组时,从每条工作流最新 checkpoint 判断运行状态', () => {
expect(hasRunningWorkflow([])).toBe(false)
expect(hasRunningWorkflow([record('breakdown', 1, 'running'), record('breakdown', 2, 'completed')])).toBe(false)
expect(hasRunningWorkflow([record('breakdown', 1, 'running'), record('other', 2, 'completed')])).toBe(true)
expect(
hasRunningWorkflow(
testCheckpointSummaries([record('breakdown', 1, 'running'), record('breakdown', 2, 'completed')])
)
).toBe(false)
expect(
hasRunningWorkflow(
testCheckpointSummaries([record('breakdown', 1, 'running'), record('other', 2, 'completed')])
)
).toBe(true)
})
})
+3 -3
View File
@@ -162,7 +162,7 @@ function server() {
result: batch,
error: null
}
else if (path.endsWith('/checkpoints')) data = []
else if (String(url).endsWith('/checkpoints?view=summary')) data = []
else if (path.endsWith('/production/entry-readiness')) data = { ready: true }
else if (path.endsWith('/validations')) data = []
else if (path.endsWith('/quality-review'))
@@ -624,10 +624,10 @@ describe('视频修复候选与复检晋升', () => {
}
})
await flushPromises()
expect(document.body.textContent).toContain('修复候选复检通过后会自动设为主视频')
expect(document.body.textContent).toContain('修复候选复检通过后自动设为主视频')
wrapper.getComponent(NRadioGroup).vm.$emit('update:value', 'repair')
await flushPromises()
expect(document.body.textContent).toContain('本次最多提交 1 个视频生成任务')
expect(document.body.textContent).toContain('最多生成 1 个候选')
expect(document.body.textContent).not.toContain('次生图')
expect(document.body.textContent).toContain('修复链次数上限')
expect(data.posts()).toHaveLength(0)