Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 31, 2025

Fixes issue where user feedback messages during diff save operations were being queued instead of sent immediately with the diff save.

Problem

Issue #6509 reported that Roo was no longer sending messages with diff saves. When users would type a message to provide steering/feedback while saving a diff, the message would no longer be included in the context as it had been previously. This was a regression caused by the message queueing functionality.

Root Cause

The message queueing system was intercepting user messages during diff save operations when sendingDisabled was true, causing them to be queued instead of sent immediately with the diff save.

Solution

  • Added a bypassQueue parameter to the handleSendMessage function
  • Modified button click handlers to detect tool operations (diff saves, file edits, etc.)
  • Allow messages to bypass the queue when they are part of a tool operation response
  • Ensures user feedback is sent immediately during diff saves while preserving the queueing behavior for other scenarios

Changes

  • webview-ui/src/components/chat/ChatView.tsx:
    • Added bypassQueue parameter to handleSendMessage
    • Updated handlePrimaryButtonClick and handleSecondaryButtonClick to detect tool operations
    • Messages bypass queue when bypassQueue is true, even if sendingDisabled is true

Testing

  • All existing tests pass
  • Verified that the fix allows diff save feedback to be sent immediately
  • Confirmed that normal message queueing behavior is preserved for non-tool operations

Resolves #6509


Important

Fixes message queueing issue during diff saves by adding bypassQueue to handleSendMessage in ChatView.tsx.

  • Behavior:
    • Fixes issue where user feedback messages during diff saves were queued instead of sent immediately.
    • Adds bypassQueue parameter to handleSendMessage to allow immediate message sending during tool operations.
    • Updates handlePrimaryButtonClick and handleSecondaryButtonClick to use bypassQueue for tool operations.
  • Code Changes:
    • In ChatView.tsx, modifies handleSendMessage to include bypassQueue logic.
    • Updates button click handlers to detect tool operations and use bypassQueue.
  • Testing:
    • All existing tests pass.
    • Verified immediate feedback sending during diff saves.
    • Confirmed normal queueing behavior for non-tool operations.

This description was created by Ellipsis for d437638. You can customize this summary. It will automatically update as commits are pushed.

- Add bypassQueue parameter to handleSendMessage function
- Detect tool operations (diff saves) in button click handlers
- Allow messages to be sent immediately during tool operations
- Fixes issue where user feedback during diff saves was being queued
- Resolves #6509
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 31, 2025 20:37
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Jul 31, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! I've reviewed the changes and the fix correctly addresses the issue. The implementation allows messages to bypass the queue during tool operations (including diff saves), ensuring user feedback is sent immediately. I have some suggestions for improvement below.

*/
const handleSendMessage = useCallback(
(text: string, images: string[], fromQueue = false) => {
(text: string, images: string[], fromQueue = false, bypassQueue = false) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JSDoc comment should be updated to document the new bypassQueue parameter. Consider adding documentation for this parameter to clarify its purpose:

@param bypassQueue - When true, sends the message immediately even if sendingDisabled is true (used for tool operations)

if (trimmedInput || (images && images.length > 0)) {
// Use handleSendMessage with bypassQueue=true to ensure message is sent immediately
// even if sendingDisabled is true (which happens during diff saves)
handleSendMessage(trimmedInput || "", images || [], false, true)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice there's identical logic for handling tool operations in both button click handlers (here and around line 805). Would it make sense to extract this into a shared helper function to reduce duplication? This would make the code more maintainable and ensure consistent behavior.

if (trimmedInput || (images && images.length > 0)) {
// Use handleSendMessage with bypassQueue=true to ensure message is sent immediately
// even if sendingDisabled is true (which happens during diff saves)
handleSendMessage(trimmedInput || "", images || [], false, true)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same duplication here as mentioned above. This identical logic could use the same shared helper function to avoid code duplication.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 31, 2025
@daniel-lxs
Copy link
Member

Fixed on #6487

@daniel-lxs daniel-lxs closed this Aug 1, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Aug 1, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Roo no longer sending messages with diff saves

4 participants