feat(desktop): add deeplink actions for pause/resume + mic/camera switching#1847
Open
albertsalgueda wants to merge 1 commit into
Open
feat(desktop): add deeplink actions for pause/resume + mic/camera switching#1847albertsalgueda wants to merge 1 commit into
albertsalgueda wants to merge 1 commit into
Conversation
…tching Extends the cap-desktop:// deeplink surface with the actions needed to drive recording from external clients (e.g. a Raycast extension): pause_recording, resume_recording, toggle_pause_recording, set_mic_input, and set_camera_input. Each action delegates to the existing tauri command of the same name, so behavior matches what the in-app UI already does. Closes CapSoftware#1540 (deeplinks side).
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.
Summary
Extends the
cap-desktop://action?value=…deeplink surface so external clients (e.g. a Raycast extension) can drive recording end-to-end. The repo already supportedStartRecording/StopRecording/OpenEditor/OpenSettings; this PR adds the rest of the verbs the issue calls out:pause_recordingresume_recordingtoggle_pause_recordingset_mic_input(withlabel: Option<String>—nullclears the mic, matching the existing tauri command)set_camera_input(withid: Option<DeviceOrModelID>—nullclears the camera)Each new variant delegates to the existing tauri command of the same name (
crate::recording::pause_recording,crate::set_mic_input, etc.), so behavior matches what the in-app UI already does.Addresses the deeplinks half of #1540. The Raycast extension itself is intentionally out of scope for this PR — it's a separate deliverable that lives in its own repo, and shipping the underlying deeplinks first means the extension can be iterated on without further desktop-side churn.
Example URLs
(
valueis the JSON-encodedDeepLinkActionwith serderename_all = "snake_case", same as the existing variants.)Test plan
cargo check -p cap-desktopopen "cap-desktop://action?value=…"on macOS /start ""equivalent on Windows) and confirm the in-app state matches.Closes #1540 (deeplinks side).
Greptile Summary
This PR extends the
DeepLinkActionenum with five new verbs —pause_recording,resume_recording,toggle_pause_recording,set_mic_input, andset_camera_input— and wires each to the matching existing tauri command, enabling external clients to drive recording state end-to-end via deeplink.rename_all = "snake_case"conventions and match the example URL shapes in the PR description exactly.executebranch mirrors the corresponding Tauri command call already used elsewhere in the file (e.g.,StartRecordingalready callscrate::set_mic_input/crate::set_camera_inputwith the same argument shape).Confidence Score: 5/5
Safe to merge — the change is a minimal, additive delegation to existing tauri commands with no modifications to existing behavior.
Each new deeplink variant is a one-liner that calls a pre-existing, well-tested tauri command using the same call site pattern already established in StartRecording. Serde attributes are correct, DeviceOrModelID already implements Deserialize (used by the existing StartRecording variant), and the skip_camera_window: None argument for SetCameraInput is consistent with how StartRecording calls the same function.
No files require special attention.
Important Files Changed
Reviews (1): Last reviewed commit: "feat(desktop): add deeplink actions for ..." | Re-trigger Greptile