Repository navigation
feat(desktop): warn when the recording's microphone or camera disconnects - #4263
Open
richiemcilroy wants to merge 10 commits into
Open
richiemcilroy wants to merge 10 commits into
richiemcilroy wants to merge 10 commits into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Sandchest reviewed Sandchest reviews every change for vulnerabilities an attacker could use · 2 credits · Review details |
richiemcilroy
force-pushed
the
feat/gpui-device-disconnect-warnings
branch
from
November 14, 2026 15:28
6b34355 to
a5e4cbb
Compare
richiemcilroy
force-pushed
the
feat/gpui-device-disconnect-warnings
branch
from
November 14, 2026 17:39
a5e4cbb to
ee52390
Compare
Member
Author
|
hey @greptileai, please re-review the PR |
richiemcilroy
force-pushed
the
feat/gpui-device-disconnect-warnings
branch
from
November 14, 2026 20:30
ee52390 to
c491b43
Compare
Member
Author
|
hey @greptileai, please re-review the PR |
richiemcilroy
force-pushed
the
feat/gpui-device-disconnect-warnings
branch
from
November 15, 2026 04:38
c491b43 to
3be7375
Compare
…e-disconnect-warnings
Member
Author
|
hey @greptileai, please re-review the PR |
…e-disconnect-warnings
Member
Author
|
hey @greptileai, please re-review the PR |
…e-disconnect-warnings
…e-disconnect-warnings
…e-disconnect-warnings
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Stacked on #4262.
When the microphone or camera disappears mid-recording, the GPUI app said nothing: the bar's issue card only covered errors, sleep pause and low storage (
controls_window.rs), and the camera bubble had no "Camera disconnected" overlay (camera_window.rslisted it as a known gap). The Tauri app warned in both places (in-progress-recording.tsx:199-208,camera.tsx:66,162) and reopened the device when it came back. This brings that back.sequenceDiagram participant W as Input watch (1 s poll) participant S as RecordingSession participant F as Feed the recording reads participant UI as Bar + bubble W->>S: selected mic / camera missing from the device list S->>UI: "Microphone disconnected. Silence will be used until it reconnects." Note over F: recording continues: mic source fills silence, camera track gets no frames W->>S: same device listed again S->>F: SetInput(same device) on the locked feed F-->>S: ready S->>UI: warning clearssession/input_watch.rs): while a recording is live (running or paused), poll the microphone names and camera device ids once a second, as Tauri'sspawn_microphone_watcher/spawn_camera_watcherdid. Only the inputs the recording uses are watched: an input switched to "None", or one with a switch in flight, is never reported missing.LockedInputReconnected), so Studio and Instant both resume on it. After an Instant mic switch (feat(desktop): recording settings menu with mid-recording microphone and camera switching #4262) that is the switched-to feed. The warning clears only once the reopen succeeds; a failed reopen retries on the next poll.Edge cases
Tests
session::input_watch::tests: a missing device warns and its return asks for a reopen while the warning stays until the reopen succeeds; an input the recording stopped using never warns.Proof
The warning in the real app
macOS 15 runner (Blacksmith), real app, Studio recording on "Cap Test Mic B" (a CoreAudio aggregate device over BlackHole). The device is destroyed 6 s in and created again 4 s later:
The warning shows within a second of the unplug (the watch polls once a second), and the microphone is reopened within a second of the device returning.
A/V sync across an unplug
Flash and click stimulus recorded on the same runner by this branch's
cap-recordingandmain's, side by side (runs 43982721209 and 43985132765). The microphone is unplugged at 20 s and plugged back in at 30 s. The table shows how farav-sync-check's mean offset (video minus audio) moved between the 10 flashes before the unplug and the 19 to 20 after the reconnect.mainmainNot proven
cap-recordingdirectly, so its reconnect is the microphone source's own retry, not the app's reopen on the locked feed. The app's reopen is shown working in the log above; its sync was not measured separately.

Confidence Score: 5/5
The PR appears safe to merge, with no outstanding actionable findings.Summary
Adds microphone and camera disconnect warnings during recording, then reopens the selected device when it returns.
Reviews (8) · Last reviewed commit: "fix(desktop): keep the camera's identity..." · Reviewed by Greptile