Skip to content

feat(desktop): add pause, resume, screenshot, and device deeplinks (#1540) - #2145

Open
gcoinstash-cmd wants to merge 2 commits into
CapSoftware:mainfrom
gcoinstash-cmd:feat/deeplink-recording-actions-support
Open

feat(desktop): add pause, resume, screenshot, and device deeplinks (#1540)#2145
gcoinstash-cmd wants to merge 2 commits into
CapSoftware:mainfrom
gcoinstash-cmd:feat/deeplink-recording-actions-support

Conversation

@gcoinstash-cmd

@gcoinstash-cmd gcoinstash-cmd commented Aug 25, 2026

Copy link
Copy Markdown

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.

  • Adds host-, path-, alias-, and JSON-based parsing for the expanded action set.
  • Executes the new actions through existing recording, screenshot, and device-input operations.
  • Adds parser coverage for the supported URL forms and malformed inputs.

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

Filename Overview
apps/desktop/src-tauri/src/deeplink_actions.rs Adds the expanded deeplink parser, execution handlers, and tests, but active Studio device changes bypass the established pause and eligibility flow.
Prompt To Fix All With AI
### Issue 1
apps/desktop/src-tauri/src/deeplink_actions.rs:392-408
**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.

### Issue 2
apps/desktop/src-tauri/src/deeplink_actions.rs:177
**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.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat(desktop): add pause, resume, screen..." | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

Context used (3)

@superagent-security

Copy link
Copy Markdown

Manage your Superagent protection

Superagent 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.

Comment on lines +392 to +408
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
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bounty: Deeplinks support + Raycast Extension

1 participant