Camera 15: fluxer-ui Settings → Voice & video: the camera group, sounds (#967) #992

Closed
charles wants to merge 0 commits from camera-15-ui-settings-voice-video into camera
Owner

What this builds (Camera plan, Task 15; spec §10.4, rows 13–14, 17–19, 48)

Settings → Voice & video → Video gains the camera group above the screen sharing group (UserVideoTab.tsx:233-318), in crates/fluxer-ui/src/screens/settings/voice_video/camera.rs:

  • "Camera" over app.voice.camera.devices: "Default" first (the system's camera), then by name, "Camera" for a nameless one (SettingsDeviceOptions.ts). A stored camera that is not listed shows "Default", which is what the core opens (own.rs::camera_device), and the choice stays stored (§16 D6). A pick sends CameraAction::SelectDevice (restarts a running capture).
  • "Mirror camera" → SetVoiceSetting(MirrorCamera).
  • "Start camera test and configure effects" → CameraAction::OpenPreview; the "Camera preview" modal is drawn over the settings without "Turn on camera" (showEnableCameraButton={false}): device box, the LocalCamera frames (Contain, mirrored with the setting), "Initializing camera..." until the first frame, "Camera error" + the §11 text on failure, "Mirror camera", "Cancel"; Escape and the backdrop close it. Its capture ends when the modal closes or the page is left, however it is left (close button, Escape, a shortcut, another tab): settings::State::camera (camera::TestState) and settings::sync.
  • "Camera quality": 480p / 720p, and 1080p where the instance has premium or the user the entitlement, disabled without it (VideoQualityEntitlement.ts, spec Q8); a stored 1080p the account cannot send shows 720p (params::effective_resolution).
  • "No camera found" / "Connect a camera and try again." in place of the dropdown and the test button (spec §10.4); "Mirror camera" and the quality stay.
  • Listing when the page opens: CameraAction::ListDevices (appended to the registry) → Effect::Camera(CameraCommand::List), opening nothing; sent once per opening of the page.
  • Sounds: "Camera on" / "Camera off" rows existed (Task 5); Notifications → Sounds now draws them in the original's place, after "Incoming call" and before the screen share sounds (SoundLabels.ts:76-90), since NotificationSound::ALL is append-only.

Strings copied (fork ba98441b4): "Camera", "Default", "Mirror camera", "Start camera test and configure effects", "Camera quality", "480p", "720p", "1080p", "No camera found", "Connect a camera and try again.", "Camera preview", "Initializing camera...", "Cancel"; "Camera error" and the error texts come from fluxer_core::voice::camera::own. No new string.

Deviations / outside the Files list

  • fluxer-core (minimal): CameraAction::ListDevices appended (ports.rs) and one arm in own.rs (→ CameraCommand::List). Nothing in the core emitted CameraCommand::List on request, and the UI has no other I/O path; test list_devices_lists_and_opens_nothing in camera_ports.rs.
  • app.rs (two small changes): the settings view gets the frame bus (settings::view_with_media), and camera_awaits_first_frame keeps the clock running until the preview's first frame is on the bus.
  • The modal is the settings' own, not Camera 14's: Camera 14 is built concurrently in screens/main/camera_preview.rs, and the settings screen replaces the main screen, so the main screen's modal would not show over it. Follow-up #991 to reuse Camera 14's modal once both have landed. The modal is drawn whenever the store's preview is open while the settings are shown, so an open capture is never hidden behind the settings (spec §13.3).
  • Premium note: the original has no camera-specific note; the "note" of the plan is the screen sharing group's premium card and notes right under it (same condition). No string invented.
  • Default entry label: "Default", as the original's settings and preview dropdowns label it (buildVideoDeviceOptions, CameraPreviewModal.tsx:679), standing for the first camera.
  • tests/settings_voice.rs::opening_the_page_loads_the_library now expects Camera(ListDevices) after LoadEntranceSounds.
  • Parity: docs/parity/settings.toml (video section note) and docs/parity/screenshare.md (camera group row → done); the rest of the camera parity is Task 20's.

How it was tested

  • crates/fluxer-ui/tests/settings_camera.rs (10 tests): device_options_default_first_then_by_name, missing_device_shows_fallback_keeps_choice, quality_1080p_disabled_without_entitlement, mirror_switch_stores_the_setting, no_camera_notice_replaces_controls, test_button_opens_preview_without_turn_on, test_shows_the_capture_error, leaving_settings_closes_preview (close button, another tab, settings closed elsewhere, staying), opening_page_lists_devices, sound_rows; unit test display_order_lists_every_sound_once.
  • Goldens drawn on lavapipe in fluxer-native-shots:u2204 with UPDATE_GOLDEN=1: new settings_video_camera, settings_video_no_camera, settings_camera_test (the camera test pattern, never a camera); settings_screenshare redrawn (the camera group without a camera now sits above). The whole screenshot suite passes there (277).
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally. No camera, microphone or screen was opened; no FLUXER_DESKTOP_TESTS test was run; the client was not started.

Side by side with the Electron app: not attached (no agent runs either client); the goldens are in fixtures/golden/settings_video_camera.png, settings_video_no_camera.png, settings_camera_test.png.

Closes #967

🤖 Generated with Claude Code

## What this builds (Camera plan, Task 15; spec §10.4, rows 13–14, 17–19, 48) Settings → Voice & video → Video gains the camera group above the screen sharing group (`UserVideoTab.tsx:233-318`), in `crates/fluxer-ui/src/screens/settings/voice_video/camera.rs`: - **"Camera"** over `app.voice.camera.devices`: "Default" first (the system's camera), then by name, "Camera" for a nameless one (`SettingsDeviceOptions.ts`). A stored camera that is not listed shows "Default", which is what the core opens (`own.rs::camera_device`), and the choice stays stored (§16 D6). A pick sends `CameraAction::SelectDevice` (restarts a running capture). - **"Mirror camera"** → `SetVoiceSetting(MirrorCamera)`. - **"Start camera test and configure effects"** → `CameraAction::OpenPreview`; the "Camera preview" modal is drawn over the settings **without "Turn on camera"** (`showEnableCameraButton={false}`): device box, the `LocalCamera` frames (`Contain`, mirrored with the setting), "Initializing camera..." until the first frame, "Camera error" + the §11 text on failure, "Mirror camera", "Cancel"; Escape and the backdrop close it. Its capture ends when the modal closes or the page is left, **however it is left** (close button, Escape, a shortcut, another tab): `settings::State::camera` (`camera::TestState`) and `settings::sync`. - **"Camera quality"**: 480p / 720p, and 1080p where the instance has premium or the user the entitlement, disabled without it (`VideoQualityEntitlement.ts`, spec Q8); a stored 1080p the account cannot send shows 720p (`params::effective_resolution`). - **"No camera found"** / "Connect a camera and try again." in place of the dropdown and the test button (spec §10.4); "Mirror camera" and the quality stay. - **Listing when the page opens**: `CameraAction::ListDevices` (appended to the registry) → `Effect::Camera(CameraCommand::List)`, opening nothing; sent once per opening of the page. - **Sounds**: "Camera on" / "Camera off" rows existed (Task 5); Notifications → Sounds now draws them in the original's place, after "Incoming call" and before the screen share sounds (`SoundLabels.ts:76-90`), since `NotificationSound::ALL` is append-only. Strings copied (fork `ba98441b4`): "Camera", "Default", "Mirror camera", "Start camera test and configure effects", "Camera quality", "480p", "720p", "1080p", "No camera found", "Connect a camera and try again.", "Camera preview", "Initializing camera...", "Cancel"; "Camera error" and the error texts come from `fluxer_core::voice::camera::own`. No new string. ## Deviations / outside the Files list - **fluxer-core (minimal)**: `CameraAction::ListDevices` appended (ports.rs) and one arm in `own.rs` (→ `CameraCommand::List`). Nothing in the core emitted `CameraCommand::List` on request, and the UI has no other I/O path; test `list_devices_lists_and_opens_nothing` in `camera_ports.rs`. - **app.rs (two small changes)**: the settings view gets the frame bus (`settings::view_with_media`), and `camera_awaits_first_frame` keeps the clock running until the preview's first frame is on the bus. - **The modal is the settings' own**, not Camera 14's: Camera 14 is built concurrently in `screens/main/camera_preview.rs`, and the settings screen replaces the main screen, so the main screen's modal would not show over it. Follow-up #991 to reuse Camera 14's modal once both have landed. The modal is drawn whenever the store's preview is open while the settings are shown, so an open capture is never hidden behind the settings (spec §13.3). - **Premium note**: the original has no camera-specific note; the "note" of the plan is the screen sharing group's premium card and notes right under it (same condition). No string invented. - **Default entry label**: "Default", as the original's settings and preview dropdowns label it (`buildVideoDeviceOptions`, `CameraPreviewModal.tsx:679`), standing for the first camera. - `tests/settings_voice.rs::opening_the_page_loads_the_library` now expects `Camera(ListDevices)` after `LoadEntranceSounds`. - Parity: `docs/parity/settings.toml` (video section note) and `docs/parity/screenshare.md` (camera group row → done); the rest of the camera parity is Task 20's. ## How it was tested - `crates/fluxer-ui/tests/settings_camera.rs` (10 tests): `device_options_default_first_then_by_name`, `missing_device_shows_fallback_keeps_choice`, `quality_1080p_disabled_without_entitlement`, `mirror_switch_stores_the_setting`, `no_camera_notice_replaces_controls`, `test_button_opens_preview_without_turn_on`, `test_shows_the_capture_error`, `leaving_settings_closes_preview` (close button, another tab, settings closed elsewhere, staying), `opening_page_lists_devices`, `sound_rows`; unit test `display_order_lists_every_sound_once`. - Goldens drawn on lavapipe in `fluxer-native-shots:u2204` with `UPDATE_GOLDEN=1`: new `settings_video_camera`, `settings_video_no_camera`, `settings_camera_test` (the camera test pattern, never a camera); `settings_screenshare` redrawn (the camera group without a camera now sits above). The whole screenshot suite passes there (277). - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally. No camera, microphone or screen was opened; no `FLUXER_DESKTOP_TESTS` test was run; the client was not started. Side by side with the Electron app: not attached (no agent runs either client); the goldens are in `fixtures/golden/settings_video_camera.png`, `settings_video_no_camera.png`, `settings_camera_test.png`. Closes #967 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Settings -> Voice & video's camera group (spec 10.4): the device dropdown,
the missing device, the 1080p entitlement, the no-camera notice, the camera
test without "Turn on camera" and closed with the settings, the listing
when the page opens (CameraAction::ListDevices), the sound rows.

Refs #967

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Settings -> Voice & video -> Video gains the camera group above the screen
sharing group (spec 10.4; UserVideoTab.tsx:233-318): "Camera" over the
listed cameras ("Default" first, then by name, "Camera" for a nameless one;
a stored camera that is not listed shows "Default" and stays stored),
"Mirror camera", "Start camera test and configure effects", "Camera
quality" (480p, 720p, 1080p with premium or the entitlement, disabled
without it), and the "No camera found" notice in place of the dropdown and
the test button. The test is the "Camera preview" modal drawn over the
settings without "Turn on camera" (showEnableCameraButton={false}); its
preview closes when the page is left, however it is left. The page asks
for the camera list each time it opens: CameraAction::ListDevices,
appended to the registry and reduced to CameraCommand::List (opening
nothing) - the one fluxer-core change. Notifications -> Sounds draws
"Camera on" / "Camera off" in the original's place (SoundLabels.ts:76-90).

Outside the task's files: app.rs passes the frame bus to the settings view
and keeps the clock running until the preview's first frame is on the bus.

Strings copied: "Camera", "Default", "Mirror camera", "Start camera test
and configure effects", "Camera quality", "480p", "720p", "1080p", "No
camera found", "Connect a camera and try again.", "Camera preview",
"Initializing camera...", "Cancel".

Refs #967

Co-Authored-By: Claude Fable 5.2 <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: settings_video_camera, settings_video_no_camera and
settings_camera_test (the camera test pattern, never a camera), and
settings_screenshare redrawn (the camera group without a camera now sits
above the screen sharing group). The whole suite passes there (277).

Refs #967

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
opening_the_page_loads_the_library expects Camera(ListDevices) after
LoadEntranceSounds: the page asks for both once per opening.

Refs #967

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

Merged into camera by hand (conflicts with the other wave-6 tasks in the screenshot tests, docs and camera_awaits_first_frame, which now serves both previews). The full gate passed on the combined tree.

Merged into `camera` by hand (conflicts with the other wave-6 tasks in the screenshot tests, docs and `camera_awaits_first_frame`, which now serves both previews). The full gate passed on the combined tree.
charles closed this pull request 2026-11-20 05:36:45 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.