Screen share 25: Control bar screen share, connection panel button, stream settings menu, active-share menu (#172) #234

Manually merged
charles merged 2 commits from screenshare-25-ui-share-controls into screenshare 2026-11-12 09:48:20 +00:00
Owner

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 iff can_stream fails and no share runs, as !canStream && !isScreenShareEnabled), the menu state (Local::screenshare), menu(&App, &State) -> MenuModel, update → OpenScreenSharePicker{switch}, StopScreenShare, SetVoiceSetting(..), SetMuteStreamAudio; drawn on widgets::context_menu (no screen-share code in the widget). on_right_press reports the cursor for the right-click menu.
  • settings_menu.rs: full variant ("Streaming mode" radios with the original's two lines from stream_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-icon on 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-success while sharing, caret (.settingsButton 17 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-online 15 % while sharing; a click opens the picker, or while sharing the active-share menu.
  • Escape closes the 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 in fixtures/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).
  • Screenshots control_bar_sharing, stream_settings_menu (new); call_view_4, call_view_compact, soundboard_popout, participant_menu, voice_panel_connected regenerated (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 ci green locally.

Deviations

  • Screenshots are built from fixtures like the rest of tests/screenshots.rs, not the devserver scenario; no video widget is involved in these screens.
  • The caret sits in the button's corner instead of 0.125rem outside it (iced has no negative offset); it is always shown, as the CSS's opacity: 1 (the spec says "on hover").
  • Picking a premium option shows a "Requires Plutonium" line in the menu: the original opens its Plutonium page, which this client does not have (not an original string). Only reachable on an instance with premium.
  • Linux "Audio sources" / venmic submenus left out: the store has no audio-source list. Follow-up #233.
  • Touched outside the Files list (needed to wire it): screens/main/mod.rs (Message::ScreenShare, overlay), call/mod.rs (call::Message::ScreenShare), calls/{mod.rs,dm_header.rs} (dropped Eq derives, the message now holds a Point), app.rs (Local::screenshare, Escape), tests/call_view.rs, README files.

Closes #172

🤖 Generated with Claude Code

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 iff `can_stream` fails and no share runs, as `!canStream && !isScreenShareEnabled`), the menu state (`Local::screenshare`), `menu(&App, &State) -> MenuModel`, `update` → `OpenScreenSharePicker{switch}`, `StopScreenShare`, `SetVoiceSetting(..)`, `SetMuteStreamAudio`; drawn on `widgets::context_menu` (no screen-share code in the widget). `on_right_press` reports the cursor for the right-click menu. - `settings_menu.rs`: full variant ("Streaming mode" radios with the original's two lines from `stream_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-icon` on 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-success` while sharing, caret (`.settingsButton` 17 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-online` 15 % while sharing; a click opens the picker, or while sharing the active-share menu. - Escape closes the 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 in `fixtures/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). - Screenshots `control_bar_sharing`, `stream_settings_menu` (new); `call_view_4`, `call_view_compact`, `soundboard_popout`, `participant_menu`, `voice_panel_connected` regenerated (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 ci` green locally. ## Deviations - Screenshots are built from fixtures like the rest of `tests/screenshots.rs`, not the devserver scenario; no video widget is involved in these screens. - The caret sits in the button's corner instead of 0.125rem outside it (iced has no negative offset); it is always shown, as the CSS's `opacity: 1` (the spec says "on hover"). - Picking a premium option shows a "Requires Plutonium" line in the menu: the original opens its Plutonium page, which this client does not have (not an original string). Only reachable on an instance with premium. - Linux "Audio sources" / venmic submenus left out: the store has no audio-source list. Follow-up #233. - Touched outside the Files list (needed to wire it): `screens/main/mod.rs` (`Message::ScreenShare`, overlay), `call/mod.rs` (`call::Message::ScreenShare`), `calls/{mod.rs,dm_header.rs}` (dropped `Eq` derives, the message now holds a `Point`), `app.rs` (`Local::screenshare`, Escape), `tests/call_view.rs`, README files. Closes #172 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

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 screenshots control_bar_sharing and stream_settings_menu exist 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/…), QualityPick and stream_settings_model from core. Nothing in the core interfaces changes. Removing Eq from call::Message, voice_panel::Message, calls::Message and CallButtonModel is fine (they now carry a Point), 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 ci in 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

  1. minor (follow-up): the screen-share menu state goes stale. local.screenshare.menu is 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() returns None, so the menu is hidden, but State.menu stays Some. Two things follow:

    • The next time a share goes live, the active-share menu reappears at the old anchor without being opened.
    • app.rs WindowEvent::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/update when menu() is None, or check menu(app, …).is_some() in the Escape guard and clear the state when the share ends.

  2. minor (documented deviation, fine): three deviations are documented and acceptable.

    • The "Requires Plutonium" notice is not one of the original's strings. The original opens the Plutonium page, which this client does not have.
    • The caret sits inside the button's corner and is always visible.
    • The Linux "Audio sources" submenu is left out and tracked in #233.

    No action needed beyond what is documented.

  3. minor (process): there is no Electron side-by-side screenshot and no devserver screenshare scenario 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-up issue (or a quick fix) before merge.

## 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 screenshots `control_bar_sharing` and `stream_settings_menu` exist 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/…)`, `QualityPick` and `stream_settings_model` from core. Nothing in the core interfaces changes. Removing `Eq` from `call::Message`, `voice_panel::Message`, `calls::Message` and `CallButtonModel` is fine (they now carry a `Point`), 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 ci` in 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 1. **minor (follow-up)**: the screen-share menu state goes stale. `local.screenshare.menu` is 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()` returns `None`, so the menu is hidden, but `State.menu` stays `Some`. Two things follow: - The next time a share goes live, the active-share menu reappears at the old anchor without being opened. - `app.rs` `WindowEvent::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`/`update` when `menu()` is `None`, or check `menu(app, …).is_some()` in the Escape guard and clear the state when the share ends. 2. **minor (documented deviation, fine)**: three deviations are documented and acceptable. - The "Requires Plutonium" notice is not one of the original's strings. The original opens the Plutonium page, which this client does not have. - The caret sits inside the button's corner and is always visible. - The Linux "Audio sources" submenu is left out and tracked in #233. No action needed beyond what is documented. 3. **minor (process)**: there is no Electron side-by-side screenshot and no devserver `screenshare` scenario 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-up` issue (or a quick fix) before merge.
charles manually merged commit f98d075b60 into screenshare 2026-11-12 09:48:19 +00:00
Sign in to join this conversation.
No description provided.