Text chat 50: core stream audio sources (#340) #356
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "textchat-50-core-stream-audio-sources"
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?
What this builds
fluxer-coreaudio sources, Linux capture options and the stream audio rule (audio spec §3.3, §4; plan Task 50).AudioNode,CaptureCommand::ListAudioTargets,CaptureEvent::AudioTargets(Option<Vec<AudioNode>>),AppMatch::Props,AudioRule.exclude.UserAction::RefreshAudioSourcesasks once (not again whileLoading); the answer becomesListed(v)orUnavailableinStreams::audio_targets.LinuxAudioCapture(defaults fromVoiceSettings.ts:491-497) inVideoSettings::linux_capture, withVoiceSettingChange::LinuxAudioCapture(..).IgnoreDevicesandDeviceSelectturn each other off. Persisted aslinux_audio_capture_<field>; older settings files still load.audio_sources.rs): ports ofLinuxAudioSourceRules.tsandScreenShareAudioSummary.ts:items_for_node,menu_items,display_name,routable_patterns,audio_summary/label,toggle_include/toggle_exclude,pick_system/pick_none.screen_share_rule). Window shares are unchanged. A change while live re-sendsCaptureCommand::Update.Testing
crates/fluxer-core/tests/stream_audio_sources.rshas the 25 tests named in the plan. I wrote them first and confirmed they failed before writing the code.apps/fluxercapture_rt::tests::property_patterns_alone_fall_back_to_system_audiocovers the review fix.FLUXER_SCREENSHOT_TESTS=1 cargo xtask cipasses locally after merging the currentorigin/textchat(eaafba9).Deviations / files outside the Files list
apps/fluxer/src/capture_rt.rschanged so the app compiles.ListAudioTargetsanswersAudioTargets(None), so the submenu stays hidden.AppMatch::Propsis not routed and the exclude list is empty. A rule made only of property patterns becomesSystem. Text chat 52 (#342) replaces all of this.Closes #340
🤖 Generated with Claude Code
Review round 1, changes per finding:
textchat-50-core-stream-audio-sourcesand opened this PR, which targetstextchat.origin/textchat(eaafba9).FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciruns to the end and every step passes onc4d2fa7.screen_share_ruleon Windows (minor): fixed in1ca0b0f.capture_rt::audio_rulenow maps anApplicationsrule toSystemwhen no entries are left after it dropsProps. So WASAPI never gets an empty application list, and PipeWire no longer captures nothing. The core rule is the same on every platform, so the core tests run the same on both runners. New test:property_patterns_alone_fall_back_to_system_audio.RefreshAudioSourcescan stayLoading(minor): deferred to follow-up #357. It matches the spec ("not again while Loading"); the fix depends on how Text chat 52 reports listing errors.capture_rt.rsoutside the Files list (minor): kept, because the app does not compile without it. It is now listed under Deviations in the PR body, and Text chat 52 (#342) replaces it. With the fix above, aspecificrule that has only property patterns falls back to system audio as intended.Independent review: Text chat 50 (head
c4d2fa7)Scope:
git diff origin/textchat..c4d2fa7, the 11 files this task touches.Checks
crates/fluxer-core/tests/stream_audio_sources.rs, and each asserts what the plan says. The defaults aretrue, true, true, false, true, false, false(VoiceSettings.ts:491-497). The labels are "No audio", "Entire system", the name, "Custom", "1 app" and "N apps". Thefluxer.target.objectsvalue keeps its\nthrough the U+001E/U+001F encoding. Old files load with the defaults, and a wrong-typed value keeps the default.AudioNode,ListAudioTargets,AudioTargets(Option<Vec<AudioNode>>),AppMatch::Props,AudioRule.exclude(Defaultis empty),RefreshAudioSources,stream::AudioTargets(DefaultisNotAsked),LinuxAudioCapture/LinuxAudioCaptureChange,VideoSettings::linux_capture, and the full set ofaudio_sourcesfunctions.--record.LinuxAudioSourceRules.ts,ScreenShareAudioSummary.tsandScreenShareStartFlow.tsbuildLinuxNativeAudioRule. These all match: the??and empty-pid handling, the sink target pattern, the volatile-key stripping, the device target liftingignoreDevices, andignoreVirtual(as a flag here;fluxer-captureturns it into anode.virtualexclude).FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin a fresh review worktree: all steps passed.Findings
golive.rsrefresh_share:with_audiois fixed when the share starts. A screen share started in mode "None" publishes no audio track. Picking "Entire system" or an app while live then sends nothing (with_audiois false), so stream audio stays off until the share restarts. The original republishes (ensureLinuxScreenShareAudioPublication). No test covers this. Suggest a follow-up issue rather than a fix here.golive.rs:CaptureCommand::Switchdoes not updategolive.audio. After a window to screen switch, the next unrelated settings change sends anUpdatewhose audio rule differs from the one the capture has. This realigns the capture, so it is harmless, but it does not happen at the switch itself. The audio-on-switch behaviour was there before this task.RefreshAudioSourcescan stayLoadingforever if no answer comes. Deferred to follow-up #357, which exists and is open.apps/fluxer/src/capture_rt.rsis outside the Files list. The change is needed to keep the build compiling (exhaustive matches), it is listed under Deviations, and Task 52 (#342) replaces it. The fallback to System for rules made only ofProps, with its test, is right for now.No blocking findings.
Verdict: approve. CI is green locally. I did not check the remote runners.