diff --git a/src/renderer/components/team/dialogs/TaskDetailDialog.tsx b/src/renderer/components/team/dialogs/TaskDetailDialog.tsx index 3fb6b5dd..af0ad85d 100644 --- a/src/renderer/components/team/dialogs/TaskDetailDialog.tsx +++ b/src/renderer/components/team/dialogs/TaskDetailDialog.tsx @@ -1455,7 +1455,7 @@ export const TaskDetailDialog = ({ title="Implementation time from persisted work intervals" > - Work time {taskImplementationDurationLabel} + In progress time {taskImplementationDurationLabel} ) : undefined } diff --git a/test/main/services/team/TeamTaskWriter.test.ts b/test/main/services/team/TeamTaskWriter.test.ts index 3ff59855..c830d84c 100644 --- a/test/main/services/team/TeamTaskWriter.test.ts +++ b/test/main/services/team/TeamTaskWriter.test.ts @@ -210,16 +210,29 @@ describe('TeamTaskWriter', () => { const writtenPath = '/mock/tasks/my-team/11.json'; const persisted = JSON.parse(hoisted.files.get(writtenPath) ?? '{}'); expect(persisted.historyEvents).toHaveLength(1); - expect(persisted.historyEvents[0]).toMatchObject({ - type: 'task_created', - status: 'in_progress', - actor: 'bob', - }); + expect(persisted.historyEvents[0]).toMatchObject({ + type: 'task_created', + status: 'in_progress', + actor: 'bob', + }); + }); + + it('createTask records in_progress workIntervals as status time, not runtime activity', async () => { + await writer.createTask('my-team', { + id: '14', + subject: 'Already assigned', + status: 'in_progress', + createdAt: '2026-05-14T10:00:00.000Z', }); - it('createTask without createdBy omits actor', async () => { - await writer.createTask('my-team', { - id: '13', + const writtenPath = '/mock/tasks/my-team/14.json'; + const persisted = JSON.parse(hoisted.files.get(writtenPath) ?? '{}'); + expect(persisted.workIntervals).toEqual([{ startedAt: '2026-05-14T10:00:00.000Z' }]); + }); + + it('createTask without createdBy omits actor', async () => { + await writer.createTask('my-team', { + id: '13', subject: 'No author', status: 'pending', }); diff --git a/test/renderer/components/team/dialogs/TaskDetailDialog.test.ts b/test/renderer/components/team/dialogs/TaskDetailDialog.test.ts index 5d2c084c..b50dad58 100644 --- a/test/renderer/components/team/dialogs/TaskDetailDialog.test.ts +++ b/test/renderer/components/team/dialogs/TaskDetailDialog.test.ts @@ -635,7 +635,7 @@ describe('TaskDetailDialog changes summary loading', () => { }); expect(host.textContent).toContain('Workflow History'); - expect(host.textContent).toContain('Work time 5m 00s'); + expect(host.textContent).toContain('In progress time 5m 00s'); const workflowButton = [...host.querySelectorAll('button')].find( (button) => button.textContent?.startsWith('Workflow History') === true