Voice 17: Voice connection panel and user-area controls (#78) #124

Manually merged
charles merged 0 commits from voice-17-ui-voice-panel into voice 2026-11-11 23:43:25 +00:00
Owner

Stacked on: origin/voice-8-core-live-room-volumes

What

  • screens::main::voice_panel: the connection panel above the user area (VoiceConnectionStatusInner.tsx). States with the original strings: "Connecting..." (awaiting server, connecting, and reconnecting, as the original), "In voice chat", "Connection failed" with Try again (RetryVoice) and Dismiss (DismissVoiceError); channel line "Hangout / Forked"; disconnect button (LeaveVoice); signal-strength icon ported from SignalStrengthIcon / getLatencySignalState (median of last 30, thresholds 70/160/300 ms, colours from status tokens) with "Ping: {n}ms" / "Measuring latency..." tooltip.
  • screens::main::voice_details: details popout (VoiceDetailsPopout.tsx) opened by the status line: ping graph (last 30 RTTs, same chart geometry), Device, Current/Average ping, Duration, Participants, Endpoint (click copies via the shell clipboard).
  • screens::main::user_area: user area moved out of sidebar.rs, now with microphone and speaker buttons (UserArea.tsx, selectUserAreaMicrophoneState): effective mute, moderator mute/deafen and suppress lock the button with the original tooltips. Right-click on either button gives OpenSettings(Some(VoiceVideo)). The gear is unchanged (OpenSettings(None), "User Settings").
  • Icons PhoneX (fill) and ArrowClockwise (bold) from @phosphor-icons/react 2.1.10.

Tests

  • tests/voice_panel.rs: each_connection_state_renders_its_line, failed_state_offers_retry_and_dismiss, mute_button_reflects_effective_mute_and_server_mute, plus details_popout_shows_ping_history_and_participants. These are headless widget tests on tiny-skia, not run on Windows (#93). Unit tests cover the signal thresholds, the median, the SVG, duration formatting, endpoint stripping and the graph scale.
  • Screenshots voice_panel_connected (details open) and voice_panel_failed, drawn on Ubuntu 22.04 lavapipe. main-general and sidebar_voice were redrawn because the user area has new buttons. The frames are in docs/screenshots/voice-panel-*.png. No Electron capture: the dimensions come from VoiceConnectionStatus.module.css and UserArea.module.css.
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green locally.

Deviations

  • The settings route is on right-click of the mic and speaker buttons, not on the gear. This keeps the original gear behaviour.
  • Endpoint shows only while Connecting, because core drops it on Connected (follow-up #122). Duration is hidden until since is known (#109). The original "Advanced" stats are omitted because the room does not report them yet.
  • Outside the Files list: sidebar.rs (the user area moved out, and it now stacks the popout), app.rs (clipboard for CopyEndpoint), theme/icons.rs and assets, the READMEs, and tests/voice_sidebar.rs (its probe ignores the new right-click OpenVoiceSettings). The headless harness was copied into tests/headless/mod.rs for reuse.
  • Spec section 9 says "Voice connected" and "Reconnecting…". The original strings from facts section 7 are used instead.

Closes #78

🤖 Generated with Claude Code

Stacked on: origin/voice-8-core-live-room-volumes ## What - `screens::main::voice_panel`: the connection panel above the user area (`VoiceConnectionStatusInner.tsx`). States with the original strings: "Connecting..." (awaiting server, connecting, and reconnecting, as the original), "In voice chat", "Connection failed" with Try again (`RetryVoice`) and Dismiss (`DismissVoiceError`); channel line "Hangout / Forked"; disconnect button (`LeaveVoice`); signal-strength icon ported from `SignalStrengthIcon` / `getLatencySignalState` (median of last 30, thresholds 70/160/300 ms, colours from status tokens) with "Ping: {n}ms" / "Measuring latency..." tooltip. - `screens::main::voice_details`: details popout (`VoiceDetailsPopout.tsx`) opened by the status line: ping graph (last 30 RTTs, same chart geometry), Device, Current/Average ping, Duration, Participants, Endpoint (click copies via the shell clipboard). - `screens::main::user_area`: user area moved out of `sidebar.rs`, now with microphone and speaker buttons (`UserArea.tsx`, `selectUserAreaMicrophoneState`): effective mute, moderator mute/deafen and suppress lock the button with the original tooltips. Right-click on either button gives `OpenSettings(Some(VoiceVideo))`. The gear is unchanged (`OpenSettings(None)`, "User Settings"). - Icons PhoneX (fill) and ArrowClockwise (bold) from @phosphor-icons/react 2.1.10. ## Tests - `tests/voice_panel.rs`: `each_connection_state_renders_its_line`, `failed_state_offers_retry_and_dismiss`, `mute_button_reflects_effective_mute_and_server_mute`, plus `details_popout_shows_ping_history_and_participants`. These are headless widget tests on tiny-skia, not run on Windows (#93). Unit tests cover the signal thresholds, the median, the SVG, duration formatting, endpoint stripping and the graph scale. - Screenshots `voice_panel_connected` (details open) and `voice_panel_failed`, drawn on Ubuntu 22.04 lavapipe. `main-general` and `sidebar_voice` were redrawn because the user area has new buttons. The frames are in `docs/screenshots/voice-panel-*.png`. No Electron capture: the dimensions come from `VoiceConnectionStatus.module.css` and `UserArea.module.css`. - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is green locally. ## Deviations - The settings route is on right-click of the mic and speaker buttons, not on the gear. This keeps the original gear behaviour. - Endpoint shows only while `Connecting`, because core drops it on `Connected` (follow-up #122). Duration is hidden until `since` is known (#109). The original "Advanced" stats are omitted because the room does not report them yet. - Outside the Files list: `sidebar.rs` (the user area moved out, and it now stacks the popout), `app.rs` (clipboard for CopyEndpoint), `theme/icons.rs` and assets, the READMEs, and `tests/voice_sidebar.rs` (its probe ignores the new right-click `OpenVoiceSettings`). The headless harness was copied into `tests/headless/mod.rs` for reuse. - Spec section 9 says "Voice connected" and "Reconnecting…". The original strings from facts section 7 are used instead. Closes #78 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Refs #69

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
feat(core): live room, subscriptions, volumes and speaking
All checks were successful
ci / Linux (x86_64) (push) Successful in 21m31s
ci / Windows (x64) (push) Successful in 8m3s
e68ab28091
Refs #69

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
# 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>
Author
Owner

Independent review: Voice 17 (ui-voice-panel)

Reviewed da8f356..8c37b50 (three commits) in a clean worktree.

Verdict: APPROVE. No blocking findings; local FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci is green.

What I checked

  1. Tests named by the plan. All three exist in crates/fluxer-ui/tests/voice_panel.rs and pass, plus details_popout_shows_ping_history_and_participants.
    • each_connection_state_renders_its_line asserts the literal strings "Connecting...", "In voice chat", "Connection failed", "Measuring latency..." and "Ping: 42ms", and the signal icon at 4 arcs green and 1 arc red.
    • failed_state_offers_retry_and_dismiss clicks through the real widget tree and checks Retry -> RetryVoice, Dismiss -> DismissVoiceError, Disconnect -> LeaveVoice.
    • mute_button_reflects_effective_mute_and_server_mute covers self-mute, deafen-implies-mute, server mute, suppress and server deaf, including that a locked button emits nothing.
    • The screenshot tests voice_panel_connected and voice_panel_failed ran against their goldens and passed.
  2. Values against the fork. The strings match VoiceConnectionStatusInner.tsx and VoiceMessageDescriptors.ts. The thresholds [70, 160, 300], the 30-sample baseline, the median rounding and the skipping of samples <= 0 match VoiceLatencySignal.ts.
  3. Interfaces. LeaveVoice, RetryVoice, ToggleSelfMute, ToggleSelfDeaf and OpenSettings(Some(VoiceVideo)) are all emitted; see minor 1 for where the last one comes from.
  4. Invariants.
    • The diff does not touch fluxer-core, and the core-isolation step passes.
    • fluxer-ui gains no I/O. The clipboard write is an iced task in app.rs, the same way Settings already copies text.
    • No new dependency (url was already a workspace dependency of fluxer-ui) and no new fixtures or secrets.
    • Server-supplied values are handled without panics: an unknown channel or guild gives no channel line, the rtt is clamped to u32, and an unparsable endpoint is shown as it is.
    • The Windows pattern is followed: the test binary is #![cfg(not(windows))] and the renderer-free rules are unit tests.
  5. Review Focus. No item belongs to this task.
  6. CI. fmt, clippy, deny, core-isolation, parity, test and screenshot-tests all passed.

Findings

  • minor 1: the gear does not open Voice & Video. The plan's Interfaces line reads as settings button -> OpenSettings(Some(VoiceVideo)). Here the gear keeps OpenSettings(None) and a right-click on the mic or speaker button emits OpenVoiceSettings. The gear matches the original (openUserSettingsModal). The right-click is an approximation: the original opens a VoiceAudioSettingsMenu there. No other task's interface breaks, but Voice 21 should know this is the entry point.
  • minor 2: commit trailers. All three commits end with Co-Authored-By: Claude Opus 5.5; CLAUDE.md requires Claude Fable 5.2. I cannot verify which model ran, and fixing it means rewriting history, which is denied (no force push). Charles to decide.
  • minor 3: strings follow the fork, not spec section 9. There is no separate "Reconnecting…" line and the connected line is "In voice chat", not "Voice connected". This is consistent with the plan ("the original's strings") and with the fork's getStatusText. The spec text should be corrected.
  • minor 4: endpoint and duration rows are mostly absent. Both are gaps in core, not in this PR:
    • The Endpoint row (and so CopyEndpoint) only shows in Connecting, because core drops the endpoint afterwards (#122).
    • The Duration row never shows, because since is always None (#109).
  • minor 5: the details popout stays open across calls. sidebar::State::voice_details is not reset when the connection ends, so the popout reappears on the next call.
  • minor 6: unchecked subtraction. voice_details::model computes now - since.unix_millis() unchecked. It cannot fire today (since is never set), but saturating_sub would be safer once #109 lands.

The implementer's question about the connected golden (only ada listed under Hangout, Participants says 2) is most likely not a bug. The popout floats over the bottom of the channel list from y=280, and the row after ada would start at about y=291, so the second row is probably hidden behind it. I did not render the frame without the popout to confirm.

## Independent review: Voice 17 (ui-voice-panel) Reviewed `da8f356..8c37b50` (three commits) in a clean worktree. **Verdict: APPROVE. No blocking findings; local `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` is green.** ### What I checked 1. **Tests named by the plan.** All three exist in `crates/fluxer-ui/tests/voice_panel.rs` and pass, plus `details_popout_shows_ping_history_and_participants`. - `each_connection_state_renders_its_line` asserts the literal strings "Connecting...", "In voice chat", "Connection failed", "Measuring latency..." and "Ping: 42ms", and the signal icon at 4 arcs green and 1 arc red. - `failed_state_offers_retry_and_dismiss` clicks through the real widget tree and checks Retry -> `RetryVoice`, Dismiss -> `DismissVoiceError`, Disconnect -> `LeaveVoice`. - `mute_button_reflects_effective_mute_and_server_mute` covers self-mute, deafen-implies-mute, server mute, suppress and server deaf, including that a locked button emits nothing. - The screenshot tests `voice_panel_connected` and `voice_panel_failed` ran against their goldens and passed. 2. **Values against the fork.** The strings match `VoiceConnectionStatusInner.tsx` and `VoiceMessageDescriptors.ts`. The thresholds `[70, 160, 300]`, the 30-sample baseline, the median rounding and the skipping of samples <= 0 match `VoiceLatencySignal.ts`. 3. **Interfaces.** `LeaveVoice`, `RetryVoice`, `ToggleSelfMute`, `ToggleSelfDeaf` and `OpenSettings(Some(VoiceVideo))` are all emitted; see minor 1 for where the last one comes from. 4. **Invariants.** - The diff does not touch `fluxer-core`, and the core-isolation step passes. - `fluxer-ui` gains no I/O. The clipboard write is an iced task in `app.rs`, the same way Settings already copies text. - No new dependency (`url` was already a workspace dependency of `fluxer-ui`) and no new fixtures or secrets. - Server-supplied values are handled without panics: an unknown channel or guild gives no channel line, the rtt is clamped to `u32`, and an unparsable endpoint is shown as it is. - The Windows pattern is followed: the test binary is `#![cfg(not(windows))]` and the renderer-free rules are unit tests. 5. **Review Focus.** No item belongs to this task. 6. **CI.** fmt, clippy, deny, core-isolation, parity, test and screenshot-tests all passed. ### Findings - **minor 1: the gear does not open Voice & Video.** The plan's Interfaces line reads as settings button -> `OpenSettings(Some(VoiceVideo))`. Here the gear keeps `OpenSettings(None)` and a right-click on the mic or speaker button emits `OpenVoiceSettings`. The gear matches the original (`openUserSettingsModal`). The right-click is an approximation: the original opens a `VoiceAudioSettingsMenu` there. No other task's interface breaks, but Voice 21 should know this is the entry point. - **minor 2: commit trailers.** All three commits end with `Co-Authored-By: Claude Opus 5.5`; CLAUDE.md requires `Claude Fable 5.2`. I cannot verify which model ran, and fixing it means rewriting history, which is denied (no force push). Charles to decide. - **minor 3: strings follow the fork, not spec section 9.** There is no separate "Reconnecting…" line and the connected line is "In voice chat", not "Voice connected". This is consistent with the plan ("the original's strings") and with the fork's `getStatusText`. The spec text should be corrected. - **minor 4: endpoint and duration rows are mostly absent.** Both are gaps in core, not in this PR: - The Endpoint row (and so `CopyEndpoint`) only shows in `Connecting`, because core drops the endpoint afterwards (#122). - The Duration row never shows, because `since` is always `None` (#109). - **minor 5: the details popout stays open across calls.** `sidebar::State::voice_details` is not reset when the connection ends, so the popout reappears on the next call. - **minor 6: unchecked subtraction.** `voice_details::model` computes `now - since.unix_millis()` unchecked. It cannot fire today (`since` is never set), but `saturating_sub` would be safer once #109 lands. The implementer's question about the connected golden (only ada listed under Hangout, Participants says 2) is most likely not a bug. The popout floats over the bottom of the channel list from y=280, and the row after ada would start at about y=291, so the second row is probably hidden behind it. I did not render the frame without the popout to confirm.
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
charles manually merged commit 09de2137ea into voice 2026-11-11 23:43:25 +00:00
Sign in to join this conversation.
No description provided.