Screen share 24: Focus layout, fullscreen, corner controls, stop watching, picture-in-picture (#171) #250
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "screenshare-24-ui-focus-layout"
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-23-ui-stream-tile
What this builds (spec §10 "Focus layout" and "In-window picture-in-picture")
call::State::sync(&App)(called by the shell on every snapshot) pins a stream as soon as it starts being watched, from anywhere (its tile, the sidebar, a menu), and unpins it when it is no longer watched.focus::focused(&CallModel, &State)is the pinned tile.call/focus.rs): the stream in a 16:9 area with square corners, max heightmin(76 % of window, area − 3 rem)(focus::main_size); others in a mini grid under it (gap 0.75 rem, tiles ≤ 23.75 rem); "Show participants" / "Hide participants" toggle; header line "{name}'s screen" with the info pill (no LIVE badge) and up to 5 spectator avatars (20 px).Message::ToggleFullscreenflipsState::fullscreen;app.rsturns the window mode withwindow::latest().and_then(|id| window::set_mode(id, mode))whenever it changes. Escape leaves it (after menus close), and so does leaving the call view. In fullscreen the main screen is the call view alone and the others go to a bottom rowclamp(4rem, clamp(5.375rem, 13cqh, 7rem), 40cqh)high above the bar's 4.5 rem ("Show members" / "Hide members").call/corner_controls.rs, 2.625 rem, radius 0.875 rem): focused stream volume (speaker + 0–200 % slider) and "Enter fullscreen" / "Exit fullscreen". They show while a stream is focused or in fullscreen, and they lift above the bar when the bar would reach them (--voice-call-corner-lift).EyeSlash,--vc-danger-bg, after disconnect) while someone else's stream is focused:call::controls(&CallModel, &State)setsControlBarModel::stop_watching.call/pip.rs):pip::model(&App, &State)returns the overlay while a stream of the call is watched and another channel is open, unlessdisable_pip_popout. The card is 20 rem, 16:9, at least 240 px and at most 70 % of the window, radius 0.75 rem, 20 px from the bottom-right corner, drawn over the main screen. On hover it shows "Back to call" (channel name,SelectChannel), the streamer and the viewer count. Right-click opens a menu with "Disable screen share picture-in-picture popouts".Tests
crates/fluxer-ui/tests/stream_focus.rs:focus_area_max_height_rule(also checks that watching pins),fullscreen_moves_members_to_bottom_row(also covers the toggle, Escape, and the participant labels),stop_watching_button_only_when_focused,pip_shows_away_from_call_and_back_to_call_returns,pip_disabled_by_setting. Unit tests for the mini grid, the corner lift, the fullscreen label and the PiP messages.stream_focusandstream_pip: goldens drawn withUPDATE_GOLDEN=1on lavapipe in the Ubuntu 22.04 image (fluxer-native-shots:u2204). They also match on this machine's GPU. There is no Electron reference capture. Dimensions come fromVoiceCallView.module.css(471-622, 735-800, 1330-1360, 1408-1460),VoiceCallCornerControls.tsx,StreamFocusHeaderInfo.tsx,VoiceCallLayoutContent.tsx,PiPOverlay.module.css,pip_overlay/{PiPHeader,PiPFooter,PiPOverlayContextMenu,shared}.tsxandfeatures/ui/state/PiP.ts.FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciis green locally.Deviations from the plan and spec
Local::call, not store state. The original keeps them in a UI store too.header.rsout of the task.PiPFooterhides it for screen shares), not spec §10's wording. The card cannot be dragged or resized. Disabling PiP from its menu skips the original's confirmation dialog.stream_tile.rsgetsview_with_radius(square corners for the focused tile, 0.5 rem in the members row),info_pill.rsgetspill(no LIVE badge), plustheme/icons.rs, icon SVGs, the crate README anddocs/screenshots/README.md.Closes #171
🤖 Generated with Claude Code
One tile per screen share next to its sharer's avatar tile, sized by the grid like any other: the watch prompt over the dimmed preview ("Watch stream", "Add stream", collapsing at 300/230/190 px), the room's video while watched, the ended, buffering and failed overlays, the own tile's hidden and paused states, the info pill with the LIVE badge, and the control pill with the stream volume and the spectators popout. The call view reads frames from Local::media.frames. Refs #170 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>Independent review: Screen share 24 (focus layout, fullscreen, corner controls, stop watching, PiP)
Scope:
git diff 501e4aad..origin/screenshare-24-ui-focus-layout(bac08b9).Plan tests: all five named tests are in
crates/fluxer-ui/tests/stream_focus.rsand check what the plan asks for.focus_area_max_height_rulecovers min(76 % of the window, area − 3 rem) at 16:9 (760 / 452 / 337.5 px), NaN input and watch-pins.fullscreen_moves_members_to_bottom_rowcovers the mini grid tiles ≤ 23.75 rem, the bottom row from the fork'sclamp(4rem, clamp(5.375rem, 13cqh, 7rem), 40cqh), Hide participants, and Escape.stop_watching_button_only_when_focused,pip_shows_away_from_call_and_back_to_call_returnsandpip_disabled_by_settinground out the set. The goldensstream_focusandstream_pipare present and pass locally.Interfaces:
State::sync).window::latest().and_then(set_mode), and Escape leaves it.disable_pip_popoutturns it off.All of these are present, and nothing another task consumes was renamed.
Invariants: no Cargo.toml change, no new dependency or I/O path in fluxer-ui (window tasks are iced tasks, frames come only through
FrameBus), no LiveKit types. Server data gets no unchecked indexing or unwraps, and sizes are sanitised. No secrets.Local CI:
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin a fresh worktree: all steps passed (exit 0), including the stream_focus/stream_pip goldens.Findings
app.rsEscape handling: theEscape if self.local.call.escape()arm sits before the "close the top popout" arms. In fullscreen with the soundboard popout open, Escape leaves fullscreen first instead of closing the popout. The fork's LayerManager closes layers first.local.call.fullscreenstays true. The header and sidebar stay hidden until the user presses the corner button twice.follow-upissue linked from this PR before merge. Leaving out the disconnect button follows the fork (PiPFooter:!isScreenShare), so that is fine.Verdict: APPROVED (no blocking findings, local CI green).