Screen share 28: Settings — screen share quality and Advanced media controls (#175) #241

Manually merged
charles merged 0 commits from screenshare-28-ui-screenshare-settings into screenshare 2026-11-12 09:48:22 +00:00
Owner

Stacked on: screenshare-12-core-codec-negotiation

What this builds (spec §10 "Settings", §11)

Settings → Voice & video → Video (screens/settings/voice_video/screenshare.rs, cloned from UserVideoTab.tsx:307-428, UserVideoTabState.ts, dimensions from UserVideoTab.module.css):

  • "Screen share quality": 480p/720p, plus 1080p/1440p/Source where the instance has premium or the user has the entitlement; premium entries disabled without the entitlement (options come from stream_settings_model, picks are its QualityPick, so they switch to Custom exactly as the menu does).
  • Premium card ("Unlock HD screen share with Plutonium", "Get Plutonium" opens the Plutonium tab) when premium exists and the user is not entitled.
  • "Frame rate": 15/30, 60 with the entitlement.
  • Notes: "Frame rates above 30 FPS require Plutonium", "This instance currently allows screen sharing up to 720p at 30 FPS.", "Set by the {preset} preset…", "Your saved … needs Plutonium, so shares use …".
  • "Bitrate" (entitled only): Automatic + the original's steps under the instance ceiling, the ceiling, the chosen value.
  • "Advanced video settings" → "Open advanced media settings" (opens Advanced).

Settings → Advanced → Media (screens/settings/advanced_media.rs, cloned from AdvancedVideoControls.tsx, labels from VoiceVideoIndex.ts:177-237):

  • "Screen share codec": "Automatic ({codec})" from rank_codecs without the pin; AV1/H.265 show "(requires opt-in)" while their switch is off; codecs this build does not encode (per VoiceEvent::CodecCapabilities) are disabled; before the report only Automatic can be picked.
  • "Allow AV1 for screen sharing", "Allow H.265 (HEVC) for screen sharing".
  • "Screen share preview behavior": "Pause my screen share preview in the background", "Disable picture-in-picture popout for screen shares".
  • "Screen share encoder controls" → "Configure" opens the medium dialog (37.5 rem, Modal.module.css) with "Encoder path" (with the "No hardware encoder was found…" description when nothing is hardware), "SVC mode", "Content hint". Backdrop click, the X or Escape closes it; leaving the tab or the settings closes it.

Parity (docs/parity/settings.toml): the five voice-video-screen-share-* entries → done (preview behaviour with a Partial note), new hand entry section-voice_video-video (Partial: camera is Camera (5)).

How it was tested

  • crates/fluxer-ui/tests/settings_screenshare.rs: quality_options_follow_entitlement, codec_combobox_disables_unsupported_and_marks_opt_in, encoder_modal_round_trips_settings, preview_switches_bind, parity_check_passes (plus headless draws of each page and the dialog). Written first, seen failing (compile), then passing.
  • Screenshot tests settings_screenshare_matches_golden, settings_advanced_media_matches_golden (goldens generated on lavapipe locally); README table rows added; copies in docs/screenshots/settings-screenshare.png, settings-advanced-media.png. No Electron reference capture was available here: dimensions/strings come from the fork files named above.
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally; cargo xtask parity-check --fork ~/src/fluxer-soundboard all accounted for. No real-device tests apply to this task.

Deviations from the plan

  • "Disable stream previews" / "Hide my stream preview thumbnail" not built: the original binds that switch to PrivacyPreferences.disableStreamPreviews, which the store gets with Screen share 13 (not on screenshare yet). Follow-up #240.
  • iced's pick_list cannot grey out entries: disabled entries are listed with the original's labels, and picking one does nothing (update re-derives the model and ignores it).
  • The settings_screenshare screenshot shows the navigation plus the video section alone (the section sits far below the audio sections and the page cannot be scrolled in an offscreen render).
  • Outside the Files list (needed to wire it): app.rs (Local::settings, view_with, apply_local, Outcome::Actions, Escape closes the dialog first), theme/icons.rs + atom-fill.svg (identical to the Atom icon added on screenshare-25, so the merge is clean), voice_video/mod.rs helpers made generic over the message type, tests/settings_nav.rs / tests/settings_voice.rs (assertions that expected the Video placeholder), crates/fluxer-ui/README.md, docs/screenshots/README.md.
  • No camera controls in the video section (Camera, sub-project 5).

Closes #175

🤖 Generated with Claude Code

Stacked on: screenshare-12-core-codec-negotiation ## What this builds (spec §10 "Settings", §11) **Settings → Voice & video → Video** (`screens/settings/voice_video/screenshare.rs`, cloned from `UserVideoTab.tsx:307-428`, `UserVideoTabState.ts`, dimensions from `UserVideoTab.module.css`): - "Screen share quality": 480p/720p, plus 1080p/1440p/Source where the instance has premium or the user has the entitlement; premium entries disabled without the entitlement (options come from `stream_settings_model`, picks are its `QualityPick`, so they switch to Custom exactly as the menu does). - Premium card ("Unlock HD screen share with Plutonium", "Get Plutonium" opens the Plutonium tab) when premium exists and the user is not entitled. - "Frame rate": 15/30, 60 with the entitlement. - Notes: "Frame rates above 30 FPS require Plutonium", "This instance currently allows screen sharing up to 720p at 30 FPS.", "Set by the {preset} preset…", "Your saved … needs Plutonium, so shares use …". - "Bitrate" (entitled only): Automatic + the original's steps under the instance ceiling, the ceiling, the chosen value. - "Advanced video settings" → "Open advanced media settings" (opens Advanced). **Settings → Advanced → Media** (`screens/settings/advanced_media.rs`, cloned from `AdvancedVideoControls.tsx`, labels from `VoiceVideoIndex.ts:177-237`): - "Screen share codec": "Automatic ({codec})" from `rank_codecs` without the pin; AV1/H.265 show "(requires opt-in)" while their switch is off; codecs this build does not encode (per `VoiceEvent::CodecCapabilities`) are disabled; before the report only Automatic can be picked. - "Allow AV1 for screen sharing", "Allow H.265 (HEVC) for screen sharing". - "Screen share preview behavior": "Pause my screen share preview in the background", "Disable picture-in-picture popout for screen shares". - "Screen share encoder controls" → "Configure" opens the medium dialog (37.5 rem, `Modal.module.css`) with "Encoder path" (with the "No hardware encoder was found…" description when nothing is hardware), "SVC mode", "Content hint". Backdrop click, the X or Escape closes it; leaving the tab or the settings closes it. Parity (`docs/parity/settings.toml`): the five `voice-video-screen-share-*` entries → `done` (preview behaviour with a Partial note), new hand entry `section-voice_video-video` (Partial: camera is Camera (5)). ## How it was tested - `crates/fluxer-ui/tests/settings_screenshare.rs`: `quality_options_follow_entitlement`, `codec_combobox_disables_unsupported_and_marks_opt_in`, `encoder_modal_round_trips_settings`, `preview_switches_bind`, `parity_check_passes` (plus headless draws of each page and the dialog). Written first, seen failing (compile), then passing. - Screenshot tests `settings_screenshare_matches_golden`, `settings_advanced_media_matches_golden` (goldens generated on lavapipe locally); README table rows added; copies in `docs/screenshots/settings-screenshare.png`, `settings-advanced-media.png`. No Electron reference capture was available here: dimensions/strings come from the fork files named above. - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally; `cargo xtask parity-check --fork ~/src/fluxer-soundboard` all accounted for. No real-device tests apply to this task. ## Deviations from the plan - **"Disable stream previews" / "Hide my stream preview thumbnail" not built**: the original binds that switch to `PrivacyPreferences.disableStreamPreviews`, which the store gets with Screen share 13 (not on `screenshare` yet). Follow-up #240. - iced's `pick_list` cannot grey out entries: disabled entries are listed with the original's labels, and picking one does nothing (`update` re-derives the model and ignores it). - The `settings_screenshare` screenshot shows the navigation plus the video section alone (the section sits far below the audio sections and the page cannot be scrolled in an offscreen render). - Outside the Files list (needed to wire it): `app.rs` (`Local::settings`, `view_with`, `apply_local`, `Outcome::Actions`, Escape closes the dialog first), `theme/icons.rs` + `atom-fill.svg` (identical to the Atom icon added on screenshare-25, so the merge is clean), `voice_video/mod.rs` helpers made generic over the message type, `tests/settings_nav.rs` / `tests/settings_voice.rs` (assertions that expected the Video placeholder), `crates/fluxer-ui/README.md`, `docs/screenshots/README.md`. - No camera controls in the video section (Camera, sub-project 5). Closes #175 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Refs #159

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Voice & video's video section (screen share quality, frame rate, bitrate,
the instance-limit, premium, preset and saved-quality notes, "Open advanced
media settings") and Advanced -> Media (screen share codec with
"Automatic ({codec})" and unsupported entries disabled, the AV1 and HEVC
opt-ins, the preview-behaviour switches, the encoder controls dialog).
Parity entries of spec section 11 set.

Refs #175

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #175

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Author
Owner

Independent review: Screen share 28 (ui-screenshare-settings)

Scope: git diff e5122051..origin/screenshare-28-ui-screenshare-settings (35b0f88), read cold.

What I checked

  1. Plan tests: quality_options_follow_entitlement, codec_combobox_disables_unsupported_and_marks_opt_in, encoder_modal_round_trips_settings, preview_switches_bind and parity_check_passes are all in tests/settings_screenshare.rs. The goldens settings_screenshare and settings_advanced_media are in tests/screenshots.rs. The spec values asserted match: 480p/720p and 15/30 FPS without the entitlement, the 720p30 instance note, the premium entries disabled, bitrate steps under the ceiling, "Automatic ({codec})", the encoder dialog defaults (Auto/Auto/Text) and the five §11 ids plus section-voice_video-video at done, owner 3.
  2. Interfaces: the plan's block is a "Produces: spec §10 Settings" UI surface and names no exported type that another task consumes. The spec §10 surface is present except for the deferred privacy switch (see below).
  3. Invariants: the changes are fluxer-ui only, with no new dependency and no new I/O path (Local::settings is pure UI state). No secrets. Outcome::Copy stays redacted in Debug. Server limits are read through entitlement/stream_settings_model, so nothing here can panic on server data.
  4. Review Focus: none of the items is owned by Task 28. Item 5 (previews stop at once when the privacy switch is on) depends on the deferred switch, which is tracked as #240.
  5. FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci on 35b0f88 in a fresh worktree passes ("all steps passed"). Both new goldens ran and matched on local lavapipe.

Findings

  • minor: AV1/H.265 without the opt-in can be picked, but the original disables them. In the fork, CodecCapabilityDetector.ts:164-180 (getScreenShareCodecPolicyUnsupported) returns supported: false while the opt-in is off. AdvancedVideoControls.tsx:160 then sets isDisabled, and the descriptor comment says "while the AV1 opt-in is off and the option is disabled". Here, advanced_media::model sets disabled: !supported(codec) only, so "AV1 (requires opt-in)" can be picked. rank_codecs (codec.rs:103-104) then silently drops that pin, while the dropdown still shows AV1 as selected. The test in codec_combobox_disables_unsupported_and_marks_opt_in asserts this divergent behaviour (enabled == [Auto, Av1, Vp9, Vp8] with the opt-in off). Suggested fix: disabled: !supported(codec) || (codec == Av1 && !av1_opt_in) || (codec == H265 && !hevc_opt_in), and update the assertion.
  • minor: The Voice & video tab now ends with a "Coming in sub-project 2" placeholder (settings_nav.rs now asserts Placeholder { section: None, owner: 2 }). This is because every section counts as built, but sub-project 2 (Voice) has shipped, and the camera group of the same section (sub-project 5) has no placeholder. A user sees a stale "coming" note under the video section. Suggest suppressing the rest-of-tab placeholder for that tab, or showing the camera group's owner (5) instead.
  • minor (accepted deviation): "Hide my stream preview thumbnail" in Advanced and "Disable stream previews" in Privacy are not built because Screen share 13 is not on screenshare yet (verified: origin/screenshare-13-core-previews is unmerged). Follow-up #240 is open and has the follow-up label. voice-video-screen-share-preview-behavior stays done with a "Partial:" note, which follows the repo's existing convention (parity_check accepts only done/planned/dropped).
  • note (pick_list choice): I accept listing the disabled entries and ignoring a pick of one in update. Both update paths re-check against the model (screenshare::update and advanced_media::update), and the tests cover the no-op. The visual cue is the "(requires opt-in)" label. Unsupported codecs and premium resolutions show no cue, which is acceptable until iced can grey out an entry.

Verdict: approve. No blocking findings and local CI is green. The two minor findings can be fixed in this PR or tracked as follow-ups.

## Independent review: Screen share 28 (ui-screenshare-settings) Scope: `git diff e5122051..origin/screenshare-28-ui-screenshare-settings` (35b0f88), read cold. **What I checked** 1. Plan tests: `quality_options_follow_entitlement`, `codec_combobox_disables_unsupported_and_marks_opt_in`, `encoder_modal_round_trips_settings`, `preview_switches_bind` and `parity_check_passes` are all in `tests/settings_screenshare.rs`. The goldens `settings_screenshare` and `settings_advanced_media` are in `tests/screenshots.rs`. The spec values asserted match: 480p/720p and 15/30 FPS without the entitlement, the 720p30 instance note, the premium entries disabled, bitrate steps under the ceiling, "Automatic ({codec})", the encoder dialog defaults (Auto/Auto/Text) and the five §11 ids plus `section-voice_video-video` at `done`, owner 3. 2. Interfaces: the plan's block is a "Produces: spec §10 Settings" UI surface and names no exported type that another task consumes. The spec §10 surface is present except for the deferred privacy switch (see below). 3. Invariants: the changes are fluxer-ui only, with no new dependency and no new I/O path (`Local::settings` is pure UI state). No secrets. `Outcome::Copy` stays redacted in `Debug`. Server limits are read through `entitlement`/`stream_settings_model`, so nothing here can panic on server data. 4. Review Focus: none of the items is owned by Task 28. Item 5 (previews stop at once when the privacy switch is on) depends on the deferred switch, which is tracked as #240. 5. `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` on 35b0f88 in a fresh worktree passes ("all steps passed"). Both new goldens ran and matched on local lavapipe. **Findings** - **minor**: AV1/H.265 without the opt-in can be picked, but the original disables them. In the fork, `CodecCapabilityDetector.ts:164-180` (`getScreenShareCodecPolicyUnsupported`) returns `supported: false` while the opt-in is off. `AdvancedVideoControls.tsx:160` then sets `isDisabled`, and the descriptor comment says "while the AV1 opt-in is off and the option is disabled". Here, `advanced_media::model` sets `disabled: !supported(codec)` only, so "AV1 (requires opt-in)" can be picked. `rank_codecs` (`codec.rs:103-104`) then silently drops that pin, while the dropdown still shows AV1 as selected. The test in `codec_combobox_disables_unsupported_and_marks_opt_in` asserts this divergent behaviour (`enabled == [Auto, Av1, Vp9, Vp8]` with the opt-in off). Suggested fix: `disabled: !supported(codec) || (codec == Av1 && !av1_opt_in) || (codec == H265 && !hevc_opt_in)`, and update the assertion. - **minor**: The Voice & video tab now ends with a "Coming in sub-project 2" placeholder (`settings_nav.rs` now asserts `Placeholder { section: None, owner: 2 }`). This is because every section counts as built, but sub-project 2 (Voice) has shipped, and the camera group of the same section (sub-project 5) has no placeholder. A user sees a stale "coming" note under the video section. Suggest suppressing the rest-of-tab placeholder for that tab, or showing the camera group's owner (5) instead. - **minor (accepted deviation)**: "Hide my stream preview thumbnail" in Advanced and "Disable stream previews" in Privacy are not built because Screen share 13 is not on `screenshare` yet (verified: `origin/screenshare-13-core-previews` is unmerged). Follow-up #240 is open and has the `follow-up` label. `voice-video-screen-share-preview-behavior` stays `done` with a "Partial:" note, which follows the repo's existing convention (`parity_check` accepts only done/planned/dropped). - **note (pick_list choice)**: I accept listing the disabled entries and ignoring a pick of one in `update`. Both update paths re-check against the model (`screenshare::update` and `advanced_media::update`), and the tests cover the no-op. The visual cue is the "(requires opt-in)" label. Unsupported codecs and premium resolutions show no cue, which is acceptable until iced can grey out an entry. **Verdict: approve.** No blocking findings and local CI is green. The two minor findings can be fixed in this PR or tracked as follow-ups.
charles manually merged commit f98d075b60 into screenshare 2026-11-12 09:48:22 +00:00
Sign in to join this conversation.
No description provided.