feat(voice): surface soundboard in the in-call voice control bar#172
Conversation
The soundboard was fully implemented (SDK + standalone UI) but only reachable through Space Settings, so there was no way to play a sound while in a voice call (closes #150). Add a soundboard button to the voice control bar, after Screen share and before the trailing Spacer, gated on the use_soundboard permission via the same accordEffectivePermissions/accordHasPermission path Space Settings uses. It opens the existing showAccordSoundboard() picker, reusing its server-side play path, and passes through manageSoundboard so managers keep add/edit/delete controls. The dialog is responsive, so it works on both desktop and mobile. Add regression tests covering the button showing when use_soundboard is granted and hiding without it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Trim the build-method comment to only the maintenance invariant (the two-line version explained what the code does, violating project conventions). - Add a missing test: soundboard button must stay hidden in DM/group-DM voice calls where spaceId is null, regardless of permission state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MvQoPxs2QKDxU79J4ZCkad
Code Review — findings & fixes (commit 242ca69)Two fixes pushed to the branch. Findings ranked by severity: 🟡 MEDIUM — Comment explained what the code does (fixed)
The original two-line comment described what the code does ("Surface the soundboard to members who can use it…") and referenced the internal filename as a task note — both things the project's conventions ask us to avoid in source comments. The only information worth preserving is the maintenance invariant (two places compute the same permission, must stay in sync). Trimmed to: // Mirrors accord_space_settings.dart — keep these permission checks in sync.🟡 MEDIUM — Missing regression test: soundboard in DM voice calls (fixed)
When testWidgets('hides soundboard button in a DM voice call (null spaceId)', …)ℹ️ LOW — Admin user code path not tested (not fixed — needs auth override)
When ✅ Everything else looks good
Generated by Claude Code |
What
Adds a Soundboard button to the in-call voice control bar, so users can play sounds without leaving the call.
Closes #150.
Why
The soundboard is fully implemented — SDK support in
accordkit(REST + gateway events +AccordSoundmodel), a standalone management/play UI (showAccordSoundboard), anduse_soundboard/manage_soundboardpermissions. But it was only reachable through Space Settings → Soundboard. The voice control bar had no soundboard button, so while connected to a voice channel there was no way to play a clip — the docs even promise it as a voice control (docs/voice-and-video/voice-channels.md:28).Changes
lib/features/voice/views/voice_bar.dartIcons.graphic_eq) in the control row, placed after Screen share, before the trailingSpacer()(the spot called out in the issue).use_soundboardpermission, computed via the sameaccordEffectivePermissions/accordHasPermissionpath Space Settings uses (admin/owner/role-preview aware).showAccordSoundboard()picker, reusing its server-sideclient.soundboard.play()path, and passes throughmanage_soundboardso managers keep add/edit/delete/volume controls.test/features/voice/voice_bar_test.dartuse_soundboardis granted and is hidden without it.Acceptance criteria
use_soundboardclient.soundboard.play())Testing
flutter analyze --no-fatal-infoson the changed files → No issues foundflutter test test/features/voice/voice_bar_test.dart→ all 3 tests pass🤖 Generated with Claude Code