Skip to content

feat(tui): add audio notification system for completion and approval events#549

Merged
echobt merged 1 commit intomasterfrom
feat/audio-notifications-1769998684
Feb 2, 2026
Merged

feat(tui): add audio notification system for completion and approval events#549
echobt merged 1 commit intomasterfrom
feat/audio-notifications-1769998684

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Feb 2, 2026

Summary

Add audio notification system to the TUI that plays sounds when:

  • Agent response completes streaming
  • Tool/plan approval is requested

Changes

  • Add rodio dependency for cross-platform audio playback
  • Create sound.rs module with channel-based audio thread architecture
  • Embed WAV files for response completion and approval notification sounds
  • Play completion sound when streaming response finishes
  • Play approval sound when tool approval is requested
  • Graceful fallback to terminal bell when audio unavailable
  • Add sound toggle in settings menu

Technical Details

  • Uses bounded channel (capacity 16) to prevent memory exhaustion
  • Named thread (cortex-audio) for debugging
  • Non-blocking try_send to avoid UI freezes
  • Flushes stdout when falling back to terminal bell

Testing

  • Code compiles successfully with cargo check -p cortex-tui
  • Unit tests added for sound module

…events

- Add rodio dependency for cross-platform audio playback
- Create sound.rs module with channel-based audio thread architecture
- Embed WAV files for response completion and approval notification sounds
- Play completion sound when streaming response finishes
- Play approval sound when tool approval is requested
- Graceful fallback to terminal bell when audio unavailable
@echobt echobt merged commit eb1553c into master Feb 2, 2026
2 of 4 checks passed
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.

1 participant