Text chat 61: apps/fluxer and devserver: soundboard and entrance-sound runtime, parity (#390) #438
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "textchat-61-app-soundboard-entrance-runtime"
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 #390
Refs #92 (favourites synced through user settings, with Text chat 14).
What changed
fluxer-devserver):POST /users/@me/entrance-sounds(201; the ninth is 400ENTRANCE_SOUND_QUOTA_REACHED),PATCH/DELETE /users/@me/entrance-sounds/{id}(delete clears selections),PUT /users/@me/entrance-sound-selections(204, scope checked),feature_voice_entrance_soundson inlimits; soundboard fixtures with a custom emoji (trumpetinvoice_ready.json), a creator and a second guild; scenario stepsrelay-joins/relay-entrance.apps/fluxer): newsound_edit_rt::AppSoundFiles(reads throughSoundFiles, outlines with 300 peaks and trims withfluxer_audio::editon the blocking pool; nothing of a file or path is logged), injected intofluxer_ui::runin place ofSoundFiles.AudioCommand::StopClipnow callsAudioEngine::stop_clip. The entrance libraryApiRequests were already wired by the merged base.entrance_upload_rename_delete_and_select,entrance_quota_is_eight,entrance_delete_clears_selections,selection_scope_is_validated; runtimepreview_sound_reaches_the_mixer,local_preview_plays_bytes_and_stops,outline_and_trim_answer_through_the_reader,entrance_upload_select_and_join_announces_it,muted_entrance_user_plays_nothing,edit_sound_round_trip_through_gateway_update,soundboard_favourite_star_syncs_through_user_settings.fluxer-proto/tests/expressions.rsnow expects the voice fixture's one emoji.section-voice_video-entrance-soundstaylater/planned: the settings section that chooses a sound is Text chat 60, which is not ontextchatyet; the notes say the runtime side is done.Local
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci: all steps passed (one earlier run hit the known exit-time SIGSEGV of the app lib tests, #304, after all 65 passed).Steps for Charles on the desktop
🤖 Generated with Claude Code
Review round 2, per finding:
db944d0, Refs #390) together with what it was missing (apps/fluxer/src/sound_edit_rt.rs, the AppSoundFiles injection in main.rs, StopClip -> AudioEngine::stop_clip, READMEs, parity notes, a race fix in preview_sound_reaches_the_mixer and the proto fixture assertion for the new emoji), merged with origin/textchat (37000d2), run through FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci (all steps passed) and pushed; this PR is the diff against textchat.Note: the entrance-picker parity rows stay later/planned because the settings section (Text chat 60) is not on textchat yet.
Independent review: Text chat 61 (app-soundboard-entrance-runtime)
Reviewed
git diff origin/textchat...origin/textchat-61-app-soundboard-entrance-runtimeat37000d2.What checks out
entrance_upload_rename_delete_and_select,entrance_quota_is_eight(400,ENTRANCE_SOUND_QUOTA_REACHED, 8 sounds),entrance_delete_clears_selections,selection_scope_is_validated. Runtime:preview_sound_reaches_the_mixer,local_preview_plays_bytes_and_stops,outline_and_trim_answer_through_the_reader(300 buckets),entrance_upload_select_and_join_announces_it,muted_entrance_user_plays_nothing,edit_sound_round_trip_through_gateway_update,soundboard_favourite_star_syncs_through_user_settings. Each one asserts what the plan describes.ApiRequests are executed inruntime.rs(already on the base).PlayClipBytescallsplay_clipwith the bytes.StopClipnow callsAudioEngine::stop_clip.sound_edit_rt::AppSoundFileswrapsSoundFiles, implementsoutline/trimwithfluxer_audio::editon the blocking pool (OUTLINE_BUCKETS = 300) and is injected inmain.rs.EntranceSoundController.ts(201/200/204/204). The checks and error codes matchEntranceSoundService.tsin the server's order.deleteclears selections and returns 204 for an unknown sound.voice_ready.jsonemoji matchesGuildEmojiResponse(id,name,animated,nsfw).Findings
db944d0does not name the server file and line the fixtures were shaped from. The Global Constraints require this, and the Interfaces block asks forEntranceSoundController.ts/EntranceSoundService.ts. The code comments name them, so please add the reference to the PR body (no history rewrite needed).scope_idis rejected first by the zodScopeIdSchemaregex (packages/schema/src/domains/user/EntranceSoundSchemas.ts:13), so theENTRANCE_SOUND_INVALID_SCOPEservice code is never reached. The devserver answers withENTRANCE_SOUND_INVALID_SCOPEinstead. The status (400) matches. The client should not depend on the code.docs/parity/settings.tomlsection-voice_video-entrance-soundstaysplannedinstead ofdoneas the plan says. This is justified because Text chat 60 is not on textchat yet. Flip it when 60 lands; a follow-up issue would track that.Local CI: NOT CONFIRMED.
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciwas started in the review worktree but was stopped while still in the clippy step, before it reached the tests, because the review had to return. The integrator must confirm CI is green.Verdict: no blocking findings in the code. Not approved yet because the reviewer's local CI run did not finish.
Task 61: apps/fluxer and devserver: soundboard and entrance-sound runtime, parity (#390)to Text chat 61: apps/fluxer and devserver: soundboard and entrance-sound runtime, parity (#390)Independent review: Text chat 61 (head
eba515e, diff9cf9a68..eba515e)Checked
crates/fluxer-devserver/tests/voice.rs): upload/rename/delete/select, quota of 8 (exact message "You've reached the limit of 8 saved entrance sounds."), delete clears only that sound's selections, and the scope pattern (acceptsglobal|guilds|dms|guild:\d{1,20}, rejects the rest withENTRANCE_SOUND_INVALID_SCOPE, also on clear). Runtime (apps/fluxer/tests/voice_runtime.rs): preview reaches the mixer, local bytes preview plusStopClip, outline (300 peaks) and trim (mono, 100 ms), entrance upload, select and join (ENTRANCE_SOUND_PLAYcarries the new sound's URL), muted entrance user (not even fetched; unmuted control plays), edit round trip throughGUILD_SOUNDBOARD_SOUND_UPDATE, and favourites: two stars become one debounced write, no second write, and another session's write replaces the list (#92).PlayClipBytescallsplay_clip(&key, Some(bytes), gain, tag.0).StopClipcallsAudioEngine::stop_clip(tag.0).sound_edit_rt::AppSoundFilesreads throughSoundFiles, and runsoutline/trimthroughfluxer_audio::editon the blocking pool. It is created insideruntime.enter(), so it works when iced polls the futures, and it is injected intofluxer_ui::run. The four entranceApiRequests were already wired on the base (runtime.rs:1123-1148).sound_edit_rtlogs nothing. Its errors areFileError::Unsupportedor aJoinErrorstring, with no path in either.unobserved(), so--recordnever sees it.EntranceSoundService.ts(check order name → quota → base64 → size → format → duration;normalizeNametrim and 1..32; error codes and paths) andEntranceSoundController.ts(201 and 204, theserializeSoundfields).GuildEmojiResponse(id, name, animated, nsfw).limitsoverride follows theLimitConfigServicerules/overrides wire format.get/checked_add, and ids are parsed with a 400 on failure.soundboard_favourite_star_syncs_through_user_settings.FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin a clean review worktree passed: all steps green, livekit-interop skipped as usual.Findings
db944d0does not name the server file and line its fixtures were copied from, which the Global Constraints require. The code comments do nameEntranceSoundService/EntranceSoundConstants.ts, and I checked the shapes against the server source, so this is a process gap only.section-voice_video-entrance-soundstaysplannedwith a note, and the plan saiddone. That is correct while Text chat 60 is not merged. Whoever lands 60 must set it to done and remove the note.fixtures/scenarios/voice.tomlsays entrancescopesare"global"or"guild:<id>", but the fixture now also uses"dms".Verdict: approved. No blocking findings and local CI is green. I did not check the remote runners.