Media · Capture and devices: recorder, camera, mic meter, device choice and 3D model viewer

ScreenRecorderControls holds a recording in one pill: Record, then a live
dot and the time it has run beside pause or resume and stop, with mic and
camera toggles. CameraPreview shows host frames in the camera's shape, or
the camera off. MicLevelMeter lights segments up to the level, amber and
red near the top, with tones shared from data_display. DeviceSelector
picks a microphone, camera or speaker through Select, which may now be
empty while shut. ModelViewer shows the host's frame for an orbit that a
drag, the arrows, Command-scroll, + and - and a reset move; the orbit is
seeded from the host so fast drags add up. The gallery draws a stone
torus per orbit and frees each replaced frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-09-26 19:05:23 -04:00
1 parent 235f059c8e
commit 7f1cfe8c3d
20 files changed
+1541 -30

No files matched your search

+1 -1
View File
@@ -299,7 +299,7 @@ impl Select {
impl RenderOnce for Select {
fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement {
assert!(
!self.choices.is_empty(),
self.disabled || !self.choices.is_empty(),
"select {:?} has no choices",
self.id
);
+27
View File
@@ -419,3 +419,30 @@ fn a_free_combobox_keeps_the_text_it_mounts_with(cx: &mut TestAppContext) {
"custom label"
);
}
/// A select with nothing to pick, open or shut.
struct Empty(bool);
impl Render for Empty {
fn render(&mut self, _: &mut Window, _: &mut Context<Self>) -> impl IntoElement {
Select::new("empty", [])
.placeholder("Nothing yet")
.disabled(self.0)
}
}
#[gpui::test]
fn a_shut_select_may_be_empty(cx: &mut TestAppContext) {
setup(cx);
let (_, cx) = cx.add_window_view(|_, _| Empty(true));
cx.run_until_parked();
cx.update(|window, _| window.focus_next());
assert!(cx.update(|window, cx| window.focused(cx).is_none()));
}
#[gpui::test]
#[should_panic(expected = "has no choices")]
fn an_open_select_with_nothing_to_pick_fails(cx: &mut TestAppContext) {
setup(cx);
cx.add_window_view(|_, _| Empty(false));
}