Skip to content

feat: add Cap deeplink controls and Raycast extension#1809

Open
tongshu2023 wants to merge 2 commits into
CapSoftware:mainfrom
tongshu2023:feat/cap-deeplinks-raycast
Open

feat: add Cap deeplink controls and Raycast extension#1809
tongshu2023 wants to merge 2 commits into
CapSoftware:mainfrom
tongshu2023:feat/cap-deeplinks-raycast

Conversation

@tongshu2023
Copy link
Copy Markdown

@tongshu2023 tongshu2023 commented May 13, 2026

/claim #1540

Summary

  • add deeplink actions for pause, resume, toggle pause, microphone switching, and camera switching
  • fix custom-scheme deeplink parsing so cap-desktop://action?... is recognized through the URL host
  • add an in-repo Raycast extension that triggers Cap desktop actions through deeplinks

Validation

  • added deeplink parser tests for custom-scheme action URLs and non-action hosts
  • ran npm exec -- tsc -p tsconfig.json --noEmit in apps/raycast
  • could not run cargo fmt / cargo check -p cap-desktop in this environment because the Rust toolchain is not installed here

Notes

  • the Raycast extension is scoped to macOS, matching Cap desktop support and deeplink registration
  • the Raycast extension uses exact OS-visible screen/window names for start-recording targets
  • camera switching accepts either a Cap device id or model id, matching the desktop app serializer
  • demo video is still pending because this environment does not have the local Cap desktop runtime/toolchain needed to record a working end-to-end flow

@brin-security-scanner brin-security-scanner Bot added the contributor:verified Contributor passed trust analysis. label May 13, 2026
@brin-security-scanner brin-security-scanner Bot added the pr:flagged PR flagged for review by security analysis. label May 13, 2026
@brin-security-scanner
Copy link
Copy Markdown

Brin PR Security Scan

This PR has findings that should be reviewed.

  • Score: 42/100
  • Verdict: suspicious

Findings:

  • first_time_contributor: tongshu2023 has no prior commits to CapSoftware/Cap.

Analyzed by Brin

Comment thread apps/raycast/package.json Outdated
"icon": "assets/icon.png",
"author": "cap",
"license": "MIT",
"platforms": ["macOS", "Windows"],
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 Cap desktop only runs on macOS. Including "Windows" in the platforms array is misleading: Raycast on Windows will attempt to open the cap-desktop:// deeplink, but that URL scheme is not registered on Windows, so every command silently does nothing. The list should be macOS-only to match the actual supported platform.

Suggested change
"platforms": ["macOS", "Windows"],
"platforms": ["macOS"],
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/raycast/package.json
Line: 8

Comment:
Cap desktop only runs on macOS. Including `"Windows"` in the `platforms` array is misleading: Raycast on Windows will attempt to open the `cap-desktop://` deeplink, but that URL scheme is not registered on Windows, so every command silently does nothing. The list should be macOS-only to match the actual supported platform.

```suggestion
	"platforms": ["macOS"],
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +60 to +62
await open(deepLink);
await closeMainWindow();
await showHUD(hudMessage);
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 All commands in this extension use "mode": "no-view", which means there is no main Raycast window to close. closeMainWindow() is only meaningful in view-mode commands; in no-view mode it is a no-op at best and may throw at runtime. showHUD is the standard completion signal for no-view commands and dismisses the launcher itself — closeMainWindow() is not needed here.

Suggested change
await open(deepLink);
await closeMainWindow();
await showHUD(hudMessage);
await open(deepLink);
await showHUD(hudMessage);
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/raycast/src/lib/cap.ts
Line: 60-62

Comment:
All commands in this extension use `"mode": "no-view"`, which means there is no main Raycast window to close. `closeMainWindow()` is only meaningful in view-mode commands; in no-view mode it is a no-op at best and may throw at runtime. `showHUD` is the standard completion signal for no-view commands and dismisses the launcher itself — `closeMainWindow()` is not needed here.

```suggestion
	await open(deepLink);
	await showHUD(hudMessage);
```

How can I resolve this? If you propose a fix, please make it concise.

@socket-security
Copy link
Copy Markdown

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

Labels

🙋 Bounty claim contributor:verified Contributor passed trust analysis. pr:flagged PR flagged for review by security analysis.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant