Voice 10: fluxer-core::voice soundboard and entrance sounds #71

Closed
opened 2026-11-11 12:17:35 +00:00 by charles · 0 comments
Owner

Files:

  • Create: crates/fluxer-core/src/voice/{soundboard.rs,entrance.rs}
  • Modify: effect.rs (ApiRequest variants), event.rs (ApiResult variants), persist.rs
  • Test: crates/fluxer-core/tests/soundboard.rs

Interfaces:

  • Produces: Soundboard { by_guild, defaults, favourites: Vec<String> /*≤100*/, cooldown_until, listener_mutes }; ApiRequest::{FetchGuildSounds, FetchDefaultSounds, SendSound, CreateSound, UpdateSound, DeleteSound, PostEntranceSound, FetchMedia { url, purpose }} and matching ApiResults; UserAction::{OpenSoundboard, PlaySound { sound_id, source_guild_id }, ToggleFavouriteSound(String), UploadSound { guild_id, name, bytes, volume, emoji }, RenameSound, DeleteSound, SetSoundboardMute { user_id, muted }}; selectors soundboard_picker(&App) -> PickerModel (favourites row, then current guild, then other guilds where USE_EXTERNAL_SOUNDS allows, defaults last), can_use_soundboard(&App) -> bool (CONNECT | SPEAK | USE_SOUNDBOARD in the current channel), active_effects(&App) (emoji shown over a sender until the clip ends).

  • Behaviour: spec §5.2 soundboard and entrance rules; sounds fetched lazily once per guild and kept current by the three gateway events; playback = FetchMedia (skipped when the audio engine reports the clip cached) → AudioCommand::PlayClip; upload validation (name 2–32, ≤20 MiB, ≤200 per guild) before any request.

  • Step 1: Write failing tests: effect_send_plays_with_capped_gain, effect_skipped_when_disabled_muted_sender_or_deaf, sender_marked_speaking_for_duration_plus_80ms, send_429_sets_cooldown_from_retry_after_or_2000ms, favourites_capped_at_100_and_persisted, picker_order_and_external_sound_permission, gateway_events_update_guild_list, upload_validation, entrance_sound_posted_after_connect_and_played_after_join_chime.

  • Step 2–5: FAIL → implement → PASS → commit feat(core): soundboard and entrance sounds.

Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-voice.md
Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-voice-design.md

**Files:** - Create: `crates/fluxer-core/src/voice/{soundboard.rs,entrance.rs}` - Modify: `effect.rs` (`ApiRequest` variants), `event.rs` (`ApiResult` variants), `persist.rs` - Test: `crates/fluxer-core/tests/soundboard.rs` **Interfaces:** - Produces: `Soundboard { by_guild, defaults, favourites: Vec<String> /*≤100*/, cooldown_until, listener_mutes }`; `ApiRequest::{FetchGuildSounds, FetchDefaultSounds, SendSound, CreateSound, UpdateSound, DeleteSound, PostEntranceSound, FetchMedia { url, purpose }}` and matching `ApiResult`s; `UserAction::{OpenSoundboard, PlaySound { sound_id, source_guild_id }, ToggleFavouriteSound(String), UploadSound { guild_id, name, bytes, volume, emoji }, RenameSound, DeleteSound, SetSoundboardMute { user_id, muted }}`; selectors `soundboard_picker(&App) -> PickerModel` (favourites row, then current guild, then other guilds where `USE_EXTERNAL_SOUNDS` allows, defaults last), `can_use_soundboard(&App) -> bool` (CONNECT | SPEAK | USE_SOUNDBOARD in the current channel), `active_effects(&App)` (emoji shown over a sender until the clip ends). - Behaviour: spec §5.2 soundboard and entrance rules; sounds fetched lazily once per guild and kept current by the three gateway events; playback = `FetchMedia` (skipped when the audio engine reports the clip cached) → `AudioCommand::PlayClip`; upload validation (name 2–32, ≤20 MiB, ≤200 per guild) before any request. - [ ] **Step 1: Write failing tests**: `effect_send_plays_with_capped_gain`, `effect_skipped_when_disabled_muted_sender_or_deaf`, `sender_marked_speaking_for_duration_plus_80ms`, `send_429_sets_cooldown_from_retry_after_or_2000ms`, `favourites_capped_at_100_and_persisted`, `picker_order_and_external_sound_permission`, `gateway_events_update_guild_list`, `upload_validation`, `entrance_sound_posted_after_connect_and_played_after_join_chime`. - [ ] **Step 2–5:** FAIL → implement → PASS → commit `feat(core): soundboard and entrance sounds`. Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-voice.md Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-voice-design.md
charles added this to the Voice milestone 2026-11-11 12:17:35 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#71
No description provided.