Fixes #1540

Changes

Added PauseRecording, ResumeRecording, SwitchMicrophone, and SwitchCamera to DeepLinkAction. These implementations hook into the existing recording state and device management functions.

Verification

Due to local build environment constraints (Windows/FFmpeg), I could not record a live demo video. However:

Static Analysis Verified that deeplink_actions.rs correctly hooks into crate::recording.

Edge Cases Validated that Pause/Resume now use the official commands to emit Paused/Resumed events.

Safety Added existence checks for microphones and cameras to prevent crashes or errors on invalid IDs.

How to Test

Trigger cap://action?value={"pause_recording":{}} → The app should pause and emit a Paused event.

Trigger cap://action?value={"resume_recording":{}} → The app should resume and emit a Resumed event.

Demo Video Note: I am developing on a Windows machine where the build environment for this project is difficult to set up fully (FFmpeg/Rust/Tauri dependencies). Therefore, I cannot generate a runtime video recording.

However, I have verified the changes via:

Static Analysis: Ensuring correct hookups to crate::recording. Validating Fixes: I implemented the reviewer’s feedback to use pause_recording() commands (ensuring event emission) and added defensive checks for device IDs. The code compiles and passes the CI checks. I am happy to address any further code review feedback!

/claim #1540

Greptile Summary

This PR extends deeplink support by adding four new actions: PauseRecording, ResumeRecording, SwitchMicrophone, and SwitchCamera. These implementations properly integrate with existing recording state management and device handling functions, enabling Raycast extension support and other external tools to control the app through deeplinks.

  • Added PauseRecording and ResumeRecording actions that delegate to existing Tauri commands which emit proper state-change events
  • Added SwitchMicrophone action with validation to ensure the microphone exists before attempting to switch
  • Added SwitchCamera action with comprehensive validation supporting both DeviceID and ModelID types
  • Proper error handling and defensive checks prevent crashes from invalid device IDs
  • Code follows existing patterns in the deeplink handler for consistency

Confidence Score: 5/5

  • This PR is safe to merge with high confidence - all implementations correctly delegate to existing, tested functions and include appropriate validation
  • The changes are straightforward additions that reuse existing, well-tested functionality from the recording and device management modules. The pause/resume actions correctly call the established Tauri commands that emit required state-change events (addressing the previous review comment). Device switching includes proper existence checks to prevent crashes. The code follows existing patterns and conventions in the deeplink handler. No new external dependencies or complex logic was introduced. The implementation handles edge cases appropriately by validating device IDs before use and allowing null device parameters for disabling devices.
  • No files require special attention

Important Files Changed

Filename Overview
apps/desktop/src-tauri/src/deeplink_actions.rs Added four new deeplink actions (PauseRecording, ResumeRecording, SwitchMicrophone, SwitchCamera) that integrate with existing recording and device management functions. Implementation includes proper error handling with existence checks for devices and correctly delegates to established Tauri commands that emit required events.

Sequence Diagram

sequenceDiagram
participant External as External App
participant DeepLink as DeepLink Handler
participant RecordingCmd as Recording Commands
participant DeviceCmd as Device Commands
participant State as App State
External->>DeepLink: cap://action?value={...}
DeepLink->>DeepLink: Parse & validate URL
rect rgb(200, 220, 255)
note over DeepLink,RecordingCmd: Pause/Resume Actions
DeepLink->>RecordingCmd: pause_recording()
RecordingCmd->>State: Pause recording & emit Paused event
end
rect rgb(200, 255, 220)
note over DeepLink,DeviceCmd: Device Switch Actions
DeepLink->>DeviceCmd: Validate device exists
DeepLink->>DeviceCmd: set_mic_input() or set_camera_input()
DeviceCmd->>State: Update device & emit event if restored
end

Claim

Total prize pool $200
Total paid $0
Status Pending
Submitted January 24, 2026
Last updated January 24, 2026

Contributors

HC

HCRSolutions

@Sadik111

100%

Sponsors

CA

Cap

@CapSoftware

$200