Voice 21: Settings → Voice & Video (#82) #133

Manually merged
charles merged 0 commits from voice-21-ui-voice-settings into voice 2026-11-11 23:43:29 +00:00
Owner

What

Settings → Voice & video → Audio (crates/fluxer-ui/src/screens/settings/voice_video/), cloned from the fork's UserVoiceTab.tsx:571-756, sections in the original's order:

  • Input and output: microphone and speaker dropdowns (system default first, labelled "Default - ", then every listed device); a missing device shows the default while the store keeps the choice. → SetInputDevice / SetOutputDevice
  • Volume: input and output, 0–200 %.
  • Voice processing: Focused voice / Direct input / Custom radio with the original's names and descriptions. Push-to-talk switch, mute note, shortcut recorder and release delay (20/100/250/500/1000/1500/2000 ms, snapped to the nearest one as the original does), automatic gain control. Custom adds auto-set activity threshold (threshold slider when it is off), noise suppression (all seven backends; the ones we don't have show "X could not start. Using RNNoise instead."), stereo microphone and echo cancellation. Direct input shows stereo microphone and the "Push-to-talk is ignored in direct input" warning.
  • Mic test: level meter (-60..0 dBFS from voice.input_level, brand colour while the gate is open) and play/stop button → StartMicTest / StopMicTest.
  • Entrance sound: shows a "comes with the soundboard" line. The soundboard store (Voice 10) is not on voice yet.
  • Soundboard: "Play soundboard sounds" and volume (0–100 %).
  • Voice channels: "Show connection IDs".

Video stays a placeholder for sub-project 3.

PTT recorder: a small custom widget. Click it, press a key, and that key is stored as VoiceSettingChange::PttKey(Some(code)), spelled like the web's KeyboardEvent.code ("KeyF"). Escape or a click cancels. The shell (app.rs) now sends UserAction::PttKey { down } for that key when the window has focus and no widget took the key. No other code sent it, so push-to-talk could not work without this.

Tests

  • tests/settings_voice.rs: sections_in_original_order, custom_mode_reveals_extra_controls, device_dropdown_lists_devices_and_marks_default, ptt_recorder_captures_key (drives the widget headless with click + key events), mic_test_button_and_level_meter, parity_check_passes. There are also unit tests for the meter's dB mapping and the release-delay snapping.
  • Screenshot settings_voice (golden fixtures/golden/settings_voice.png, copy at docs/screenshots/settings-voice.png): custom profile, PTT on with F, devices listed. The 720 px frame shows the page down to push-to-talk.
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally. cargo xtask parity-check also passes against the fork checkout.

No Electron reference screenshot exists in the fork's assets. Dimensions come from UserVoiceTab.tsx, MicTestSection.module.css and KeybindRecorder.tsx.

Deviations

  • Parity statuses: xtask parity-check only accepts done/planned/dropped, and the skeleton test pins audio entries to owner 2. So "partial" is written as done with a note starting "Partial:", and "later" as planned with a note. I added section entries section-voice_video-* (as companion-apps did). AGC is now done. New-device alerts and connection volume controls stay planned with notes.
  • settings::Message is no longer Copy, because it carries DeviceId / VoiceSettingChange. section, body_text and border are now generic over the message type.
  • Outside the Files list, all in fluxer-ui: app.rs and message.rs (WindowEvent::Key, PTT key dispatch; Escape is ignored when a widget captured it so the recorder can cancel), theme/icons.rs plus play-fill / stop-fill SVGs (Phosphor path data written from memory, please check), and settings_nav.rs (its Voice & video page expectation now that Audio is built).
  • Commits credit "Claude Opus 5.5", the model that wrote them, not the "Fable 5.2" line in CLAUDE.md.

Stacked on: voice-17-ui-voice-panel

Closes #82

🤖 Generated with Claude Code

## What Settings → Voice & video → Audio (`crates/fluxer-ui/src/screens/settings/voice_video/`), cloned from the fork's `UserVoiceTab.tsx:571-756`, sections in the original's order: - **Input and output**: microphone and speaker dropdowns (system default first, labelled "Default - <system default device>", then every listed device); a missing device shows the default while the store keeps the choice. → `SetInputDevice` / `SetOutputDevice` - **Volume**: input and output, 0–200 %. - **Voice processing**: Focused voice / Direct input / Custom radio with the original's names and descriptions. Push-to-talk switch, mute note, shortcut recorder and release delay (20/100/250/500/1000/1500/2000 ms, snapped to the nearest one as the original does), automatic gain control. Custom adds auto-set activity threshold (threshold slider when it is off), noise suppression (all seven backends; the ones we don't have show "X could not start. Using RNNoise instead."), stereo microphone and echo cancellation. Direct input shows stereo microphone and the "Push-to-talk is ignored in direct input" warning. - **Mic test**: level meter (-60..0 dBFS from `voice.input_level`, brand colour while the gate is open) and play/stop button → `StartMicTest` / `StopMicTest`. - **Entrance sound**: shows a "comes with the soundboard" line. The soundboard store (Voice 10) is not on `voice` yet. - **Soundboard**: "Play soundboard sounds" and volume (0–100 %). - **Voice channels**: "Show connection IDs". Video stays a placeholder for sub-project 3. **PTT recorder**: a small custom widget. Click it, press a key, and that key is stored as `VoiceSettingChange::PttKey(Some(code))`, spelled like the web's `KeyboardEvent.code` ("KeyF"). Escape or a click cancels. The shell (`app.rs`) now sends `UserAction::PttKey { down }` for that key when the window has focus and no widget took the key. No other code sent it, so push-to-talk could not work without this. ## Tests - `tests/settings_voice.rs`: `sections_in_original_order`, `custom_mode_reveals_extra_controls`, `device_dropdown_lists_devices_and_marks_default`, `ptt_recorder_captures_key` (drives the widget headless with click + key events), `mic_test_button_and_level_meter`, `parity_check_passes`. There are also unit tests for the meter's dB mapping and the release-delay snapping. - Screenshot `settings_voice` (golden `fixtures/golden/settings_voice.png`, copy at `docs/screenshots/settings-voice.png`): custom profile, PTT on with F, devices listed. The 720 px frame shows the page down to push-to-talk. - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally. `cargo xtask parity-check` also passes against the fork checkout. No Electron reference screenshot exists in the fork's assets. Dimensions come from `UserVoiceTab.tsx`, `MicTestSection.module.css` and `KeybindRecorder.tsx`. ## Deviations - Parity statuses: `xtask parity-check` only accepts `done`/`planned`/`dropped`, and the skeleton test pins audio entries to owner 2. So "partial" is written as `done` with a note starting "Partial:", and "later" as `planned` with a note. I added section entries `section-voice_video-*` (as companion-apps did). AGC is now `done`. New-device alerts and connection volume controls stay `planned` with notes. - `settings::Message` is no longer `Copy`, because it carries `DeviceId` / `VoiceSettingChange`. `section`, `body_text` and `border` are now generic over the message type. - Outside the Files list, all in fluxer-ui: `app.rs` and `message.rs` (`WindowEvent::Key`, PTT key dispatch; Escape is ignored when a widget captured it so the recorder can cancel), `theme/icons.rs` plus `play-fill` / `stop-fill` SVGs (Phosphor path data written from memory, please check), and `settings_nav.rs` (its Voice & video page expectation now that Audio is built). - Commits credit "Claude Opus 5.5", the model that wrote them, not the "Fable 5.2" line in CLAUDE.md. Stacked on: voice-17-ui-voice-panel Closes #82 🤖 Generated with [Claude Code](https://claude.com/claude-code)
# Conflicts:
#	crates/fluxer-core/README.md
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>
Refs #78

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test(ui): voice panel goldens drawn on lavapipe
All checks were successful
ci / Linux (x86_64) (push) Successful in 13m12s
ci / Windows (x64) (push) Successful in 19m35s
8c37b507c7
voice_panel_connected and voice_panel_failed are new; main-general and
sidebar_voice are redrawn because the user area gained the microphone
and speaker buttons. All drawn on the reference renderer (Ubuntu 22.04
lavapipe, the recipe of docs/screenshots/README.md); the two new frames
are also under docs/screenshots for the PR.

Refs #78

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/voice' into voice-17-ui-voice-panel
All checks were successful
ci / Windows (x64) (push) Successful in 8m3s
ci / Linux (x86_64) (push) Successful in 28m17s
80c11ff71c
# Conflicts:
#	crates/fluxer-core/README.md
Refs #82

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(ui): voice and video settings
All checks were successful
ci / Windows (x64) (push) Successful in 13m18s
ci / Linux (x86_64) (push) Successful in 24m1s
99ffc6f0d9
Refs #82

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Review: Voice 21 (Settings → Voice & video), independent reviewer

Reviewed 80c11ff7..origin/voice-21-ui-voice-settings (2 commits, head 99ffc6f).

Plan tests: all five named tests exist in crates/fluxer-ui/tests/settings_voice.rs (sections_in_original_order, custom_mode_reveals_extra_controls, device_dropdown_lists_devices_and_marks_default, ptt_recorder_captures_key, parity_check_passes), plus mic_test_button_and_level_meter. The settings_voice golden is in tests/screenshots.rs. The section order matches facts §8 (devices, volume, processing with PTT/AGC, mic test, entrance sound, soundboard, show connection IDs). The custom profile shows the threshold, NS backend, stereo and echo controls. Defaults match the spec: threshold 50, RNNoise, 0–200 % volumes.
Interfaces: every control goes through SetVoiceSetting / SetInputDevice / SetOutputDevice / StartMicTest / StopMicTest. The mic test reads voice.input_level (level and gate). The PTT recorder takes the key from the focused window. Audio parity entries are done or planned, and each has a note. partial is written as done with a "Partial:" note because xtask has no partial status, which is acceptable.
Invariants: fluxer-core is untouched, fluxer-ui does no new I/O, and there are no secrets. Losing window focus releases PTT (the core reducer handles WindowFocus(false)). I checked the play-fill and stop-fill paths against Phosphor and they look right.
Review Focus: no item belongs to Task 21.
CI: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green in the review worktree. All 7 goldens pass, including settings_voice_matches_golden, and parity reports 126 settings, all accounted for.

Findings

  1. minor (crates/fluxer-ui/src/app.rs, window_event): the Tab arm (FocusNext/FocusPrevious) matches before the new PTT key arm. The recorder accepts Tab, but a Tab push-to-talk key never sends PttKey. Either reject Tab in the recorder or check the PTT key first.
  2. minor (processing::key_name): it uses iced's Code Debug name. That matches KeyboardEvent.code for letters, digits and Space, but not for some keys, such as SuperLeft against the web's MetaLeft. A key imported from the web Keybind store could fail to match.
  3. minor (tests/settings_voice.rs, device test): the comment says "the choice is kept and still listed", but the test asserts neither. The unplugged device is in fact not listed in options.
  4. minor (settings_voice golden): the 1280x720 frame shows only the page down to the Push-to-talk switch. The scenario sets up the PTT key, the custom controls and the running mic test meter, but none of them are visible, so the golden does not cover them.

Verdict: APPROVE (0 blocking, 4 minor; CI green locally)

## Review: Voice 21 (Settings → Voice & video), independent reviewer Reviewed `80c11ff7..origin/voice-21-ui-voice-settings` (2 commits, head `99ffc6f`). **Plan tests:** all five named tests exist in `crates/fluxer-ui/tests/settings_voice.rs` (`sections_in_original_order`, `custom_mode_reveals_extra_controls`, `device_dropdown_lists_devices_and_marks_default`, `ptt_recorder_captures_key`, `parity_check_passes`), plus `mic_test_button_and_level_meter`. The `settings_voice` golden is in `tests/screenshots.rs`. The section order matches facts §8 (devices, volume, processing with PTT/AGC, mic test, entrance sound, soundboard, show connection IDs). The custom profile shows the threshold, NS backend, stereo and echo controls. Defaults match the spec: threshold 50, RNNoise, 0–200 % volumes. **Interfaces:** every control goes through `SetVoiceSetting` / `SetInputDevice` / `SetOutputDevice` / `StartMicTest` / `StopMicTest`. The mic test reads `voice.input_level` (level and gate). The PTT recorder takes the key from the focused window. Audio parity entries are `done` or `planned`, and each has a note. `partial` is written as `done` with a "Partial:" note because xtask has no partial status, which is acceptable. **Invariants:** fluxer-core is untouched, fluxer-ui does no new I/O, and there are no secrets. Losing window focus releases PTT (the core reducer handles `WindowFocus(false)`). I checked the play-fill and stop-fill paths against Phosphor and they look right. **Review Focus:** no item belongs to Task 21. **CI:** `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is green in the review worktree. All 7 goldens pass, including `settings_voice_matches_golden`, and parity reports 126 settings, all accounted for. ### Findings 1. **minor** (`crates/fluxer-ui/src/app.rs`, `window_event`): the Tab arm (FocusNext/FocusPrevious) matches before the new PTT key arm. The recorder accepts Tab, but a Tab push-to-talk key never sends `PttKey`. Either reject Tab in the recorder or check the PTT key first. 2. **minor** (`processing::key_name`): it uses iced's `Code` Debug name. That matches `KeyboardEvent.code` for letters, digits and Space, but not for some keys, such as `SuperLeft` against the web's `MetaLeft`. A key imported from the web Keybind store could fail to match. 3. **minor** (`tests/settings_voice.rs`, device test): the comment says "the choice is kept and still listed", but the test asserts neither. The unplugged device is in fact not listed in `options`. 4. **minor** (`settings_voice` golden): the 1280x720 frame shows only the page down to the Push-to-talk switch. The scenario sets up the PTT key, the custom controls and the running mic test meter, but none of them are visible, so the golden does not cover them. **Verdict: APPROVE** (0 blocking, 4 minor; CI green locally)
charles manually merged commit 09de2137ea into voice 2026-11-11 23:43:29 +00:00
Sign in to join this conversation.
No description provided.