Voice 20: Participant context menu and volume (#81) #135
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "voice-20-ui-participant-menu"
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
widgets::context_menu: the client's general context menu (actions, checkboxes, submenus, separators, custom rows such as a slider), anchored at the cursor in window coordinates and kept inside the window, closed by a click outside (left or right) or Escape. Nothing in it knows about voice. Sizes and colours fromfeatures/ui/action_menu/{ContextMenu,MenuItem}.module.css.widgets::slider: the mini percent slider (features/ui/components/Slider.tsx,MenuItemSlider.tsx) with a 100 % detent (snaps within 5 %).screens::main::participant_menu: the voice participant menu (VoiceParticipantContextMenu.tsx,items/VoiceParticipantMenuData.tsx,items/MoveToChannelSubmenu.tsx), opened by the sidebar'sMessage::OpenParticipantMenu. Other user: User volume (0-200) | Mute, Mute soundboard | Move to... (submenu) | Community mute, Community deafen, Disconnect device. Self: Mute, Deafen, Voice & video settings | Community mute/deafen. Moderation rows gated by MUTE_MEMBERS / DEAFEN_MEMBERS / MOVE_MEMBERS.Local::participant_menuholds the open menu; Escape closes it before the settings.fluxer-core:UserAction::{ServerMute, ServerDeafen, DisconnectUser, MoveUser}->ApiRequest::UpdateMemberVoice { guild_id, user_id, change: MemberVoiceChange }, answered withApiResult::MemberVoiceUpdated(new modulevoice/moderation.rs).Tests
crates/fluxer-ui/tests/participant_menu.rs:menu_items_for_other_user,menu_items_for_self,moderation_items_need_permissions,volume_slider_emits_set_user_volume, plusclick_outside_or_escape_closes(headless widget protocol).crates/fluxer-core/tests/voice_moderation.rs:server_mute_patches_member, deafen, disconnect, move, unknown guild / non-voice channel, logged out.participant_menu(goldenfixtures/golden/participant_menu.png): the menu of relay opened from the sidebar during the call. No Electron reference image exists in the fork's docs/assets; dimensions come from the CSS files named above.FLUXER_SCREENSHOT_TESTS=1 cargo xtask cigreen locally.Deviations from the plan
apps/fluxer/src/runtime.rs(outside the Files list, needed to compile):UpdateMemberVoiceanswers with an HTTP 501CLIENT_NOT_WIREDerror. The member PATCH needsfluxer-proto+fluxer-apiwork, left to follow-up #134, so the moderation rows do not reach the server yet.fluxer-corehas no serde dependency, so the JSON body of the PATCH is not built or tested in core (it is described in #134).canManageTarget) is not ported; the server enforces it.Stacked on: voice-18-ui-call-view
Closes #81
🤖 Generated with Claude Code
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>UserAction::{ServerMute, ServerDeafen, DisconnectUser, MoveUser} become ApiRequest::UpdateMemberVoice (guild member PATCH with only its voice fields). The runtime answers the request with an error until the member PATCH exists in fluxer-api (#134). Refs #81 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Independent review: Voice 20, participant context menu (diff a7ec434..f3c1f69)
Plan tests: all present, and they assert what the plan asks for.
menu_items_for_other_user,menu_items_for_self,moderation_items_need_permissions,volume_slider_emits_set_user_volume(it clicks the real slider through the headless harness; detent at 97/104 -> 100, 90 and 200 unchanged), plusclick_outside_or_escape_closes.server_mute_patches_member, plus tests for deafen, disconnect, move, unknown guild or non-voice channel, and logged out.participant_menupasses against its golden. I checked the image by eye and it looks right.Interfaces:
UserAction::{ServerMute, ServerDeafen, DisconnectUser, MoveUser}->ApiRequest::UpdateMemberVoice { guild_id, user_id, change: MemberVoiceChange }andApiResult::MemberVoiceUpdatedexist.Message::OpenParticipantMenu(Voice 16) is handled.widgets::context_menuhas nothing voice-specific in it.Invariants:
unwrap_or_default, and a target who has left voice just drops the guild rows.Hit-testing (checked against iced_widget 0.14.2
Stack::update):mouse_areareportsIdleand the buttons reportPointer. Both are notNone, so the backdrop and the base get a levitated cursor.AnchoredreportsNone. The backdrop'son_press/on_right_pressthen publishes Close and captures the event, so the base never sees it.Submenu offset: correct.
Review Focus: none of the items applies to this task.
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci: green in the review worktree (fmt, clippy, deny, core-isolation, parity, tests, screenshot-tests).Findings
Submenu(Some(i)). On the next render the row'son_pressison_submenu(None), so the usual "move onto the row, then click" closes what the hover just opened. Suggestion: make a click on the row open the submenu (alwaysSome(index)) rather than toggle it.follow-upissue linked from the PR before merge.CLIENT_NOT_WIRED, and core ignores the failure. This is tracked in #134 and is not blocking. #134 should land before this ships to users.Shell(WindowEvent::Escapeclosing the menu before the settings) has no test.click_outside_or_escape_closesonly sendsparticipant_menu::Message::Close.Verdict: APPROVE. There are no blocking findings and ci is green. Findings 1 and 2 can be fixed in this PR or tracked as follow-ups.