Queue prompts sent while Claude is working#211
Open
leonidasbarkas98-cpu wants to merge 1 commit into
Open
Conversation
Messages sent during processing are no longer lost or racing the running process: they are enqueued (in-memory FIFO, full payload incl. plan/thinking mode and images), shown as a greyed-out 'Queued' placeholder in the chat, and auto-sent through the normal send path once the running process exits cleanly. There is never a second overlapping claude process — overlapping spawns fight over the session lock and kill the permission channel (andrepimenta#128). - Queue is cleared on Stop/new session (_killClaudeProcess), webview reload, process error or non-zero exit (no auto-send into a broken session); placeholders are removed via queueCleared. - Send path (Enter) stays usable while processing: disableButtons no longer disables the send button (it was its only consumer); the send/stop button swap is unchanged. - Loading bubble now carries a dedicated loading-indicator class; clearLoading removes exactly that instead of guessing by position (fixes it being leaked when queued placeholders or 'Compacting...' messages sit at the end of the list). - close/error handlers ignore stale events from a superseded process (a late close of an old process could reset state of the new one started by the queue drain); _killClaudeProcess also cancels pending permission requests synchronously so a stale entry can never keep _maybeEndClaudeStdin from closing the new stdin. - [queue] diagnostic logging on enqueue/auto-send/clear. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Messages sent while Claude is still working are no longer lost or racing the running process: they are enqueued (in-memory FIFO with the full payload incl. plan/thinking mode and images), shown as a greyed-out "Queued" placeholder in the chat, and auto-sent through the normal send path once the running process exits cleanly. There is never a second overlapping claude process — overlapping spawns fight over the session lock and kill the permission channel (#128).
Details:
Addresses #91. Based on current main (ab6e307),
tsc --noEmitclean, no new dependencies.