Skip to content

[Fix] Add Cap deeplinks and Raycast controls#1811

Open
adminlip wants to merge 3 commits into
CapSoftware:mainfrom
adminlip:fix-deeplinks-1540
Open

[Fix] Add Cap deeplinks and Raycast controls#1811
adminlip wants to merge 3 commits into
CapSoftware:mainfrom
adminlip:fix-deeplinks-1540

Conversation

@adminlip
Copy link
Copy Markdown

@adminlip adminlip commented May 13, 2026

What

  • Adds Cap desktop deeplink actions for starting, stopping, pausing, resuming, toggling pause, setting microphone/camera, and opening settings.
  • Adds a Raycast extension with commands for the new recording controls and device selection flows.
  • Fixes custom-scheme deeplink parsing by using the URL host for cap-desktop://... actions.

Why

Issue #1540 requests deeplink support so a Raycast extension can control Cap recording workflows.

Testing

  • pnpm --dir apps/raycast lint
  • pnpm --dir apps/raycast build
  • git diff --check

Note: Rust workspace formatting/checking could not be run in this container because the installed Cargo is 1.75 and this workspace requires Rust edition 2024 support.

Fixes #1540

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

@superagent-security superagent-security Bot left a comment

Choose a reason for hiding this comment

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

Superagent found 1 security concern(s).

Comment thread apps/raycast/package.json Outdated
Comment on lines +1 to +10
{
"$schema": "https://www.raycast.com/schemas/extension.json",
"name": "cap-raycast",
"title": "Cap",
"description": "Control Cap recordings with deeplinks.",
"icon": "command-icon.png",
"author": "Cap",
"license": "AGPL-3.0-or-later",
"commands": [
{
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 Biome will conflict with Prettier on every pnpm format/pnpm lint run

apps/raycast is included in the pnpm-workspace.yaml (apps/*) and biome.json's includes: ["**"] has no exclusion for it. Every file under apps/raycast/src/ uses 2-space indentation and the extension's own prettier config, but Biome enforces indentStyle: "tab". Running pnpm format or pnpm lint from the repo root will reformat these files, breaking the Raycast toolchain expectation and causing CI failures. The apps/raycast directory should be added to Biome's ignores list, or the extension files should be rewritten to use tabs/double-quotes to match the workspace's Biome config.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/raycast/package.json
Line: 1-10

Comment:
**Biome will conflict with Prettier on every `pnpm format`/`pnpm lint` run**

`apps/raycast` is included in the `pnpm-workspace.yaml` (`apps/*`) and `biome.json`'s `includes: ["**"]` has no exclusion for it. Every file under `apps/raycast/src/` uses 2-space indentation and the extension's own `prettier` config, but Biome enforces `indentStyle: "tab"`. Running `pnpm format` or `pnpm lint` from the repo root will reformat these files, breaking the Raycast toolchain expectation and causing CI failures. The `apps/raycast` directory should be added to Biome's `ignores` list, or the extension files should be rewritten to use tabs/double-quotes to match the workspace's Biome config.

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

Comment thread apps/raycast/package.json Outdated
Comment on lines +7 to +8
"author": "Cap",
"license": "AGPL-3.0-or-later",
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 author must be a Raycast account username, not a display name

The Raycast manifest spec and store validation require the author field to be your actual Raycast account username (e.g., "adminlip"). Using "Cap" (a company display name) will cause ray build to warn and any store submission to fail. The license field also needs to be "MIT" for the Raycast store; AGPL-3.0 extensions are rejected.

Suggested change
"author": "Cap",
"license": "AGPL-3.0-or-later",
"author": "adminlip",
"license": "MIT",
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/raycast/package.json
Line: 7-8

Comment:
**`author` must be a Raycast account username, not a display name**

The Raycast manifest spec and store validation require the `author` field to be your actual Raycast account username (e.g., `"adminlip"`). Using `"Cap"` (a company display name) will cause `ray build` to warn and any store submission to fail. The `license` field also needs to be `"MIT"` for the Raycast store; AGPL-3.0 extensions are rejected.

```suggestion
  "author": "adminlip",
  "license": "MIT",
```

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

Comment thread apps/raycast/src/cap.ts
Comment on lines +10 to +13
for (const [key, value] of Object.entries(params)) {
if (value !== undefined && value !== "")
url.searchParams.set(key, String(value));
}
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 false boolean values are always appended to URLs even when they are the server-side default

The guard value !== undefined && value !== "" passes false booleans through, so start-recording always appends system_audio=false to the URL. In parse_bool_param the default is already false, so this is redundant. Consider also filtering out false unless the param is required.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/raycast/src/cap.ts
Line: 10-13

Comment:
**`false` boolean values are always appended to URLs even when they are the server-side default**

The guard `value !== undefined && value !== ""` passes `false` booleans through, so `start-recording` always appends `system_audio=false` to the URL. In `parse_bool_param` the default is already `false`, so this is redundant. Consider also filtering out `false` unless the param is required.

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

Comment on lines +181 to +190
fn parse_bool_param(
params: &std::collections::HashMap<std::borrow::Cow<'_, str>, std::borrow::Cow<'_, str>>,
key: &str,
default: bool,
) -> bool {
params
.get(key)
.and_then(|value| value.parse::<bool>().ok())
.unwrap_or(default)
}
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 parse_bool_param only accepts lowercase "true"/"false"

Rust's str::parse::<bool>() is case-sensitive and recognises exactly "true" and "false". Values like "1", "0", "True", or "yes" silently fall back to default. For a URL-based API called by scripts or integrations outside the Raycast extension, this can cause unexpected silent misbehaviour.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src-tauri/src/deeplink_actions.rs
Line: 181-190

Comment:
**`parse_bool_param` only accepts lowercase `"true"`/`"false"`**

Rust's `str::parse::<bool>()` is case-sensitive and recognises exactly `"true"` and `"false"`. Values like `"1"`, `"0"`, `"True"`, or `"yes"` silently fall back to `default`. For a URL-based API called by scripts or integrations outside the Raycast extension, this can cause unexpected silent misbehaviour.

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

Comment thread apps/raycast/package.json
Comment on lines +1 to +75
{
"$schema": "https://www.raycast.com/schemas/extension.json",
"name": "cap-raycast",
"title": "Cap",
"description": "Control Cap recordings with deeplinks.",
"icon": "command-icon.png",
"author": "Cap",
"license": "AGPL-3.0-or-later",
"commands": [
{
"name": "start-recording",
"title": "Start Recording",
"description": "Start a Cap recording with a display or window target.",
"mode": "view"
},
{
"name": "stop-recording",
"title": "Stop Recording",
"description": "Stop the current Cap recording.",
"mode": "no-view"
},
{
"name": "pause-recording",
"title": "Pause Recording",
"description": "Pause the current Cap recording.",
"mode": "no-view"
},
{
"name": "resume-recording",
"title": "Resume Recording",
"description": "Resume the current Cap recording.",
"mode": "no-view"
},
{
"name": "toggle-pause-recording",
"title": "Toggle Pause Recording",
"description": "Toggle pause for the current Cap recording.",
"mode": "no-view"
},
{
"name": "set-microphone",
"title": "Set Microphone",
"description": "Set or clear Cap's microphone input.",
"mode": "view"
},
{
"name": "set-camera",
"title": "Set Camera",
"description": "Set or clear Cap's camera input.",
"mode": "view"
},
{
"name": "open-settings",
"title": "Open Settings",
"description": "Open Cap settings.",
"mode": "view"
}
],
"dependencies": {
"@raycast/api": "^1.83.2"
},
"devDependencies": {
"@raycast/eslint-config": "^1.0.11",
"@types/node": "^20.17.6",
"eslint": "^8.57.1",
"prettier": "^3.3.3",
"typescript": "^5.6.3"
},
"scripts": {
"build": "ray build -e dist",
"dev": "ray develop",
"lint": "ray lint",
"fix-lint": "ray lint --fix"
}
}
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 Missing platforms field and package-lock.json

The Raycast manifest recommends declaring a platforms field (e.g., ["macOS"]) so users on other platforms are informed the extension is macOS-only. Additionally, Raycast's store CI builds extensions with npm using package-lock.json; without one the lockfile is missing and dependency versions aren't pinned for store validation.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/raycast/package.json
Line: 1-75

Comment:
**Missing `platforms` field and `package-lock.json`**

The Raycast manifest recommends declaring a `platforms` field (e.g., `["macOS"]`) so users on other platforms are informed the extension is macOS-only. Additionally, Raycast's store CI builds extensions with `npm` using `package-lock.json`; without one the lockfile is missing and dependency versions aren't pinned for store validation.

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

@superagent-security superagent-security Bot added pr:verified PR passed security analysis. and removed pr:flagged PR flagged for review by security analysis. labels May 13, 2026
@adminlip adminlip force-pushed the fix-deeplinks-1540 branch from 8acbf8d to f0a9741 Compare May 13, 2026 21:51
@adminlip adminlip changed the title [Fix] Add Raycast deeplink recording controls [Fix] Add Cap deeplinks and Raycast controls May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:verified Contributor passed trust analysis. pr:verified PR passed security analysis.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bounty: Deeplinks support + Raycast Extension

1 participant