feat(desktop): add pause, resume, screenshot, and device deeplinks (#1540) - #2145
feat(desktop): add pause, resume, screenshot, and device deeplinks (#1540)#2145gcoinstash-cmd wants to merge 2 commits into
Conversation
Manage your Superagent protectionSuperagent has paused scans for this repository because this unlinked GitHub App installation has used all three included PR scans. You have 0 of 3 included PR scans remaining. Create a free account to continue protection, manage scan settings, review security history, and control which repositories are protected. |
| DeepLinkAction::SetCamera { device_id } => { | ||
| let camera = if device_id.is_empty() || device_id.eq_ignore_ascii_case("none") { | ||
| None | ||
| } else { | ||
| Some(DeviceOrModelID::DeviceID(device_id)) | ||
| }; | ||
| crate::set_camera_input(app.clone(), app.state::<ArcLock<App>>(), camera, None) | ||
| .await | ||
| } | ||
| DeepLinkAction::SetMicrophone { device_id } => { | ||
| let mic = if device_id.is_empty() || device_id.eq_ignore_ascii_case("none") { | ||
| None | ||
| } else { | ||
| Some(device_id) | ||
| }; | ||
| crate::set_mic_input(app.state::<ArcLock<App>>(), mic).await | ||
| } |
There was a problem hiding this comment.
Device changes bypass recording pause
When a camera or microphone deeplink runs during an active Studio recording, these arms replace the live feed without the pause and input-eligibility checks used by the existing controls, causing a gap or inconsistent input in the recorded project.
Knowledge Base Used: Desktop recording orchestration
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src-tauri/src/deeplink_actions.rs
Line: 392-408
Comment:
**Device changes bypass recording pause**
When a camera or microphone deeplink runs during an active Studio recording, these arms replace the live feed without the pause and input-eligibility checks used by the existing controls, causing a gap or inconsistent input in the recorded project.
**Knowledge Base Used:** [Desktop recording orchestration](https://app.greptile.com/cap/-/custom-context/knowledge-base/capsoftware/cap/-/docs/desktop-recording-orchestration.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| if url.scheme() != "cap-desktop" { | ||
| return Err(ActionParseFromUrlError::NotAction); | ||
| } | ||
|
|
There was a problem hiding this comment.
Comments duplicate parser logic
This comment and the similar comment above from_action_name merely restate the immediately following branches, contrary to the repository policy against narrating code and adding maintenance noise without non-obvious context.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src-tauri/src/deeplink_actions.rs
Line: 177
Comment:
**Comments duplicate parser logic**
This comment and the similar comment above `from_action_name` merely restate the immediately following branches, contrary to the repository policy against narrating code and adding maintenance noise without non-obvious context.
**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!
Fixes #1540
/claim #1540
Summary
Extends Cap's desktop deeplink system with support for pause, resume, screenshot, camera, and microphone control via cap-desktop:// protocol.
Greptile Summary
Extends the desktop URL protocol with production pause and resume support plus toggle-pause, screenshot, camera, and microphone actions.
Confidence Score: 4/5
The active-recording device deeplinks should be coordinated with the existing pause and eligibility flow before this PR is merged.
Camera and microphone deeplinks can replace Studio recording feeds while capture is still running, creating gaps or inconsistent recorded input; the remaining comment-policy issue is non-blocking.
Files Needing Attention: apps/desktop/src-tauri/src/deeplink_actions.rs
Important Files Changed
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "feat(desktop): add pause, resume, screen..." | Re-trigger Greptile
Context used (3)