隐藏传播进度重复提示

- 传播进度蓝色面板显示任务 message 时隐藏顶栏左侧灰色 statusMessage,避免同一传播文字重复出现。

- 补充 VideoWorkspace 回归测试,确认传播运行提示只出现一次且位于进度面板内。

- 更新前端审计、设计冻结、测试计划和项目指南文档。
This commit is contained in:
2026-05-04 04:44:32 +08:00
parent 84895bd9bd
commit 1971640a67
6 changed files with 26 additions and 13 deletions

View File

@@ -2029,13 +2029,21 @@ describe('VideoWorkspace', () => {
bbox: [0.1, 0.1, 0.2, 0.2],
});
apiMock.queuePropagationTask.mockResolvedValueOnce({ id: 44, status: 'queued', progress: 0, message: '自动传播任务已入队' });
apiMock.getTask.mockResolvedValueOnce({
id: 44,
status: 'success',
progress: 100,
message: '自动传播完成,但没有生成新的 mask',
result: { processed_frame_count: 2, created_annotation_count: 0, completed_steps: 1 },
});
apiMock.getTask
.mockResolvedValueOnce({
id: 44,
status: 'running',
progress: 25,
message: '自动传播任务 #44 运行中...',
result: { processed_frame_count: 1, created_annotation_count: 0, completed_steps: 0 },
})
.mockResolvedValueOnce({
id: 44,
status: 'success',
progress: 100,
message: '自动传播完成,但没有生成新的 mask',
result: { processed_frame_count: 2, created_annotation_count: 0, completed_steps: 1 },
});
render(<VideoWorkspace />);
await waitFor(() => expect(useStore.getState().frames).toHaveLength(2));
@@ -2060,8 +2068,13 @@ describe('VideoWorkspace', () => {
const progressPanel = await screen.findByLabelText('自动传播进度');
expect(progressPanel).toBeInTheDocument();
expect(within(progressPanel).getByText('0%')).toBeInTheDocument();
await waitFor(() => {
expect(screen.getAllByText('自动传播任务 #44 运行中...')).toHaveLength(1);
expect(within(screen.getByLabelText('自动传播进度')).getByText('自动传播任务 #44 运行中...')).toBeInTheDocument();
});
expect(await screen.findByText(/没有生成新的 mask/)).toBeInTheDocument();
await waitFor(() => expect(apiMock.getTask).toHaveBeenCalledTimes(2), { timeout: 3000 });
await waitFor(() => expect(screen.getByText(/没有生成新的 mask/)).toBeInTheDocument(), { timeout: 3000 });
});
it('lets users select the propagation range on the timeline before queueing', async () => {

View File

@@ -1836,7 +1836,7 @@ export function VideoWorkspace({ onNavigateToAI }: { onNavigateToAI?: () => void
<span className="text-sm text-white font-mono">{currentProject?.name || '未选择项目'}</span>
</div>
<div className="flex items-center gap-3">
{statusMessage && (
{statusMessage && !propagationProgress && (
<span className="text-[10px] text-gray-500 font-mono max-w-48 truncate" title={statusMessage}>
{statusMessage}
</span>