/claim #1540
Implements the \ bounty for deeplinks support + Raycast Extension as specified in #1540.
Rust Changes:
Raycast Extension:
Ready for review! 🚀
This PR adds new Cap deeplink actions for recording control (pause/resume/toggle) and device management (set/switch camera/mic) in apps/desktop/src-tauri/src/deeplink_actions.rs, and introduces a new Raycast extension under extensions/raycast/ with seven no-view commands that invoke those deeplinks and provide HUD feedback.
Main concern: the deeplink URL parsing/validation logic in DeepLinkAction::try_from appears inverted, causing valid cap-desktop://action?... URLs to be treated as Invalid, which would prevent the Raycast commands (and any other deeplink client) from working at all.
Minor follow-ups include making the Raycast “Cap installed” check consistent across commands, and avoiding non-reproducible @latest usage in the extension’s publish script.
DeepLinkAction::try_from that rejects valid cap-desktop://action URLs, which is core to the PR’s functionality. Other issues are smaller UX/reproducibility concerns.| Filename | Overview |
|---|---|
| apps/desktop/src-tauri/src/deeplink_actions.rs | Adds new deeplink actions (pause/resume/toggle, device switching) and defaults; however TryFrom<&Url> host validation appears inverted so valid cap-desktop://action URLs are rejected. |
| extensions/raycast/src/start-recording.tsx | Adds Raycast command to open start_recording deeplink with a Cap-installed check via bundle id. |
| extensions/raycast/src/stop-recording.tsx | Adds Raycast command to open stop_recording deeplink and show HUD feedback. |
| extensions/raycast/src/pause-recording.tsx | Adds Raycast command to open pause_recording deeplink and show HUD feedback. |
| extensions/raycast/src/resume-recording.tsx | Adds Raycast command to open resume_recording deeplink and show HUD feedback. |
| extensions/raycast/src/toggle-pause.tsx | Adds Raycast command to open toggle_pause_recording deeplink and show HUD feedback. |
| extensions/raycast/src/switch-camera.tsx | Adds Raycast command to open switch_camera deeplink and show HUD feedback. |
| extensions/raycast/src/switch-microphone.tsx | Adds Raycast command to open switch_microphone deeplink and show HUD feedback. |
| extensions/raycast/package.json | Adds Raycast extension manifest with 7 commands and build/lint/publish scripts (publish uses @latest). |
| extensions/raycast/package-lock.json | Adds npm lockfile for Raycast extension dependencies. |
| extensions/raycast/raycast-env.d.ts | Adds auto-generated Raycast preferences/arguments typings for commands. |
| extensions/raycast/README.md | Adds README describing installation/usage of the Raycast extension. |
| BOUNTY_COMPLETION_SUMMARY.md | Adds bounty completion summary documentation; no functional code changes. |
| DEEPLINKS_TESTING_GUIDE.md | Adds deeplink protocol/testing guide documentation; no functional code changes. |
| extensions/raycast/assets/cap-icon-512.png | Adds Raycast extension icon asset (512px). |
| extensions/raycast/assets/cap-icon.png | Adds Raycast extension icon asset. |
sequenceDiagram
participant External as External App (Raycast)
participant OS as OS URL Handler
participant Cap as Cap Desktop (Tauri)
participant DL as deeplink_actions.rs
participant Rec as recording module
participant Dev as device snapshot
External->>External: Build action JSON
External->>OS: open("cap-desktop://action?value=<encoded JSON>")
OS->>Cap: Launch/activate app with URL(s)
Cap->>DL: handle(app_handle, urls)
DL->>DL: DeepLinkAction::try_from(url)
alt parse OK
DL->>DL: execute(action)
alt recording control
DL->>Rec: start/stop/pause/resume/toggle
else device switching
DL->>Dev: get_devices_snapshot()
DL->>Cap: set_camera_input / set_mic_input
end
else parse error
DL-->>Cap: log error and ignore
end
(2/5) Greptile learns from your feedback when you react with thumbs up/down!
Context used:
Erdogan Kervanli
@erdogan98
Cap
@CapSoftware
Abhishek Verma
@w3Abhishek