Voice 19: Soundboard popout (#80) #137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "voice-19-ui-soundboard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #80
Stacked on: voice-18-ui-call-view
The soundboard popout over the call view (Voice plan, Task 19): search, favourites, a section per guild with three sounds per row, star toggle, the original's notices when no sound can be played (permission, speak, muted, deafened, cooldown), loading/error/empty placeholders, a sound's context menu (star, rename and delete when permitted) and the upload dialog (path typed or dropped onto the window, name, volume, emoji) that emits
UploadSound.The sound file is read outside
fluxer-ui: the shell hands the path to an injectedfiles::SoundFileReader, implemented byfluxer_platform::files::SoundFilesand passed in byapps/fluxer(so this PR also touchesfluxer-platformandapps/fluxer).Tests:
crates/fluxer-ui/tests/soundboard.rs(three_per_row,search_filters_across_guilds,favourite_toggle_emits,cooldown_disables_buttons,no_permission_shows_reason, upload, stale reads, Escape),crates/fluxer-platform/tests/files.rs; screenshotsoundboard_popout.Known deviations (tracked as follow-ups, linked in the review reply): the cooldown shows its whole length rather than a live countdown (#109, the store has no clock); delete has no confirmation; rename and delete only for the call's guild; preview button, guild icons and custom emoji are left out.
🤖 Generated with Claude Code
The panel above the user area while in voice (VoiceConnectionStatusInner): "Connecting..." / "In voice chat" / "Connection failed", the channel line, the signal-strength icon with the original's latency thresholds and its "Ping: {n}ms" tooltip, disconnect, Try again and Dismiss. The status line opens the connection details (VoiceDetailsPopout): ping graph of the last 30 round trips, current and average ping, device, duration, participants, endpoint (click copies). The user area moves to its own module and gains the microphone and speaker buttons with the original's states and tooltips (effective mute, moderator mute/deafen and no-speak lock); a right-click on either opens Settings -> Voice & video. Refs #78 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Review round 1, what changed per finding (commits
cfba6fe,443a3f1):Blocking
read_sound_fileI/O in fluxer-ui (app.rs): fluxer-ui no longer touches the file system. New traitfluxer_ui::files::SoundFileReader(read(path, max_bytes) -> BoxFuture<Result<SoundBytes, FileError>>), implemented byfluxer_platform::files::SoundFiles, injected byapps/fluxerthroughfluxer_ui::run(snapshot, events, files), the same pattern asImageLoader. The shell only runs its future inTask::perform. The README exception text is gone; the fluxer-ui README now lists both injected loaders and keeps "do not add another". This PR therefore also touchesfluxer-platformandapps/fluxer(one line plus the constructor). Tests:crates/fluxer-platform/tests/files.rs(read from a non-tokio executor, size limit including exact boundary, missing file is an error).fixtures/golden/soundboard_popout.pngcommitted, rendered on lavapipe in the ubuntu:22.04 CI image.cargo test -p fluxer-ui --test screenshots -- --ignoredpasses all 9 there,call_view_4andcall_view_compactincluded.Minor
take_file_requestreturns anupload::FileRequestand the shell answers withFileRequest::answer; a result for another opening, or when nothing is being read, is ignored. Testa_late_file_read_does_not_reach_a_reopened_dialog(written first).SoundFilesreads on the tokio blocking pool, checks the size on the open handle, and caps the read atmax_bytes + 1.State::escape, testescape_closes_the_innermost_layer_first). The other deviations are follow-ups: delete confirmation #139, rename/delete for other guilds #140, preview button / guild icons / custom emoji #141 (with a note that emoji currently render as empty boxes because the bundled fonts have no emoji glyphs).cargo xtask ciis green locally (the screenshot step ran separately in the CI image, as above).Independent review (round 2) of Voice 19, head
443a3f1Scope:
git diff a7ec434..origin/voice-19-ui-soundboard.Plan tests:
three_per_row,search_filters_across_guilds,favourite_toggle_emits,cooldown_disables_buttonsandno_permission_shows_reasonall exist incrates/fluxer-ui/tests/soundboard.rsand assert what the plan describes.picker::COLUMNS == 3, and the drawn layout is checked by click-scan. The notice strings match the fork'sSoundboardPicker.tsxword for word. The cooldown seconds usediv_ceil(1000).max(1), which matches the fork'sMath.max(1, Math.ceil(ms/1000)). Thesoundboard_popoutscreenshot test and its golden image (1280x720) are committed.Interfaces: Task 19 creates no names that other tasks consume. It uses the Voice 10
UserActions andsoundboard_pickeras they were merged.fluxer_ui::rungains a third argument,files: Arc<dyn SoundFileReader>. Its only caller isapps/fluxer/src/main.rs, which is updated.Invariants:
fluxer-uidoes no file I/O (I grepped forstd::fs,File::andtokio::fsoutsidetesting). File reads go through the injectedfiles::SoundFileReader, whichfluxer_platform::files::SoundFilesimplements on the blocking pool. It checks the size before reading and caps the read at the limit plus one byte. There are no panics on server data: no indexing or unwrap in the picker, and a missing sound simply produces no menu. No tokens or secrets were added. Commits carryRefs #80.Review Focus: no item in the list belongs to Voice 19.
Local gate:
cargo xtask ciis green (fmt, clippy, deny, tests). The screenshot step was skipped here because there is no lavapipe, so the golden image still depends on the Linux runner.Findings
fluxer-platformandapps/fluxer, while the plan's Files list names onlyfluxer-ui. CLAUDE.md wants a two-crate task serialised and stated in the plan. This is a reasonable answer to the round-1 no-I/O finding, but Charles should confirm the second injected loader and the README wording ("Do not add another"). Tasks 20-22 changeapp.rsandmain.rsin parallel, so expect merge conflicts.local.soundboard.openis not reset when the user leaves voice or selects another channel. The popout reappears the next time a call view is shown.upload::modelshows "Sound uploaded." as soon assubmittedis set while the store's upload state is stillIdle. That happens in the frame before the store's snapshot reflects theUploadSound, so the message can flash briefly before "Uploading...".No blocking findings.
Verdict: APPROVED. Local CI is green. The integrator still needs to confirm the remote Linux screenshot run.