Camera 16: fluxer-ui layout with cameras, More options, participant menu (#968) #989

Closed
charles wants to merge 0 commits from camera-16-ui-layout-with-cameras into camera
Owner

Camera plan Task 16 (spec §10.3, rows 36 and 38–43): the call layout with cameras, "More options" with "Show my own camera", and the participant menu's camera rows.

What was built

  • Grid and members row (call/grid.rs, call/focus.rs): with "Show non-video participants" off, a tile stays when its camera is live (grid::has_camera, which follows the store's tile_camera / has_live_camera: the room's publication, unmuted, first, the voice state while the room has not reported). Stream tiles always stay. If nobody has a camera, everybody shows (row 40).

  • Focus on a participant: "Focus this person" / "Focus this device" pins a participant in the store (CameraAction::Focus). focus::target draws their tile large (camera or avatar) in the stream's 16:9 area, with no stream header, and the others go in the members row; "Unfocus" goes back to the grid. In "Grid view" the grid stays (as #935 does for streams), and pinning does not change the stored layout. A watched stream is still the default focus. When there is both a watched stream and a pin, whichever came last is drawn large (State::camera_first). Row 39's "most recent speaking camera" is used only when the pinned participant has left (CallModel::pinned).

  • Fullscreen: the existing corner controls also work for a focused camera. call::corner_volume returns no volume for a camera, and the bar has no "Stop watching stream".

  • More options (call/more_options.rs): "Grid view", "Show my own camera", "Show non-video participants". A DM call gets only the two camera rows (MoreOptions::dm).

  • "Hide your own camera?" (modals/hide_own_camera.rs, new): opens when "Show my own camera" is turned off, unless skip_hide_own_camera_confirm is set. "Hide" stores ShowMyOwnCamera(false), plus SkipHideOwnCameraConfirm(true) when "Don't ask me again" is ticked (stored locally, spec §16 D7). Cancel, Escape and a click on the backdrop change nothing.

  • Participant menu (participant_menu.rs), rows placed as in the original (VoiceParticipantMenuData.tsx:480-571,688-724,895-981,1365-1379):

    • "Focus this person" / "Focus this device" / "Unfocus"
    • "Disable video locally" (checkbox)
    • "Preview camera" (own tile, camera off, call tile only)
    • "Turn off device camera"
    • "Turn off all device cameras" (in its own device group)
    • "Show non-video participants" (call tile only, its own group before the moderation rows)

    A new participant_menu::State::surface (Surface::{List, CallTile}) records whether the menu came from the sidebar or from a call tile. A right-click on a tile now opens the menu, as the "⋯" button already did.

  • Guild rail: the voice badge has a camera variant (GuildRailItem::video, VideoCameraIcon), shown when someone has a camera on and nobody is sharing.

Strings copied from the fork (voice_participant_menu_data/shared.ts, VoiceSettingsMenus.tsx, HideOwnCameraConfirmModal.tsx): "Focus this person", "Focus this device", "Unfocus", "Preview camera", "Disable video locally", "Show non-video participants", "Turn off device camera", "Turn off all device cameras", "Show my own camera", "Hide your own camera?", "Turning this off only hides your camera from your own view. Others in the call can still see your camera feed.", "Don't ask me again", "Cancel", "Hide".

How it was tested

  • New tests/camera_layout.rs (11 tests), covering every test the plan names: non_video_off_keeps_camera_and_stream_tiles, nobody_with_camera_keeps_everybody, pin_focuses_tile_and_unfocus_returns, grid_view_keeps_grid_when_pinned, stream_still_default_focus, fullscreen_on_camera_has_no_volume, more_options_rows_guild_and_dm, hide_own_camera_asks_once_unless_skipped, rail_badge_camera. It also adds the modal's buttons and the right-click on a tile.
  • New participant_menu_rows_self_other_other_device in tests/participant_menu.rs.
  • Six new goldens: call_focus_camera, call_focus_camera_fullscreen, call_grid_video_only, more_options_camera, hide_own_camera_modal, participant_menu_camera. They were drawn with UPDATE_GOLDEN=1 on lavapipe in the fluxer-native-shots:u2204 image and show only the camera test pattern. The whole screenshot suite (280 tests) passes there unchanged, so no existing golden moved.
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci passed locally, with screenshots and LiveKit interop skipped. No camera, display session or client was opened. No FLUXER_DESKTOP_TESTS test applies.
  • No side-by-side comparison with Electron: agents cannot run the original. The goldens are the reference images.

Deviations from the plan

  • Files outside the task's list. I touched these to make the feature reachable, keeping each change small:
    • screens/main/mod.rs: routing for the new messages, the menu surface, and drawing the modal with the More options menu. This file is shared with Task 14, so a merge may need both sides kept.
    • screens/main/model.rs: GuildRailItem::video.
    • screens/main/modals/mod.rs: registers the new modal.
    • call/mod.rs: a registration file.
    • Test files, for the new State::surface field and the new more_options::over signature: tests/{menus_user_dm,menu_placement,stream_focus,screenshots}.rs.
  • "Nothing focused by default". The spec (§10.3) says the grid shows when nothing is pinned. The core's focus_default would focus a camera whenever the layout is CallLayout::Focus, which is this client's default. The original's default layout is grid, so I kept the grid by default. Row 39's default is used only when the pinned participant has left. This also leaves Task 13's goldens unchanged.
  • DM call "More options". The DM call row's control bar (dm_header.rs, Task 14) has no "More options" button today. The menu builds the DM shape (MoreOptions { dm: true, .. }, tested) but nothing opens it yet.
  • "Turn off device camera" and "Turn off all device cameras" are the only per-device self rows; the other device-scoped self rows ("Mute device", etc.) are not built.

Closes #968

🤖 Generated with Claude Code

https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K

Camera plan Task 16 (spec §10.3, rows 36 and 38–43): the call layout with cameras, "More options" with "Show my own camera", and the participant menu's camera rows. ## What was built - **Grid and members row** (`call/grid.rs`, `call/focus.rs`): with "Show non-video participants" off, a tile stays when its camera is live (`grid::has_camera`, which follows the store's `tile_camera` / `has_live_camera`: the room's publication, unmuted, first, the voice state while the room has not reported). Stream tiles always stay. If nobody has a camera, everybody shows (row 40). - **Focus on a participant**: "Focus this person" / "Focus this device" pins a participant in the store (`CameraAction::Focus`). `focus::target` draws their tile large (camera or avatar) in the stream's 16:9 area, with no stream header, and the others go in the members row; "Unfocus" goes back to the grid. In "Grid view" the grid stays (as #935 does for streams), and pinning does not change the stored layout. A watched stream is still the default focus. When there is both a watched stream and a pin, whichever came last is drawn large (`State::camera_first`). Row 39's "most recent speaking camera" is used only when the pinned participant has left (`CallModel::pinned`). - **Fullscreen**: the existing corner controls also work for a focused camera. `call::corner_volume` returns no volume for a camera, and the bar has no "Stop watching stream". - **More options** (`call/more_options.rs`): "Grid view", "Show my own camera", "Show non-video participants". A DM call gets only the two camera rows (`MoreOptions::dm`). - **"Hide your own camera?"** (`modals/hide_own_camera.rs`, new): opens when "Show my own camera" is turned off, unless `skip_hide_own_camera_confirm` is set. "Hide" stores `ShowMyOwnCamera(false)`, plus `SkipHideOwnCameraConfirm(true)` when "Don't ask me again" is ticked (stored locally, spec §16 D7). Cancel, Escape and a click on the backdrop change nothing. - **Participant menu** (`participant_menu.rs`), rows placed as in the original (`VoiceParticipantMenuData.tsx:480-571,688-724,895-981,1365-1379`): - "Focus this person" / "Focus this device" / "Unfocus" - "Disable video locally" (checkbox) - "Preview camera" (own tile, camera off, call tile only) - "Turn off device camera" - "Turn off all device cameras" (in its own device group) - "Show non-video participants" (call tile only, its own group before the moderation rows) A new `participant_menu::State::surface` (`Surface::{List, CallTile}`) records whether the menu came from the sidebar or from a call tile. A right-click on a tile now opens the menu, as the "⋯" button already did. - **Guild rail**: the voice badge has a camera variant (`GuildRailItem::video`, `VideoCameraIcon`), shown when someone has a camera on and nobody is sharing. Strings copied from the fork (`voice_participant_menu_data/shared.ts`, `VoiceSettingsMenus.tsx`, `HideOwnCameraConfirmModal.tsx`): "Focus this person", "Focus this device", "Unfocus", "Preview camera", "Disable video locally", "Show non-video participants", "Turn off device camera", "Turn off all device cameras", "Show my own camera", "Hide your own camera?", "Turning this off only hides your camera from your own view. Others in the call can still see your camera feed.", "Don't ask me again", "Cancel", "Hide". ## How it was tested - New `tests/camera_layout.rs` (11 tests), covering every test the plan names: `non_video_off_keeps_camera_and_stream_tiles`, `nobody_with_camera_keeps_everybody`, `pin_focuses_tile_and_unfocus_returns`, `grid_view_keeps_grid_when_pinned`, `stream_still_default_focus`, `fullscreen_on_camera_has_no_volume`, `more_options_rows_guild_and_dm`, `hide_own_camera_asks_once_unless_skipped`, `rail_badge_camera`. It also adds the modal's buttons and the right-click on a tile. - New `participant_menu_rows_self_other_other_device` in `tests/participant_menu.rs`. - Six new goldens: `call_focus_camera`, `call_focus_camera_fullscreen`, `call_grid_video_only`, `more_options_camera`, `hide_own_camera_modal`, `participant_menu_camera`. They were drawn with `UPDATE_GOLDEN=1` on lavapipe in the `fluxer-native-shots:u2204` image and show only the camera test pattern. The whole screenshot suite (280 tests) passes there unchanged, so no existing golden moved. - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` passed locally, with screenshots and LiveKit interop skipped. No camera, display session or client was opened. No `FLUXER_DESKTOP_TESTS` test applies. - No side-by-side comparison with Electron: agents cannot run the original. The goldens are the reference images. ## Deviations from the plan - **Files outside the task's list.** I touched these to make the feature reachable, keeping each change small: - `screens/main/mod.rs`: routing for the new messages, the menu surface, and drawing the modal with the More options menu. This file is shared with Task 14, so a merge may need both sides kept. - `screens/main/model.rs`: `GuildRailItem::video`. - `screens/main/modals/mod.rs`: registers the new modal. - `call/mod.rs`: a registration file. - Test files, for the new `State::surface` field and the new `more_options::over` signature: `tests/{menus_user_dm,menu_placement,stream_focus,screenshots}.rs`. - **"Nothing focused by default".** The spec (§10.3) says the grid shows when nothing is pinned. The core's `focus_default` would focus a camera whenever the layout is `CallLayout::Focus`, which is this client's default. The original's default layout is `grid`, so I kept the grid by default. Row 39's default is used only when the pinned participant has left. This also leaves Task 13's goldens unchanged. - **DM call "More options".** The DM call row's control bar (`dm_header.rs`, Task 14) has no "More options" button today. The menu builds the DM shape (`MoreOptions { dm: true, .. }`, tested) but nothing opens it yet. - **"Turn off device camera" and "Turn off all device cameras"** are the only per-device self rows; the other device-scoped self rows ("Mute device", etc.) are not built. Closes #968 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Failing tests of Camera plan Task 16: the non-video filter from the room's
camera publications, Focus / Unfocus of a participant, Grid view keeping the
grid, a watched stream still the default focus, fullscreen on a camera without
volume, the More options rows of a guild and a DM call, the Hide your own
camera? confirmation, the participant menu's camera rows, the rail's camera
badge, and the six goldens.

Refs #968

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Camera spec §10.3: the grid and the focus members row keep the tiles of live
cameras (the room's publication first, the voice state while it has not said)
with "Show non-video participants" off; "Focus this person" / "Focus this
device" draws the pinned participant large (camera or avatar), "Unfocus"
returns, Grid view keeps the grid, a watched stream stays the default focus
and the one pinned last goes large; the corner controls give fullscreen on a
camera without a volume control. More options gains "Show my own camera"
with the "Hide your own camera?" modal (skip flag stored locally, D7) and
has the two camera rows only in a DM call. The participant menu gains the
camera rows of row 36 in the original's positions, and a right-click on a
tile opens it with the call tile's rows. The guild rail wears the camera
badge when someone has a camera on and nobody shares.

Refs #968

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Drawn on lavapipe in the fluxer-native-shots:u2204 image with
UPDATE_GOLDEN=1: call_focus_camera, call_focus_camera_fullscreen,
call_grid_video_only, more_options_camera, hide_own_camera_modal and
participant_menu_camera, every picture the camera test pattern.

Refs #968

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Author
Owner

Merged into camera by hand (the merge API returns 405); the commits are in the branch.

Merged into `camera` by hand (the merge API returns 405); the commits are in the branch.
charles closed this pull request 2026-11-20 05:17:59 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.