fix(desktop): improve deeplink action routing and control surface#1806
Open
JYZ-LESLIE wants to merge 2 commits into
Open
fix(desktop): improve deeplink action routing and control surface#1806JYZ-LESLIE wants to merge 2 commits into
JYZ-LESLIE wants to merge 2 commits into
Conversation
Author
|
Addressed the blocking thread by moving onto and updating call sites to await it (commit cf68ea5). Marked the review thread resolved; ready for maintainer re-review. |
Author
|
Implemented the blocking-thread fix in commit cf68ea5: capture target lookup now runs in a blocking task and both call sites await it. The corresponding review thread has been resolved and this PR is ready for maintainer re-review. |
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 #1540
This is a focused desktop-side quality pass for the deeplink/Raycast control surface.
What changed
cap-desktop://action?...parsing by using the deeplink host (host_str) so action links are no longer rejectedpause_recordingresume_recordingtoggle_pause_recordingrestart_recordingtake_screenshotset_microphone(withswitch_microphonealias)set_camera(withswitch_cameraalias)refresh_raycast_device_cacheraycast-device-cache.jsonraycast-last-screenshot.jsonspawn_blockingand writing files with async FS APIscap-desktop://signin)Notes
SetCamerausesskip_camera_window=trueso deeplink-triggered device changes do not force camera preview UI popups.Validation
cargo fmt/cargo testin this environment because Rust (cargo) is unavailable on the runner.deeplink_actions.rsfor the changed payload surface.Demo
Greptile Summary
This PR fixes the long-standing
url.domain()→url.host_str()bug that caused allcap-desktop://action?...deeplinks to be rejected, and wires up eight new recording-control actions (pause_recording,resume_recording,toggle_pause_recording,restart_recording,take_screenshot,set_microphone/switch_microphone,set_camera/switch_camera,refresh_raycast_device_cache) to their existing Rust backend handlers.host_str()is the right method for custom-scheme URLs and theNotActionguard now correctly passes through non-action links likecap-desktop://signin.refresh_raycast_device_cacheproperly offloads blocking device-enumeration calls intospawn_blocking, and writes the cache/screenshot-result artifacts viatokio::fs; parser unit tests cover all new variants including serde aliases and nullable payloads.capture_target_from_mode(shared byStartRecordingand the newTakeScreenshotpath) still callslist_displays()/list_windows()directly on the async runtime thread, inconsistent with thespawn_blockingdiscipline applied elsewhere in this PR.Confidence Score: 4/5
Safe to merge; the URL-parsing fix and new action wiring are correct. The one issue (blocking OS calls in TakeScreenshot) mirrors a pre-existing pattern in StartRecording and will not cause data loss or crashes — it may only cause minor runtime latency on systems with many open windows.
The URL-parsing regression fix is well-scoped and correct. New actions delegate to existing, tested backend functions. The spawn_blocking discipline is applied in refresh_raycast_device_cache but not carried through to capture_target_from_mode, which is used by the new TakeScreenshot path — a quality inconsistency rather than a correctness problem.
apps/desktop/src-tauri/src/deeplink_actions.rs — specifically the TakeScreenshot arm and capture_target_from_mode
Important Files Changed
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix(desktop): improve deeplink action ro..." | Re-trigger Greptile