diff --git a/packages/client/ui-conversation/tests/todo-panel.spec.tsx b/packages/client/ui-conversation/tests/todo-panel.spec.tsx index a913b77bb6..b5ce8af06b 100644 --- a/packages/client/ui-conversation/tests/todo-panel.spec.tsx +++ b/packages/client/ui-conversation/tests/todo-panel.spec.tsx @@ -186,6 +186,15 @@ describe('TodoRow', () => { expect(screen.getByText('1/1 已完成')).toBeTruthy() }) + it('keeps the counts when an active item has unusable content, instead of the generic summary', () => { + // planSummary yields activeContent null here, but the counts are known good, + // so the row drops only the active clause — `?? model.summary` never runs. + const args = JSON.stringify({ todos: [{ content: 'done', status: 'completed' }, { content: 42, status: 'in_progress' }] }) + const { container } = render() + expect(screen.getByText('1/2 已完成')).toBeTruthy() + expect(container.textContent).not.toContain('+') + }) + it('keeps the non-ok execution states visible: running dot, interrupted marker', () => { // A running call (no result yet) shows the ongoing dot, never the ok badge. const args = JSON.stringify({ todos: LIST })