Text chat 53: Stream menu "Audio sources" and "Audio settings" submenus; device dropdown labels (#343) #369

Manually merged
charles merged 0 commits from textchat-53-ui-audio-sources-menu into textchat 2026-11-13 08:46:43 +00:00
Owner

What this adds

  • Stream settings menu (screenshare/settings_menu.rs), both the full menu and the compact live one. These rows come right after the sound checkbox, for a screen share or a share that has not started yet, while sound is on and Streams::audio_targets is not Unavailable:
    • "Audio sources: {summary}": the "Capture" radios ("Entire system audio", "None"), "Include apps", "Exclude from system" (only in system mode) and "Refresh audio sources", which keeps the menu open. A group with no items is not shown, as in the original. The items come from audio_sources::menu_items, the label from audio_summary, and the picks from toggle_include / toggle_exclude / pick_system / pick_none.
    • "Audio settings": the seven LinuxAudioCapture checkboxes in the original's order and wording. Each one sends VoiceSettingChange::LinuxAudioCapture(..), and the store turns off the other switch of the Ignore-devices / Device-selection pair.
  • Opening the menu sends UserAction::RefreshAudioSources, and so does "Refresh audio sources".
  • screenshare::Message gains PickSystemAudio, PickNoAudio, ToggleIncludeSource, ToggleExcludeSource, RefreshAudioSources and LinuxAudioCapture. The labels of Entry::Toggle and Entry::Submenu change to String, because the source names and the summary are built at run time.
  • Device dropdowns (voice_video/devices.rs): new DefaultPlatform::{Linux, Windows, MacOs} with current(), and default_label(platform, endpoint), which gives "Linux default (X)", or plain "Linux default" when there is no default device. The default device is listed first, then the others by name, ignoring case. DEFAULT_LABEL is removed.
  • Parity: the #233 row of docs/parity/screenshare.md is now done, and an "Audio settings" row is added.

Tests

  • New crates/fluxer-ui/tests/stream_audio_sources.rs: audio_sources_submenu_only_for_screen_share_with_sound, audio_sources_hidden_without_pipewire, summary_in_the_submenu_label, include_and_exclude_groups_follow_the_mode, refresh_keeps_the_menu_open_and_asks_the_store, audio_settings_checkboxes_in_order_with_defaults, ignore_devices_and_device_select_toggle_each_other_in_the_menu.
  • settings_voice.rs: default_option_names_the_platform_and_endpoint, devices_sorted_default_first_then_by_name, and the existing dropdown test updated.
  • Screenshots: stream_menu_audio_sources, stream_menu_audio_settings, voice_devices_linux_default. The goldens were made on lavapipe in the Ubuntu 22.04 image. control_bar_sharing, stream_settings_menu and settings_voice were regenerated, because they now show the submenus or the new default label. All 35 screenshot tests pass on lavapipe, and also on this machine's GPU.
  • Existing expectations updated in screenshare_controls.rs (menu labels) and call_view.rs (the caret now also sends RefreshAudioSources).
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green locally.

Deviations and notes

  • The submenus also show while the answer is NotAsked or Loading, as the original does while it loads. On Windows and macOS the backend answers None and they disappear, so they may show for one frame on the first open.
  • "Ignore input media" is hidden while "Device selection" is on, as in the original (StreamSettingsMenuContent.tsx). With the defaults, all seven show.
  • Not done (audio spec §6): the window-scope radio "Shared window audio" and the device-share microphone item.
  • Known look issue, not fixed here: the context menu card stays 208 px wide with fixed 32 px rows, so "Audio sources: Entire system" wraps onto the next row (see the goldens). Opened as bug #367, because the fix changes every context menu.
  • Task 50 is now on textchat; the branch has origin/textchat (67da1c7) merged in (conflicts in docs/parity/screenshare.md, kept both the stereo row and the audio-sources rows, and crates/fluxer-ui/README.md, kept the composer text plus the device-dropdown sentence). FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green again after the merge.
  • No side-by-side screenshot of the Electron app is attached: this machine has no running Electron build with the PipeWire bridge. The native goldens are in fixtures/golden/.

Closes #343

🤖 Generated with Claude Code

## What this adds - **Stream settings menu** (`screenshare/settings_menu.rs`), both the full menu and the compact live one. These rows come right after the sound checkbox, for a screen share or a share that has not started yet, while sound is on and `Streams::audio_targets` is not `Unavailable`: - "Audio sources: {summary}": the "Capture" radios ("Entire system audio", "None"), "Include apps", "Exclude from system" (only in system mode) and "Refresh audio sources", which keeps the menu open. A group with no items is not shown, as in the original. The items come from `audio_sources::menu_items`, the label from `audio_summary`, and the picks from `toggle_include` / `toggle_exclude` / `pick_system` / `pick_none`. - "Audio settings": the seven `LinuxAudioCapture` checkboxes in the original's order and wording. Each one sends `VoiceSettingChange::LinuxAudioCapture(..)`, and the store turns off the other switch of the Ignore-devices / Device-selection pair. - Opening the menu sends `UserAction::RefreshAudioSources`, and so does "Refresh audio sources". - `screenshare::Message` gains `PickSystemAudio`, `PickNoAudio`, `ToggleIncludeSource`, `ToggleExcludeSource`, `RefreshAudioSources` and `LinuxAudioCapture`. The labels of `Entry::Toggle` and `Entry::Submenu` change to `String`, because the source names and the summary are built at run time. - **Device dropdowns** (`voice_video/devices.rs`): new `DefaultPlatform::{Linux, Windows, MacOs}` with `current()`, and `default_label(platform, endpoint)`, which gives "Linux default (X)", or plain "Linux default" when there is no default device. The default device is listed first, then the others by name, ignoring case. `DEFAULT_LABEL` is removed. - Parity: the #233 row of `docs/parity/screenshare.md` is now done, and an "Audio settings" row is added. ## Tests - New `crates/fluxer-ui/tests/stream_audio_sources.rs`: `audio_sources_submenu_only_for_screen_share_with_sound`, `audio_sources_hidden_without_pipewire`, `summary_in_the_submenu_label`, `include_and_exclude_groups_follow_the_mode`, `refresh_keeps_the_menu_open_and_asks_the_store`, `audio_settings_checkboxes_in_order_with_defaults`, `ignore_devices_and_device_select_toggle_each_other_in_the_menu`. - `settings_voice.rs`: `default_option_names_the_platform_and_endpoint`, `devices_sorted_default_first_then_by_name`, and the existing dropdown test updated. - Screenshots: `stream_menu_audio_sources`, `stream_menu_audio_settings`, `voice_devices_linux_default`. The goldens were made on lavapipe in the Ubuntu 22.04 image. `control_bar_sharing`, `stream_settings_menu` and `settings_voice` were regenerated, because they now show the submenus or the new default label. All 35 screenshot tests pass on lavapipe, and also on this machine's GPU. - Existing expectations updated in `screenshare_controls.rs` (menu labels) and `call_view.rs` (the caret now also sends `RefreshAudioSources`). - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is green locally. ## Deviations and notes - The submenus also show while the answer is `NotAsked` or `Loading`, as the original does while it loads. On Windows and macOS the backend answers `None` and they disappear, so they may show for one frame on the first open. - "Ignore input media" is hidden while "Device selection" is on, as in the original (`StreamSettingsMenuContent.tsx`). With the defaults, all seven show. - Not done (audio spec §6): the window-scope radio "Shared window audio" and the device-share microphone item. - Known look issue, not fixed here: the context menu card stays 208 px wide with fixed 32 px rows, so "Audio sources: Entire system" wraps onto the next row (see the goldens). Opened as bug #367, because the fix changes every context menu. - Task 50 is now on `textchat`; the branch has origin/textchat (67da1c7) merged in (conflicts in `docs/parity/screenshare.md`, kept both the stereo row and the audio-sources rows, and `crates/fluxer-ui/README.md`, kept the composer text plus the device-dropdown sentence). `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green again after the merge. - No side-by-side screenshot of the Electron app is attached: this machine has no running Electron build with the PipeWire bridge. The native goldens are in `fixtures/golden/`. Closes #343 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Refs #340

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Until Text chat 52 routes property patterns, a "specific" rule made only
of them reached fluxer-capture as an empty application list, which WASAPI
refuses and PipeWire treats as capturing nothing. Map it to System.

Refs #340

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stream settings menu (full and compact live) gains, after the sound
checkbox of a screen share while it is on, "Audio sources: {summary}"
(Capture radios, Include apps, Exclude from system, Refresh audio sources)
and "Audio settings" (the seven LinuxAudioCapture switches), hidden once
the backend reports no PipeWire. Opening the menu and "Refresh audio
sources" send RefreshAudioSources. The device dropdowns name the system
default "Linux default (X)" / "Windows default (X)" / "macOS default (X)"
and sort the default device first, then by name.

Goldens regenerated on lavapipe (Ubuntu 22.04 image): three new, and
control_bar_sharing, stream_settings_menu, settings_voice, which now show
the submenus or the new default label.

Refs #343

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #343

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
# Conflicts:
#	crates/fluxer-ui/README.md
#	docs/parity/screenshare.md
Author
Owner

Independent review: Text chat 53 (ui-audio-sources-menu)

Reviewed the task's own changes (7826bf8, 533be32 and the merge 3bffa19; net diff against textchat 67da1c7 is only the 17 task files in fluxer-ui, docs and goldens).

Tests (plan Step 1): all nine named tests exist and assert what the plan says: audio_sources_submenu_only_for_screen_share_with_sound, audio_sources_hidden_without_pipewire, summary_in_the_submenu_label, include_and_exclude_groups_follow_the_mode, refresh_keeps_the_menu_open_and_asks_the_store, audio_settings_checkboxes_in_order_with_defaults, ignore_devices_and_device_select_toggle_each_other_in_the_menu (in tests/stream_audio_sources.rs), default_option_names_the_platform_and_endpoint, devices_sorted_default_first_then_by_name (in tests/settings_voice.rs). Screenshots stream_menu_audio_sources, stream_menu_audio_settings, voice_devices_linux_default exist with goldens and README rows.

Interfaces: Entry::Submenu "Audio sources: {summary}" and "Audio settings" in settings_menu::full and compact_live, gated on screen share / no share, sound on, audio_targets != Unavailable; the seven strings in the original's order; "Ignore input media" hidden while "Device selection" is on, as in StreamSettingsMenuContent.tsx:1107; OpenMenu and "Refresh audio sources" send RefreshAudioSources without closing the menu; picks go through audio_sources::{toggle_include, toggle_exclude, pick_system, pick_none}. devices::DefaultPlatform::{Linux, Windows, MacOs}, current() (cfg!), default_label(platform, Option<&str>) -> String match the plan and audio spec §3.2. The "Left out" note no longer lists the Linux sources.

Invariants: no change to fluxer-core, no new dependency, no I/O in fluxer-ui, no fixtures, no secrets or paths.

Findings

  • minor: the submenus show while audio_targets is NotAsked/Loading, so on Windows/macOS they appear briefly after the menu opens until the runtime answers AudioTargets(None) (apps/fluxer/src/capture_rt.rs:371). This is intended (it mirrors the original while it loads) and is tested. It could be gated on cfg!(target_os = "linux") later.
  • minor: no side-by-side Electron screenshot is attached (CLAUDE.md asks for one on UI PRs).
  • minor: the three new screens are not in SCREENSHARE_SCREENS of tests/screenshot_suite.rs, so they have no docs/screenshots/ reference image. The suite does not require it.
  • minor (already filed as #367): long labels wrap in the 208 px menu card.

Local CI: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci in a fresh review worktree at 3bffa19: all steps passed (livekit-interop skipped, as by default).

Verdict: approve. No blocking findings.

## Independent review: Text chat 53 (ui-audio-sources-menu) Reviewed the task's own changes (7826bf8, 533be32 and the merge 3bffa19; net diff against `textchat` 67da1c7 is only the 17 task files in `fluxer-ui`, docs and goldens). **Tests (plan Step 1):** all nine named tests exist and assert what the plan says: `audio_sources_submenu_only_for_screen_share_with_sound`, `audio_sources_hidden_without_pipewire`, `summary_in_the_submenu_label`, `include_and_exclude_groups_follow_the_mode`, `refresh_keeps_the_menu_open_and_asks_the_store`, `audio_settings_checkboxes_in_order_with_defaults`, `ignore_devices_and_device_select_toggle_each_other_in_the_menu` (in `tests/stream_audio_sources.rs`), `default_option_names_the_platform_and_endpoint`, `devices_sorted_default_first_then_by_name` (in `tests/settings_voice.rs`). Screenshots `stream_menu_audio_sources`, `stream_menu_audio_settings`, `voice_devices_linux_default` exist with goldens and README rows. **Interfaces:** `Entry::Submenu` "Audio sources: {summary}" and "Audio settings" in `settings_menu::full` and `compact_live`, gated on screen share / no share, sound on, `audio_targets != Unavailable`; the seven strings in the original's order; "Ignore input media" hidden while "Device selection" is on, as in `StreamSettingsMenuContent.tsx:1107`; `OpenMenu` and "Refresh audio sources" send `RefreshAudioSources` without closing the menu; picks go through `audio_sources::{toggle_include, toggle_exclude, pick_system, pick_none}`. `devices::DefaultPlatform::{Linux, Windows, MacOs}`, `current()` (cfg!), `default_label(platform, Option<&str>) -> String` match the plan and audio spec §3.2. The "Left out" note no longer lists the Linux sources. **Invariants:** no change to `fluxer-core`, no new dependency, no I/O in `fluxer-ui`, no fixtures, no secrets or paths. **Findings** - minor: the submenus show while `audio_targets` is `NotAsked`/`Loading`, so on Windows/macOS they appear briefly after the menu opens until the runtime answers `AudioTargets(None)` (`apps/fluxer/src/capture_rt.rs:371`). This is intended (it mirrors the original while it loads) and is tested. It could be gated on `cfg!(target_os = "linux")` later. - minor: no side-by-side Electron screenshot is attached (CLAUDE.md asks for one on UI PRs). - minor: the three new screens are not in `SCREENSHARE_SCREENS` of `tests/screenshot_suite.rs`, so they have no `docs/screenshots/` reference image. The suite does not require it. - minor (already filed as #367): long labels wrap in the 208 px menu card. **Local CI:** `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` in a fresh review worktree at 3bffa19: all steps passed (livekit-interop skipped, as by default). **Verdict: approve.** No blocking findings.
charles manually merged commit 15154126d0 into textchat 2026-11-13 08:46:43 +00:00
Sign in to join this conversation.
No description provided.