From c9944c167f7ce5ad7a7754d1a8d4b66e3f121ba1 Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 25 Feb 2026 17:56:49 +0000 Subject: [PATCH] story-kit: create 197_bug_cancel_button_discards_queued_messages_instead_of_preserving_them_in_chat_input --- ...nstead_of_preserving_them_in_chat_input.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .story_kit/work/1_upcoming/197_bug_cancel_button_discards_queued_messages_instead_of_preserving_them_in_chat_input.md diff --git a/.story_kit/work/1_upcoming/197_bug_cancel_button_discards_queued_messages_instead_of_preserving_them_in_chat_input.md b/.story_kit/work/1_upcoming/197_bug_cancel_button_discards_queued_messages_instead_of_preserving_them_in_chat_input.md new file mode 100644 index 0000000..03b1b17 --- /dev/null +++ b/.story_kit/work/1_upcoming/197_bug_cancel_button_discards_queued_messages_instead_of_preserving_them_in_chat_input.md @@ -0,0 +1,29 @@ +--- +name: "Cancel button discards queued messages instead of preserving them in chat input" +--- + +# Bug 197: Cancel button discards queued messages instead of preserving them in chat input + +## Description + +Story #187 was supposed to make the cancel button preserve queued messages by putting them into the chat input box. The implementation queues messages correctly when the agent is busy, but the cancelGeneration function at Chat.tsx:414-416 simply discards them (clears the ref and state) instead of joining them and setting them as the chat input value. + +## How to Reproduce + +1. Start a chat with the bot so it's generating a response (loading=true) +2. Type and submit one or more messages while it's busy (they get queued) +3. Press the Cancel button + +## Actual Result + +Queued messages are silently discarded. The chat input remains empty. + +## Expected Result + +Queued messages are joined with newlines and placed into the chat input box so the user can review/edit/resend them. + +## Acceptance Criteria + +- [ ] On cancel, queued message texts are joined with newlines and set as the chat input value +- [ ] The queued messages queue is cleared after being moved to the input +- [ ] If the chat input already has text, queued messages are appended (not replacing existing text)