feat: Extend deeplinks support + Raycast extension#1
Open
Conversation
… existing deeplink infrastructure with new actions:\n- PauseRecording, ResumeRecording, TogglePauseRecording\n- RestartRecording\n- TakeScreenshot (with optional capture mode)\n- ListCameras, SetCamera\n- ListMicrophones, SetMicrophone\n- ListDisplays, ListWindows\n\nAdds a Raycast extension (apps/raycast) with commands:\n- Start Instant Recording / Start Studio Recording\n- Stop / Pause / Resume / Toggle Pause / Restart Recording\n- Take Screenshot\n- Open Settings\n\nAll commands communicate with Cap via the cap-desktop:// deeplink scheme.\n\nCloses CapSoftware#1540"
- Add start_current_recording deeplink action (uses saved app settings) - Fix URL parsing: use host_str() instead of domain() for reliability - Add comprehensive unit tests for deeplink parsing (15 tests) - Add DEEPLINKS.md documentation for all available actions - Move Raycast extension from apps/raycast to extensions/raycast - Switch UX from Toast to HUD + closeMainWindow (cleaner for no-view) - Add start-current-recording Raycast command - Add extensions/* to pnpm-workspace.yaml - Use shared runDeepLinkAction utility in lib/deeplink.ts
- Case-insensitive display/window name matching (eq_ignore_ascii_case) - Camera permission check before listing cameras - Display::list() fallback instead of Display::primary() for headless safety - Log settings read errors with inspect_err before fallback - Move closeMainWindow() inside try/catch block - Fix DEEPLINKS.md: URL-encode unit example, fix nested shell quoting - Use start_current_recording for instant/studio commands (respects saved settings) - Soften HUD messages to 'dispatched' (deeplinks are fire-and-forget) - Update command descriptions to clarify they use saved settings
Aligns implementation with docs — capture_mode: null defaults to the primary display, so use the explicit Display::primary() API.
…k for screen recording
Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
…/tedy69/Cap into feat/deeplinks-raycast-extension
… pause-recording.ts
- Add screen recording, camera, and microphone permission checks to StartRecording and StartCurrentRecording, consistent with TakeScreenshot, SetCamera, and SetMicrophone - Add camera permission guard to SetCamera for consistency with ListCameras and SetMicrophone - Fix error message in deeplink.ts: macOS auto-launches installed apps so "running" is not required — only "installed" - Clarify command descriptions in package.json to distinguish instant/studio (mode override, saved device settings) from start-current (all saved settings) - Fix quote style inconsistency in open-settings.ts - Improve toggle-pause HUD message wording
…disable
SetCamera { id: None } and SetMicrophone { label: None } disable the device
and require no hardware access. Blocking them behind a permission check
prevents users from turning off a device overlay if permission was revoked
after a recording session. Mirror the conditional pattern already used in
StartRecording.
… and windows in DEEPLINKS.md
…e error handling in screen/window actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/claim CapSoftware#1540
Summary
Extends the existing deeplink infrastructure in
deeplink_actions.rswith new actions and adds a complete Raycast extension for controlling Cap.Deeplink Changes
Added 10 new
DeepLinkActionvariants toapps/desktop/src-tauri/src/deeplink_actions.rs:PauseRecordingResumeRecordingTogglePauseRecordingRestartRecordingTakeScreenshotcapture_mode, defaults to primary display)ListCamerasSetCameraListMicrophonesSetMicrophoneListDisplays/ListWindowscapture_modeis optional in bothStartRecordingandTakeScreenshot— when omitted, falls back to the primary displayList*actions write JSON results to the system clipboard so external callers can read the dataresolve_capture_targethelper to DRY up target resolution logicDeeplink URL Format
Unit actions:
cap-desktop://action?value="stop_recording"Parameterized:
cap-desktop://action?value={"take_screenshot":{"capture_mode":null}}Raycast Extension
Created
apps/raycast/with 9 commands:All commands use the
cap-desktop://deeplink scheme to communicate with the desktop app. Error handling ensures failure toasts are shown only on actual errors, not unconditionally.Closes CapSoftware#1540