fix(webui): correct activity duration display

This commit is contained in:
chengyongru
2026-06-18 00:03:18 +08:00
committed by Xubin Ren
parent b46aac0554
commit 472c67722e
13 changed files with 109 additions and 18 deletions
@@ -359,6 +359,20 @@ describe("AgentActivityCluster", () => {
expect(screen.getByText("Thought for 12s")).toBeInTheDocument();
});
it("labels mixed tool activity as work instead of thought", () => {
render(
<AgentActivityCluster
messages={activityMessages()}
isTurnStreaming={false}
hasBodyBelow
turnLatencyMs={12_400}
/>,
);
expect(screen.getByText("Worked for 12s")).toBeInTheDocument();
expect(screen.queryByText("Thought for 12s")).not.toBeInTheDocument();
});
it("omits the duration when completed history has no reliable timing", () => {
render(
<AgentActivityCluster