-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: prevent notification sound on attempt_completion with queued messages #8540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
…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
Contributor
Author
There was a problem hiding this 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.
webview-ui/src/components/chat/__tests__/ChatView.notification-sound.spec.tsx
Show resolved
Hide resolved
Collaborator
|
Tested, works. |
daniel-lxs
approved these changes
Nov 5, 2025
mrubens
approved these changes
Nov 6, 2025
mini2s
added a commit
to zgsm-ai/costrict
that referenced
this pull request
Nov 7, 2025
Summary
This PR fixes the issue where the notification sound incorrectly plays when
attempt_completionis 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.lengthbefore playing the celebration sound. The sound now only plays when:!isPartial)messageQueue.length === 0)Changes
messageQueue.length === 0condition to line 398Testing
Fixes #8537
Important
Fixes notification sound issue in
ChatView.tsxby adding a condition to prevent sound when messages are queued.ChatView.tsx, addedmessageQueue.length === 0condition to play celebration sound only when there are no queued messages and the message is not partial.ChatView.notification-sound.spec.tsxwith tests for:This description was created by
for bc91daa. You can customize this summary. It will automatically update as commits are pushed.