Summary

  • add new desktop deeplink actions for recording controls: pause_recording, resume_recording, toggle_pause_recording
  • add deeplink actions for device switching: set_microphone and set_camera
  • wire new actions to existing desktop handlers in recording.rs and lib.rs
  • add parsing tests for legacy JSON deeplinks to prevent regressions

Testing

  • Unable to run cargo test -p cap-desktop deeplink_actions -- --nocapture in this environment because cargo is not installed in PATH.

/claim #1540

Greptile Summary

This PR extends deeplink_actions.rs with five new deeplink actions (PauseRecording, ResumeRecording, TogglePauseRecording, SetMicrophone, and SetCamera) and wires them to the existing Tauri command handlers in recording.rs and lib.rs. The changes are additive and follow established patterns already used by StartRecording and StopRecording.

Key changes:

  • Three new unit-variant recording-control actions (pause_recording, resume_recording, toggle_pause_recording) delegate to the corresponding crate::recording::* functions.
  • Two new parameterised device-switching actions (SetMicrophone, SetCamera) delegate to the private-but-descendant-accessible crate::set_mic_input and crate::set_camera_input Tauri commands.
  • Parsing tests are added for 3 of 5 new actions; ResumeRecording and TogglePauseRecording do not have equivalent tests yet.
  • SetCamera unconditionally passes skip_camera_window: Some(true), suppressing the camera preview popup on camera switch — behaviour that differs from StartRecording and is currently undocumented.

Confidence Score: 4/5

  • Safe to merge with minor follow-up work on test coverage and one undocumented behaviour.
  • The implementation is straightforward and mirrors existing deeplink patterns. Function signatures are correctly matched, serde naming aligns with the URL encoding in tests, and no breaking changes are introduced. The two gaps are: missing round-trip tests for ResumeRecording and TogglePauseRecording, and the silently-suppressed camera preview window for SetCamera deeplinks that could confuse future maintainers.
  • apps/desktop/src-tauri/src/deeplink_actions.rs — review the missing tests and the skip_camera_window: Some(true) decision.

Important Files Changed

Filename Overview
apps/desktop/src-tauri/src/deeplink_actions.rs Adds PauseRecording, ResumeRecording, TogglePauseRecording, SetMicrophone, and SetCamera deeplink actions and wires them to existing handlers; parsing tests cover only 3 of 5 new actions (missing ResumeRecording and TogglePauseRecording), and the decision to suppress the camera preview window (skip_camera_window: Some(true)) for the SetCamera deeplink is undocumented.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
URL["cap-desktop://action?value=..."] --> Parse["DeepLinkAction::try_from(url)"]
Parse --> Deserialise["serde_json::from_str(value)"]
Deserialise -->|pause_recording| PR["PauseRecording"]
Deserialise -->|resume_recording| RR["ResumeRecording"]
Deserialise -->|toggle_pause_recording| TPR["TogglePauseRecording"]
Deserialise -->|set_microphone| SM["SetMicrophone { mic_label }"]
Deserialise -->|set_camera| SC["SetCamera { camera }"]
PR --> pause["crate::recording::pause_recording()"]
RR --> resume["crate::recording::resume_recording()"]
TPR --> toggle["crate::recording::toggle_pause_recording()"]
SM --> setMic["crate::set_mic_input(state, mic_label)"]
SC --> setCam["crate::set_camera_input(app, state, camera, Some(true))"]
setCam -->|skip_camera_window=true| noPop["Camera preview window NOT shown"]
setCam -->|camera=None| disableCam["Camera input removed"]

Last reviewed commit: bf6f9aa

Greptile also left 2 inline comments on this PR.

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

Claim

Total prize pool $200.10
Total paid $0
Status Pending
Submitted March 05, 2026
Last updated March 05, 2026

Contributors

AB

Abu1982

@Abu1982

100%

Sponsors

CA

Cap

@CapSoftware

$200
AB

Abhishek Verma

@w3Abhishek

$0.10