fix(task-chat): keep a yielded reply after its card is answered

A run that posted a question card is waiting on that card. Once the card
was answered, the turn became an accepted response wake and the wait
summary replaced the agent's reply. Any non-suppressed card from the run
now keeps it out of the response-wake path.

Wait stubs in the backward scan are skipped, so a stub echoed after the
authored reply no longer hides it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DottaandClaude Opus 5.5 committed 2026-11-05 13:49:23 -06:00
1 parent b1ccf0f9bc
commit c134d72620
4 files changed
+40 -5

No files matched your search

+23
View File
@@ -3242,6 +3242,29 @@ describe("TaskChatThread runtime transcript selection", () => {
expect(container.textContent).not.toContain(
"Waiting for user answers on the interview question card.",
);
// 4. Answered: the card leaves pending and the turn becomes an accepted
// response wake. The authored reply must keep its slot, not be replaced
// by the wait summary.
renderThread({
comments: [],
onAdd: async () => {},
issueStatus: "in_progress",
interactions: [
{
...question,
status: "answered",
resolvedAt: new Date("2026-08-25T18:01:00.000Z"),
updatedAt: new Date("2026-08-25T18:01:00.000Z"),
} as IssueThreadInteraction,
],
activeRun: undefined,
linkedRuns: [linkedRun("succeeded")],
});
expect(container.textContent).toContain("I've posted a question card");
expect(container.textContent).not.toContain(
"Waiting for user answers on the interview question card.",
);
});
it("keeps a yielded question turn out of the final-response slot", () => {