Skip to content

feat: play notification sound immediately on followup ask#12048

Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
feature/followup-notification-sound
Draft

feat: play notification sound immediately on followup ask#12048
roomote-v0[bot] wants to merge 1 commit intomainfrom
feature/followup-notification-sound

Conversation

@roomote-v0
Copy link
Copy Markdown
Contributor

@roomote-v0 roomote-v0 bot commented Apr 3, 2026

Related GitHub Issue

Closes: #12047

Description

This PR attempts to address Issue #12047. Feedback and guidance are welcome.

Previously, the followup ask type (when the AI asks a clarifying question) only received a notification sound via the delayed interactionRequired handler, which fires after a 2-second timeout. Users had no immediate audio cue that the AI needed their attention.

This change adds an immediate playSound("notification") call in the followup case handler in ChatView.tsx, so the notification sound plays as soon as the follow-up question appears (when the message is not partial/streaming). This gives users instant audio feedback that the AI needs their input.

Key implementation details:

  • Sound only plays when the followup message is complete (!isPartial), avoiding repeated sounds during streaming
  • The existing interactionRequired handler (2-second delayed notification) continues to work as a secondary reminder
  • The debounce mechanism (100ms) in playSound prevents accidental double-plays

Test Procedure

  • Added two new tests to ChatView.notification-sound.spec.tsx:
    1. Verifies notification sound plays when a non-partial followup ask is received
    2. Verifies notification sound does NOT play when the followup ask is partial (streaming)
  • All 8 tests in the notification-sound spec pass
  • All lint checks and type checks pass across the monorepo

Run tests: cd webview-ui && npx vitest run src/components/chat/__tests__/ChatView.notification-sound.spec.tsx

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes.
  • Documentation Impact: No documentation updates are required.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Documentation Updates

  • No documentation updates are required.

Additional Notes

This addresses the core request from the issue: immediate notification sound for followup asks. The broader feature request for custom sound selection per notification type (custom audio files, per-type volume controls, sound preview in settings) would be a significantly larger effort and is left for future work.

Interactively review PR in Roo Code Cloud

Add immediate notification sound when the AI asks a follow-up question
(followup ask type), so users get audio feedback right when the AI needs
their attention rather than waiting for the 2-second interactionRequired
timeout.

Also adds tests to verify the sound plays for non-partial followup asks
and does not play for partial (streaming) followup asks.

Closes #12047
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Audio Feedback for Task Completion and Replies

1 participant