Screen share 25: Control bar screen share, connection panel button, stream settings menu, active-share menu (#172) #234
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "screenshare-25-ui-share-controls"
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?
Stacked on: screenshare-11-core-stream-params
What
Screen share spec §10 "Control bar", "Connection panel media button", "Stream settings menu" and the active-share menu, bound to the Task 10/11 actions.
screens/main/screenshare/mod.rs:share_button(&App, MenuOrigin)(labels "Share your screen" / "End screen share" / "Configure or end screen share" / "You can't share your screen in this channel" / "Waiting for connection..."; disabled iffcan_streamfails and no share runs, as!canStream && !isScreenShareEnabled), the menu state (Local::screenshare),menu(&App, &State) -> MenuModel,update→OpenScreenSharePicker{switch},StopScreenShare,SetVoiceSetting(..),SetMuteStreamAudio; drawn onwidgets::context_menu(no screen-share code in the widget).on_right_pressreports the cursor for the right-click menu.settings_menu.rs: full variant ("Streaming mode" radios with the original's two lines fromstream_settings_model, Custom reveals "Resolution"/"Frame rate" submenus, "Capture desktop audio"/"Capture app audio", "Hide preview thumbnail") and compact live variant ("Stream quality": frame rates then resolutions, "Share stream audio"). Premium options: 12 px atom badge in--plutonium-iconon an instance with premium, left out without premium.active_menu.rs: "Stop streaming" (danger), "Change stream", compact live settings; the bar adds "Screen share settings".call/control_bar.rs: MonitorPlay button in--vc-successwhile sharing, caret (.settingsButton17 px, black, 14 % white border) opening the menu; right-click opens it too.voice_panel.rs: media section with the 2 rem full-width button,--status-online15 % while sharing; a click opens the picker, or while sharing the active-share menu.app.rs); DM call control bars route the same messages.Dimensions:
VoiceControlBar.module.css(vc colours,.settingsButton),VoiceConnectionStatus.module.css(.mediaSection,.mediaButton),StreamSettingsMenuContent.module.css,MenuItemRadio.module.css,ContextMenu.module.css(.groupLabel). No Electron side-by-side: the live instance is off-limits to agents; the goldens are attached infixtures/golden/.Tests
crates/fluxer-ui/tests/screenshare_controls.rs:button_states_and_tooltips,disabled_without_permission_with_reason,caret_opens_menu,custom_mode_reveals_resolution_and_fps,premium_options_badged_or_hidden,active_menu_actions_emit(written first, failed to compile, then pass).control_bar_sharing,stream_settings_menu(new);call_view_4,call_view_compact,soundboard_popout,participant_menu,voice_panel_connectedregenerated (the bar's button is live, the panel gained its media button). All goldens drawn on lavapipe (Ubuntu 22.04 container,docker/fluxer-native-shots:u2204).FLUXER_SCREENSHOT_TESTS=1 cargo xtask cigreen locally.Deviations
tests/screenshots.rs, not the devserver scenario; no video widget is involved in these screens.opacity: 1(the spec says "on hover").screens/main/mod.rs(Message::ScreenShare, overlay),call/mod.rs(call::Message::ScreenShare),calls/{mod.rs,dm_header.rs}(droppedEqderives, the message now holds aPoint),app.rs(Local::screenshare, Escape),tests/call_view.rs, README files.Closes #172
🤖 Generated with Claude Code
Independent review: Screen share 25 (ui-share-controls)
Reviewed
63b98de..origin/screenshare-25-ui-share-controls(654230b) cold, against the plan's Task 25, Global Constraints and spec §10.Tests (plan steps): all six are in
crates/fluxer-ui/tests/screenshare_controls.rs:button_states_and_tooltips,disabled_without_permission_with_reason,caret_opens_menu,custom_mode_reveals_resolution_and_fps,premium_options_badged_or_hidden,active_menu_actions_emit. They check the spec's exact strings ("Share your screen", "End screen share", "You can't share your screen in this channel", "Configure or end screen share", "Stop streaming", "Change stream", "Stream quality"), the original's two-line mode descriptions for the free tier, the free-tier options 480p/720p and 15/30 FPS, the badged 1080p/1440p/Source/60 FPS with premium, and the actions emitted for each one. The screenshotscontrol_bar_sharingandstream_settings_menuexist and match their goldens.Interfaces: the menus are bound to the Task 10/11 actions as the plan says:
OpenScreenSharePicker { switch },StopScreenShare,SetMuteStreamAudio,SetVoiceSetting(StreamingMode/ScreenshareResolution/…),QualityPickandstream_settings_modelfrom core. Nothing in the core interfaces changes. RemovingEqfromcall::Message,voice_panel::Message,calls::MessageandCallButtonModelis fine (they now carry aPoint), and the workspace builds.Invariants: the diff touches only
fluxer-ui, with no new I/O and no new dependency. Core isolation passes. There are no secrets or tokens. Server data reaches these views only through core selectors and cannot panic them.Review Focus: none of the Review Focus items covers Task 25.
Local CI:
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin a clean worktree (CachyOS host, lavapipe/Vulkan) passed every step: fmt, clippy, deny, core-isolation, parity, test and screenshot-tests. The redrawn goldens and the two new ones match.Findings
minor (follow-up): the screen-share menu state goes stale.
local.screenshare.menuis cleared only by an action, CloseMenu or Escape. Take a menu opened from the panel (MenuOrigin::Panel) whose share then ends some other way (the store, a remote stop, or the bar's button).screenshare::menu()returnsNone, so the menu is hidden, butState.menustaysSome. Two things follow:app.rsWindowEvent::Escape if self.local.screenshare.menu.is_some()swallows one Escape that should have closed the profile popout or another layer.The same happens with a control-bar menu after leaving voice: it keeps drawing over the main screen until someone clicks outside it. Suggested fix: clear the state in
main::view/updatewhenmenu()isNone, or checkmenu(app, …).is_some()in the Escape guard and clear the state when the share ends.minor (documented deviation, fine): three deviations are documented and acceptable.
No action needed beyond what is documented.
minor (process): there is no Electron side-by-side screenshot and no devserver
screensharescenario screenshot. The goldens are built from fixtures. The PR states which fork component and CSS file each dimension comes from, which the Phase 4 rule accepts as the alternative.Verdict: APPROVED. There are no blocking findings and local CI is green. Finding 1 should become a
follow-upissue (or a quick fix) before merge.