Allow user to enqueue messages#1374
Merged
krissetto merged 4 commits intodocker:mainfrom Jan 16, 2026
Merged
Conversation
krissetto
reviewed
Jan 15, 2026
8da3b18 to
e9f6e7c
Compare
Did not mean to commit these Chris comments Lint
e9f6e7c to
7c503ec
Compare
krissetto
approved these changes
Jan 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kapture.2026-01-15.at.16.19.33.mp4
Implements a message queue in the TUI that allows users to enqueue up to 5 messages while the agent is busy processing. Queued messages are automatically sent when the previous message finishes, providing a smoother workflow without losing user input.
Changes
Core queue logic (
pkg/tui/page/chat/chat.go):queuedMessagestruct andmessageQueuefield tochatPagehandleSendMsg()– queues messages when agent is busy, processes immediately when idleprocessNextQueuedMessage()– pops and processes the next queued message (called when stream stops)handleClearQueue()– clears all queued messages withCtrl+XsyncQueueToSidebar()– syncs queue previews to sidebar displayEditor changes (
pkg/tui/components/editor/editor.go):workingguards that blocked sending – now delegates queuing decision tochatPageKey binding (
pkg/tui/tui.go,pkg/tui/messages/messages.go):Ctrl+Xbinding to clear the message queueClearQueueMsgmessage typeVisual feedback:
"Working… (3 queued)""Message queued (2 waiting) · Ctrl+X to clear"Sidebar (
pkg/tui/components/sidebar/sidebar.go):SetQueuedMessages()method andqueueSection()rendererBehavior
Esccancels current stream but preserves the queueCtrl+Xclears all queued messagesTests
pkg/tui/page/chat/queue_test.go– flow tests for queueing, rejection, clearing, FIFO orderpkg/tui/components/sidebar/queue_test.go– sidebar queue section renderingWIP