Skip to content

Conversation

@roomote
Copy link

@roomote roomote bot commented Oct 6, 2025

Summary

This PR fixes the issue where the notification sound incorrectly plays when attempt_completion is called despite having messages already queued. This was misleading users into thinking input was required when the task would actually continue automatically with the queued message.

Problem

When a user types a message during task execution, it gets queued. When the task reaches attempt_completion, the celebration sound was playing even though the queued message would be automatically processed, creating confusion about whether the task had truly paused or would continue on its own.

Solution

Added a check for messageQueue.length before playing the celebration sound. The sound now only plays when:

  • The message is not partial (!isPartial)
  • AND the message queue is empty (messageQueue.length === 0)

Changes

  • ChatView.tsx: Added messageQueue.length === 0 condition to line 398
  • Tests: Added comprehensive test suite with 4 test cases covering:
    • No sound when queue has messages
    • Sound plays when queue is empty
    • No sound with multiple queued messages
    • No sound for partial completion results

Testing

  • ✅ All new tests pass
  • ✅ Existing tests continue to pass
  • ✅ Linting and type checking pass

Fixes #8537


Important

Fixes notification sound issue in ChatView.tsx by adding a condition to prevent sound when messages are queued.

  • Behavior:
    • In ChatView.tsx, added messageQueue.length === 0 condition to play celebration sound only when there are no queued messages and the message is not partial.
  • Tests:
    • Added ChatView.notification-sound.spec.tsx with tests for:
      • No sound when queue has messages.
      • Sound plays when queue is empty.
      • No sound with multiple queued messages.
      • No sound for partial completion results.

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

…sages

- Added check for messageQueue.length before playing celebration sound
- Only plays sound when both !isPartial and messageQueue is empty
- Added comprehensive tests to verify the fix
- Fixes #8537
@roomote roomote bot requested review from cte, jr and mrubens as code owners October 6, 2025 18:47
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. bug Something isn't working labels Oct 6, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 6, 2025
Copy link
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.

Self-review complete: reviewing my own code like a robot auditing its reflection—optimizations detected, ego not found.

@hannesrudolph
Copy link
Collaborator

Tested, works.

@hannesrudolph hannesrudolph moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Oct 27, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Oct 27, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 5, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Needs Review] in Roo Code Roadmap Nov 5, 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 lgtm This PR has been approved by a maintainer PR - Needs Review size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Status: PR [Needs Review]

Development

Successfully merging this pull request may close these issues.

[BUG] Notification sound plays on attempt_completion despite queued messages (misleads users)

4 participants