Skip to content

Commit 25dd632

Browse files
PR Batch Testerclaude
andcommitted
fix(web): a leftover run settling during a follow-up's send stays quiet
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 63a2a0b commit 25dd632

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

‎apps/web/src/components/chat/threadActivityAnnouncement.test.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ describe("nextThreadAnnouncement", () => {
6464
busy("working", secondRun, "starting"),
6565
]),
6666
).toEqual(["Working"]);
67+
expect(
68+
speak([
69+
idle(firstRun, "running"),
70+
busy("working", firstRun, "running"),
71+
idle(firstRun, "completed"),
72+
busy("working", secondRun, "starting"),
73+
idle(secondRun, "completed"),
74+
]),
75+
).toEqual(["Working", "Done"]);
6776
expect(
6877
speak([
6978
busy("working", firstRun, "running"),

‎apps/web/src/components/chat/threadActivityAnnouncement.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ export function nextThreadAnnouncement(
112112
if (next.runId === previous.settledRunId) {
113113
return { memory: { ...memory, turnRunId: null }, announcement: null };
114114
}
115+
// The last turn's run settling while this turn waits for its own run is not this turn's ending.
116+
if (turnRunId === "unknown" && next.runId === previous.idleRunId) {
117+
return { memory: { ...memory, settledRunId: next.runId }, announcement: null };
118+
}
115119
return {
116120
memory: { ...memory, turnRunId: null, settledRunId: next.runId },
117121
announcement: outcome,

0 commit comments

Comments
 (0)