Sound preview fails for small audio files in Web UI #7902

Closed
opened 2026-02-16 18:08:37 -05:00 by yindo · 1 comment
Owner

Originally created by @tanapok on GitHub (Jan 28, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Description

Bug Description

In the Sound effects settings page, hovering over some audio options doesn't play a preview sound.

Affected sounds (18 out of 48):

  • Alert 03, 09
  • Bip-bop 01, 02, 05, 07, 10
  • Staplebops 01, 02, 05
  • Nope 01, 03, 04, 06, 07, 09, 10
  • Yup 02, 06

Working sounds (30 out of 48):

  • All other sounds play correctly on hover

Root Cause

Vite inlines small audio files (<4KB) as base64 data URLs, but the Content-Security-Policy doesn't allow data: for media resources. CSP only has img-src and font-src with data:, but no media-src directive.

Environment

  • Browser: Firefox, Chrome
  • OpenCode version: Latest from dev branch

Plugins

No response

OpenCode version

1.1.40

Steps to reproduce

  1. Start OpenCode web app

  2. Navigate to Settings → Sound effects

Image
  1. Open any sound dropdown (e.g., Agent sound)

  2. Hover over each sound option

    • Alert 01-10: All should play
    • Bip-bop 01-10: All should play
    • Staplebops 01-07: All should play
    • Nope 01-12: All should play
    • Yup 01-06: All should play
  3. Check browser console for CSP errors

    • Should see no CSP violations
CSP errors

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @tanapok on GitHub (Jan 28, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Description ## Bug Description In the **Sound effects** settings page, hovering over some audio options doesn't play a preview sound. **Affected sounds** (18 out of 48): - Alert 03, 09 - Bip-bop 01, 02, 05, 07, 10 - Staplebops 01, 02, 05 - Nope 01, 03, 04, 06, 07, 09, 10 - Yup 02, 06 **Working sounds** (30 out of 48): - All other sounds play correctly on hover ## Root Cause Vite inlines small audio files (<4KB) as base64 data URLs, but the Content-Security-Policy doesn't allow `data:` for media resources. CSP only has `img-src` and `font-src` with `data:`, but no `media-src` directive. ## Environment - Browser: Firefox, Chrome - OpenCode version: Latest from dev branch ### Plugins _No response_ ### OpenCode version 1.1.40 ### Steps to reproduce 1. Start OpenCode web app 2. Navigate to Settings → Sound effects <img width="709" height="309" alt="Image" src="https://github.com/user-attachments/assets/c73d1e39-c961-43ba-95f7-3c32aa7930fc" /> 3. Open any sound dropdown (e.g., Agent sound) 4. Hover over each sound option - Alert 01-10: All should play - Bip-bop 01-10: All should play - Staplebops 01-07: All should play - Nope 01-12: All should play - Yup 01-06: All should play 5. Check browser console for CSP errors - Should see no CSP violations <img width="434" height="131" alt="CSP errors" src="https://github.com/user-attachments/assets/02397e22-d078-4ceb-b245-66012d9d1713" /> ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bugweb labels 2026-02-16 18:08:37 -05:00
yindo closed this issue 2026-02-16 18:08:37 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 28, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #10427: App/Desktop settings sound effects don't play when using keyboard to navigate menus and overlap when scrolling the menu quickly

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 28, 2026): This issue might be a duplicate of existing issues. Please check: - #10427: App/Desktop settings sound effects don't play when using keyboard to navigate menus and overlap when scrolling the menu quickly Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7902