From 86c62cf966198b389dc2dc786bb49eb274beff56 Mon Sep 17 00:00:00 2001 From: Chinesezjc Date: Wed, 29 Jul 2026 10:16:08 +0800 Subject: [PATCH] test(gui): pin the row's count-only summary for an unusable active name The JSDoc correction stated this behavior but nothing asserted it at the row: when the first in_progress item carries no usable content the row renders the counts alone rather than the generic tool summary. Reverting that to a `?? model.summary` fallback turns exactly this case red. --- .../client/ui-conversation/tests/todo-panel.spec.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) 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 })