From 4d476a957fb644f6d61be1164eb54926816366fa Mon Sep 17 00:00:00 2001 From: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 12:06:28 +0000 Subject: [PATCH] fix(telegram): isolate verbose status after streamed finals Co-authored-by: Martin Kessler <2647990+kesslerio@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> --- extensions/telegram/src/bot-message-dispatch.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extensions/telegram/src/bot-message-dispatch.test.ts b/extensions/telegram/src/bot-message-dispatch.test.ts index fe5ccc67705..0c59c713ed2 100644 --- a/extensions/telegram/src/bot-message-dispatch.test.ts +++ b/extensions/telegram/src/bot-message-dispatch.test.ts @@ -1624,6 +1624,9 @@ describe("dispatchTelegramMessage draft streaming", () => { expect(answerDraftStream.update).toHaveBeenNthCalledWith(2, "Normal reply"); expect(answerDraftStream.update).toHaveBeenNthCalledWith(3, trailingFinalStatusText); expect(answerDraftStream.forceNewMessage).toHaveBeenCalledTimes(1); + expect(answerDraftStream.forceNewMessage.mock.invocationCallOrder[0]).toBeLessThan( + answerDraftStream.update.mock.invocationCallOrder[2], + ); expect(deliverReplies).not.toHaveBeenCalled(); }); @@ -2118,6 +2121,9 @@ describe("dispatchTelegramMessage draft streaming", () => { expect(answerDraftStream.update).toHaveBeenNthCalledWith(1, "Cracking\n\n`🛠️ Exec`"); expect(answerDraftStream.update).toHaveBeenNthCalledWith(2, trailingFinalStatusText); expect(answerDraftStream.forceNewMessage).toHaveBeenCalledTimes(2); + expect(answerDraftStream.forceNewMessage.mock.invocationCallOrder[1]).toBeLessThan( + answerDraftStream.update.mock.invocationCallOrder[1], + ); expectDeliveredReply(0, { text: "Branch is up to date" }); });