Repository navigation
feat(desktop): warn when the recording's microphone or camera disconnects #4263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/gpui-recording-settings-menu
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -868,6 +868,15 @@ impl ActiveRecording { | |
| /// Marks `at` in a Studio recording and returns the new marker count. | ||
| /// Instant recordings have no editor timeline to put a marker on, so | ||
| /// they take none. | ||
| /// The feed a microphone switch moved the recording onto, if any. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new comment above Context Used: AGENTS.md (source) Prompt To Fix With AIThis is a comment left during a code review.
Path: apps/desktop-gpui/src/recording.rs
Line: 871
Comment:
**Method documentation describes another action**
The new comment above `switched_microphone_actor()` repeats the method's name and leaves the existing marker documentation attached to the wrong method. `AGENTS.md` requires comments to explain non-obvious context rather than narrate the code. Remove the redundant line and move the marker documentation back to `add_marker()`. The new comments above `WatchedInputs` and `disconnected_issue()` also repeat their code. This repository requirement must be satisfied before merging.
**Context Used:** AGENTS.md ([source](https://github.com/capsoftware/cap/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
| pub(crate) fn switched_microphone_actor(&self) -> Option<ActorRef<MicrophoneFeed>> { | ||
| self.switched_microphone | ||
| .lock() | ||
| .unwrap() | ||
| .as_ref() | ||
| .map(|switched| switched._feed.0.clone()) | ||
| } | ||
|
|
||
| pub(crate) fn studio_handle(&self) -> Option<studio_recording::ActorHandle> { | ||
| match &self.handle { | ||
| Handle::Studio(handle) => Some(handle.clone()), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Camera disconnect warnings persist after recording stops
Medium Severity
Disconnect the camera during recording, stop before reconnecting it, then reconnect or select a working camera in the idle preview.
RecordingSession::finishleavesinput_watch.disconnected.cameraset, the watcher exits outsidePhase::Recording, and only the next recording activation resets it. Both this subscription and the preview initializer consume the stale flag without a phase check, so the disconnect overlay remains over healthy video. Clear recording-scoped disconnect state on completion and prevent late reconnect callbacks from restoring stale state, or gate the preview flag to a live recording.