From 564b2c1d03cf477d7cfc23414b60d1ec76904ecc Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Wed, 21 Oct 2026 20:11:33 +0900 Subject: fix(chat): delay delivery warning and shorten queued action label Wait one second before displaying pending-input recovery UI, cancelling on confirmation or removal. Label the queued-message stop action Flush without changing behavior. Verified: 2451 frontend tests passed twice, typecheck, Biome, and build. --- src/features/chat/ui.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/features/chat/ui.test.ts') diff --git a/src/features/chat/ui.test.ts b/src/features/chat/ui.test.ts index 480d593..74c0619 100644 --- a/src/features/chat/ui.test.ts +++ b/src/features/chat/ui.test.ts @@ -871,14 +871,14 @@ describe("Composer", () => { for (const queuedMessageCount of [1, 2]) { await rerender({ queuedMessageCount }); - const button = screen.getByRole("button", { name: "Interrupt & send queued" }); - expect(button).toHaveTextContent(/^Interrupt & send queued$/); + const button = screen.getByRole("button", { name: "Flush" }); + expect(button).toHaveTextContent(/^Flush$/); expect(button).toHaveAttribute( "title", "Stop the current response and start the queued message now", ); } - await user.click(screen.getByRole("button", { name: "Interrupt & send queued" })); + await user.click(screen.getByRole("button", { name: "Flush" })); expect(onStop).toHaveBeenCalledTimes(2); expect(onSend).not.toHaveBeenCalled(); expect(onQueue).not.toHaveBeenCalled(); @@ -886,10 +886,10 @@ describe("Composer", () => { const input = screen.getByRole("textbox", { name: "Message input" }); await user.type(input, "next"); expect(screen.getByRole("button", { name: "Queue" })).toBeInTheDocument(); - expect(screen.queryByRole("button", { name: "Interrupt & send queued" })).toBeNull(); + expect(screen.queryByRole("button", { name: "Flush" })).toBeNull(); await user.click(screen.getByRole("button", { name: "Queue" })); expect(onQueue).toHaveBeenCalledExactlyOnceWith("next", undefined); - expect(screen.getByRole("button", { name: "Interrupt & send queued" })).toBeInTheDocument(); + expect(screen.getByRole("button", { name: "Flush" })).toBeInTheDocument(); await rerender({ queuedMessageCount: 0 }); expectPlainStop(); // Queue drained or cancelled. await rerender({ queuedMessageCount: 1, status: "idle" }); -- cgit v1.2.3