Soundboard 59: Soundboard popout parity: preview, icons, custom emoji, edit, delete confirmation, trimmer #388

Closed
opened 2026-11-13 01:40:52 +00:00 by charles · 0 comments
Owner

Plan: docs/superpowers/plans/2026-11-12-textchat.md, section "Task 59" (Soundboard and entrance sounds, added 2026-11-12, high priority per Charles).

Task 59: Soundboard popout parity: preview, icons, custom emoji, edit, delete confirmation, trimmer

Issue: (to be created)
Closes: #138, #139, #140, #141.

Files:

  • Create: crates/fluxer-ui/src/screens/main/soundboard/{edit.rs,trimmer.rs,confirm.rs}
  • Modify: crates/fluxer-ui/src/screens/main/soundboard/{mod.rs,picker.rs,upload.rs}, crates/fluxer-ui/src/screens/main/media.rs (wanted images), crates/fluxer-ui/src/files.rs, crates/fluxer-ui/src/app.rs (the new Outcomes), crates/fluxer-ui/README.md
  • Test: crates/fluxer-ui/tests/soundboard.rs, crates/fluxer-ui/tests/screenshots.rs

Interfaces:

  • Consumes: Task 56 (PreviewSound, PreviewLocalSound, StopPreview, previewing, can_manage_sound, can_upload_sound, EditSound, EditState, PickerModel::cooldown counting down), Text chat 14 (selectors::emoji_picker for the guild's custom emoji), Text chat 8 (emoji images).
  • Produces (files.rs, no new I/O path: two more methods on the injected SoundFileReader, with default bodies returning FileError::Unsupported so existing implementors compile): FileError::Unsupported; files::SoundOutline { duration: Duration, channels: u16, peaks: Vec<f32> }; SoundFileReader::outline(&self, bytes: SoundBytes, content_type: Option<String>) -> BoxFuture<'static, Result<SoundOutline, FileError>> and SoundFileReader::trim(&self, bytes: SoundBytes, content_type: Option<String>, range: Range<Duration>, mono: bool) -> BoxFuture<'static, Result<SoundBytes, FileError>> (answers a WAV), called only through Task::perform.
  • Produces (popout, SoundboardPicker.tsx): each available tile gets the preview button (play glyph, tooltip "Preview {name}") → PreviewSound with the sound's own volume; section titles of guilds show the guild icon (16 px, media_urls::guild_icon_url, acronym placeholder until loaded) and the favourites title its star; tiles and the emoji field draw custom emoji (media_urls::custom_emoji) through Images; the sound menu offers "Edit sound" and "Delete sound" when can_manage_sound (any guild), star always; "Upload a sound" when can_upload_sound for the call's guild; the cooldown notice reads PickerModel::cooldown each snapshot, so it counts down (#138).
  • Produces (confirm.rs, #139): "Delete sound" opens a confirmation (title "Delete sound", body naming the sound, buttons "Cancel" / "Delete", danger style, the original's confirm modal strings) and only "Delete" emits DeleteSound.
  • Produces (edit.rs, GuildSoundboardSoundModal.tsx mode edit): title "Edit sound", "Sound name" (2–32 chars, the original's errors "Name is required", "Name must be at least {min} characters", "Name must be {max} characters or fewer"), "Related emoji" with "Choose emoji" (a grid of the guild's custom emoji from emoji_picker plus Unicode by typing or picking) and "Remove emoji", "Volume" slider 0–100 %, "Preview" (PreviewSound with the slider's volume) → EditSound; errors "Couldn't save this sound" / "Something went wrong while saving this sound. Try again in a moment.". The upload dialog's emoji field uses the same picker (closes the custom-emoji half of #141).
  • Produces (trimmer.rs, EntranceSoundTrimmerModal.tsx): trimmer::Config { title: &'static str, max: Duration, max_bytes: usize, mono: bool } with SOUNDBOARD (title "Trim sound", 30 s, 20 MiB, stereo) and ENTRANCE ("Trim entrance sound", 5.2 s, 1 MiB, mono, the help line "Drag the handles to choose up to 5.2 seconds of audio. The selected region is what gets uploaded."); the waveform from outline (bars), two drag

🤖 Generated with Claude Code

Plan: `docs/superpowers/plans/2026-11-12-textchat.md`, section "Task 59" (Soundboard and entrance sounds, added 2026-11-12, high priority per Charles). ### Task 59: Soundboard popout parity: preview, icons, custom emoji, edit, delete confirmation, trimmer **Issue:** (to be created) **Closes:** #138, #139, #140, #141. **Files:** - Create: `crates/fluxer-ui/src/screens/main/soundboard/{edit.rs,trimmer.rs,confirm.rs}` - Modify: `crates/fluxer-ui/src/screens/main/soundboard/{mod.rs,picker.rs,upload.rs}`, `crates/fluxer-ui/src/screens/main/media.rs` (wanted images), `crates/fluxer-ui/src/files.rs`, `crates/fluxer-ui/src/app.rs` (the new `Outcome`s), `crates/fluxer-ui/README.md` - Test: `crates/fluxer-ui/tests/soundboard.rs`, `crates/fluxer-ui/tests/screenshots.rs` **Interfaces:** - Consumes: Task 56 (`PreviewSound`, `PreviewLocalSound`, `StopPreview`, `previewing`, `can_manage_sound`, `can_upload_sound`, `EditSound`, `EditState`, `PickerModel::cooldown` counting down), Text chat 14 (`selectors::emoji_picker` for the guild's custom emoji), Text chat 8 (emoji images). - Produces (`files.rs`, no new I/O path: two more methods on the injected `SoundFileReader`, with default bodies returning `FileError::Unsupported` so existing implementors compile): `FileError::Unsupported`; `files::SoundOutline { duration: Duration, channels: u16, peaks: Vec<f32> }`; `SoundFileReader::outline(&self, bytes: SoundBytes, content_type: Option<String>) -> BoxFuture<'static, Result<SoundOutline, FileError>>` and `SoundFileReader::trim(&self, bytes: SoundBytes, content_type: Option<String>, range: Range<Duration>, mono: bool) -> BoxFuture<'static, Result<SoundBytes, FileError>>` (answers a WAV), called only through `Task::perform`. - Produces (popout, `SoundboardPicker.tsx`): each available tile gets the preview button (play glyph, tooltip "Preview {name}") → `PreviewSound` with the sound's own volume; section titles of guilds show the guild icon (16 px, `media_urls::guild_icon_url`, acronym placeholder until loaded) and the favourites title its star; tiles and the emoji field draw custom emoji (`media_urls::custom_emoji`) through `Images`; the sound menu offers "Edit sound" and "Delete sound" when `can_manage_sound` (any guild), star always; "Upload a sound" when `can_upload_sound` for the call's guild; the cooldown notice reads `PickerModel::cooldown` each snapshot, so it counts down (#138). - Produces (`confirm.rs`, #139): "Delete sound" opens a confirmation (title "Delete sound", body naming the sound, buttons "Cancel" / "Delete", danger style, the original's confirm modal strings) and only "Delete" emits `DeleteSound`. - Produces (`edit.rs`, `GuildSoundboardSoundModal.tsx` mode `edit`): title "Edit sound", "Sound name" (2–32 chars, the original's errors "Name is required", "Name must be at least {min} characters", "Name must be {max} characters or fewer"), "Related emoji" with "Choose emoji" (a grid of the guild's custom emoji from `emoji_picker` plus Unicode by typing or picking) and "Remove emoji", "Volume" slider 0–100 %, "Preview" (`PreviewSound` with the slider's volume) → `EditSound`; errors "Couldn't save this sound" / "Something went wrong while saving this sound. Try again in a moment.". The upload dialog's emoji field uses the same picker (closes the custom-emoji half of #141). - Produces (`trimmer.rs`, `EntranceSoundTrimmerModal.tsx`): `trimmer::Config { title: &'static str, max: Duration, max_bytes: usize, mono: bool }` with `SOUNDBOARD` (title "Trim sound", 30 s, 20 MiB, stereo) and `ENTRANCE` ("Trim entrance sound", 5.2 s, 1 MiB, mono, the help line "Drag the handles to choose up to 5.2 seconds of audio. The selected region is what gets uploaded."); the waveform from `outline` (bars), two drag 🤖 Generated with [Claude Code](https://claude.com/claude-code)
charles added this to the Text chat milestone 2026-11-13 01:40:52 +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#388
No description provided.