Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions apps/desktop/src-tauri/src/deeplink_actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,18 @@ pub enum DeepLinkAction {
},
OpenSettings {
page: Option<String>,

},


PauseRecording,
ResumeRecording,
SwitchCamera,
SwitchMicrophone,
CaptureScreenshot}
}
Comment on lines +38 to 43
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Enum body is syntactically broken

The CaptureScreenshot variant is immediately followed by } with no separator or comma, causing the closing brace to close the enum body on line 42. A second orphaned } then appears on line 43, which is a hard syntax error. The compiler will reject the file before any logic runs.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src-tauri/src/deeplink_actions.rs
Line: 38-43

Comment:
**Enum body is syntactically broken**

The `CaptureScreenshot` variant is immediately followed by `}` with no separator or comma, causing the closing brace to close the enum body on line 42. A second orphaned `}` then appears on line 43, which is a hard syntax error. The compiler will reject the file before any logic runs.

How can I resolve this? If you propose a fix, please make it concise.



pub fn handle(app_handle: &AppHandle, urls: Vec<Url>) {
trace!("Handling deep actions for: {:?}", &urls);

Expand All @@ -49,6 +58,7 @@ pub fn handle(app_handle: &AppHandle, urls: Vec<Url>) {
ActionParseFromUrlError::Invalid => {
eprintln!("Invalid deep link format \"{}\"", &url)
}

// Likely login action, not handled here.
ActionParseFromUrlError::NotAction => {}
})
Expand Down Expand Up @@ -149,10 +159,28 @@ impl DeepLinkAction {
}
DeepLinkAction::OpenEditor { project_path } => {
crate::open_project_from_path(Path::new(&project_path), app.clone())
DeepLinkAction::PauseRecording => {
crate::recording::pause_recording(app.clone(), app.state()).await.map(|_| ())
}
DeepLinkAction::ResumeRecording => {
crate::recording::resume_recording(app.clone(), app.state()).await.map(|_| ())
}
DeepLinkAction::SwitchCamera => {
Ok(())
}
DeepLinkAction::SwitchMicrophone => {
Ok(())
}
DeepLinkAction::CaptureScreenshot => {
Ok(())
Comment on lines +168 to +175
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Silent no-ops for advertised deeplink actions

SwitchCamera, SwitchMicrophone, and CaptureScreenshot all return Ok(()) immediately with no side effects. A caller sending cap://action?value={"switch_camera":...} will receive a success response while nothing happens, making these deeplinks silently misleading. If they are intentional stubs, that should be acknowledged in the PR or tracked as follow-up work, since the bounty description lists them as actions to implement.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src-tauri/src/deeplink_actions.rs
Line: 168-175

Comment:
**Silent no-ops for advertised deeplink actions**

`SwitchCamera`, `SwitchMicrophone`, and `CaptureScreenshot` all return `Ok(())` immediately with no side effects. A caller sending `cap://action?value={"switch_camera":...}` will receive a success response while nothing happens, making these deeplinks silently misleading. If they are intentional stubs, that should be acknowledged in the PR or tracked as follow-up work, since the bounty description lists them as actions to implement.

How can I resolve this? If you propose a fix, please make it concise.


DeepLinkAction::OpenSettings { page } => {
crate::show_window(app.clone(), ShowCapWindow::Settings { page }).await
}
}

}
DeepLinkAction::OpenSettings { page } => {
crate::show_window(app.clone(), ShowCapWindow::Settings { page }).await
}

}
}
Comment on lines 160 to 185
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 execute match expression is structurally invalid

The OpenEditor arm's block is opened at line 160–161 but is never closed before the PauseRecording arm starts at line 162. The new arms are pasted inside the OpenEditor block rather than after it. Additionally, the CaptureScreenshot arm block (line 174) is never closed, and the OpenSettings arm (line 177) is placed inside it. The original OpenSettings arm has also been deleted from its correct position. This entire section will not compile.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src-tauri/src/deeplink_actions.rs
Line: 160-185

Comment:
**`execute` match expression is structurally invalid**

The `OpenEditor` arm's block is opened at line 160–161 but is never closed before the `PauseRecording` arm starts at line 162. The new arms are pasted _inside_ the `OpenEditor` block rather than after it. Additionally, the `CaptureScreenshot` arm block (line 174) is never closed, and the `OpenSettings` arm (line 177) is placed inside it. The original `OpenSettings` arm has also been deleted from its correct position. This entire section will not compile.

How can I resolve this? If you propose a fix, please make it concise.

}
3 changes: 3 additions & 0 deletions apps/raycast/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Raycast Extension

This directory contains a Raycast extension for Cap. It is a placeholder for future commands such as start/stop/pause/resume recording, switch camera or microphone, and capture screenshots. Implementation will be provided later.