From fddd44c11199454996475ad2a1d9115fc272cf4b Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 26 Feb 2026 16:45:58 +0000 Subject: [PATCH] story-kit: create 215_bug_cancel_button_still_discards_queued_messages_197_regression --- ...discards_queued_messages_197_regression.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .story_kit/work/1_upcoming/215_bug_cancel_button_still_discards_queued_messages_197_regression.md diff --git a/.story_kit/work/1_upcoming/215_bug_cancel_button_still_discards_queued_messages_197_regression.md b/.story_kit/work/1_upcoming/215_bug_cancel_button_still_discards_queued_messages_197_regression.md new file mode 100644 index 0000000..e5e8184 --- /dev/null +++ b/.story_kit/work/1_upcoming/215_bug_cancel_button_still_discards_queued_messages_197_regression.md @@ -0,0 +1,29 @@ +--- +name: "Cancel button still discards queued messages (197 regression)" +--- + +# Bug 215: Cancel button still discards queued messages (197 regression) + +## Description + +Bug 197 fixed this: pressing Cancel during generation should preserve queued messages by appending them to the chat input box. The fix was merged (commit a65c751) but was subsequently overwritten by story 199 (commit 8d29956, "web UI submits all queued items at once"), which rewrote Chat.tsx without the 197 changes. The `chatInputRef`, `appendToInput()`, and `ChatInputHandle` are all gone from the current code. + +## How to Reproduce + +1. Start a chat session with an agent +2. Queue up multiple messages while the agent is responding +3. Press the Cancel button + +## Actual Result + +Queued messages are silently discarded (Chat.tsx line 417-418 just clears the ref). + +## Expected Result + +Queued messages are joined with newlines and placed into the chat input box so the user can review, edit, or resend them. + +## Acceptance Criteria + +- [ ] Cancel button appends queued message texts (joined with newlines) to the chat input box before clearing the queue +- [ ] If the chat input already has content, queued text is appended (not replaced) +- [ ] Regression test covers this scenario