feat(工作台): 细化计划进展工时证据

关键改动:

- 支持需求覆盖和调研方向开始工作记录

- 日报按计划记录开始时间和进度下次开始时间计算证据

- 更新版本编辑校验、项目展示和 workflow 说明

Co-Authored-By: Codex GPT-5 <codex@openai.com>
This commit is contained in:
Script Generator
2026-07-01 11:02:38 +08:00
parent e5ce2d221e
commit 8947aeaac7
18 changed files with 1125 additions and 94 deletions

View File

@@ -60,7 +60,7 @@ test('updates research direction progress and creates a direction log', () => {
const next = updateResearchDirectionProgress!(plan({
tasks: [
{ id: 'task-1', title: '竞品分析', status: 'pending' },
{ id: 'task-1', title: '竞品分析', status: 'in_progress', currentWorkStartedAt: '2026-06-30T09:30:00.000Z' },
{ id: 'task-2', title: '用户访谈', status: 'pending' },
],
}), {
@@ -75,8 +75,35 @@ test('updates research direction progress and creates a direction log', () => {
assert.equal(next.tasks?.[0]?.status, 'in_progress');
assert.equal(next.tasks?.[0]?.completedContent, '完成竞品登录流程对比');
assert.equal(next.tasks?.[0]?.remainingContent, '补充支付流程差异');
assert.equal(next.tasks?.[0]?.currentWorkStartedAt, undefined);
assert.equal(next.logs?.[0]?.type, 'research_direction_progress');
assert.equal(next.logs?.[0]?.directionTaskId, 'task-1');
assert.equal(next.logs?.[0]?.directionTitle, '竞品分析');
assert.equal(next.logs?.[0]?.coverageStatus, 'partial');
assert.equal(next.logs?.[0]?.workStartedAt, '2026-06-30T09:30:00.000Z');
});
test('starts research direction work and marks the direction in progress', () => {
const startResearchDirectionWork = (versionPlan as any).startResearchDirectionWork as undefined | ((item: VersionPlan, input: {
taskId: string;
startedAt: string;
updatedBy: string;
}) => any);
assert.equal(typeof startResearchDirectionWork, 'function');
const next = startResearchDirectionWork!(plan({
tasks: [
{ id: 'task-1', title: '竞品分析', status: 'pending' },
{ id: 'task-2', title: '用户访谈', status: 'pending' },
],
}), {
taskId: 'task-1',
startedAt: '2026-06-30T09:30:00.000Z',
updatedBy: 'PM',
});
assert.equal(next.tasks?.[0]?.status, 'in_progress');
assert.equal(next.tasks?.[0]?.currentWorkStartedAt, '2026-06-30T09:30:00.000Z');
assert.equal(next.tasks?.[0]?.updatedBy, 'PM');
assert.equal(next.tasks?.[1]?.status, 'pending');
});