feat: add Cap deeplink controls and Raycast extension#1809
Conversation
Brin PR Security ScanThis PR has findings that should be reviewed.
Findings:
Analyzed by Brin |
| "icon": "assets/icon.png", | ||
| "author": "cap", | ||
| "license": "MIT", | ||
| "platforms": ["macOS", "Windows"], |
There was a problem hiding this 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.
| "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.| await open(deepLink); | ||
| await closeMainWindow(); | ||
| await showHUD(hudMessage); |
There was a problem hiding this 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.
| 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.
/claim #1540
Summary
cap-desktop://action?...is recognized through the URL hostValidation
npm exec -- tsc -p tsconfig.json --noEmitinapps/raycastcargo fmt/cargo check -p cap-desktopin this environment because the Rust toolchain is not installed hereNotes