Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(mothership): eagerly update messageQueueRef in removeFromQueue
Match the pattern used by sendNow and editQueuedMessage — update the
ref synchronously so finalize's microtask cannot read a stale queue
and drain a message the user just removed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
  • Loading branch information
waleedlatif1 and claude committed Mar 14, 2026
commit 8c0fe13c2a0aad93b96d11718c2f5487f3aaa66d
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,7 @@ export function useChat(
}, [invalidateChatQueries, persistPartialResponse, executionStream])

const removeFromQueue = useCallback((id: string) => {
messageQueueRef.current = messageQueueRef.current.filter((m) => m.id !== id)
setMessageQueue((prev) => prev.filter((m) => m.id !== id))
}, [])
Comment thread
waleedlatif1 marked this conversation as resolved.

Expand Down
Loading