Skip to content

Fix iOS sync deeplinks opening in wrong project window - #350

Closed
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-detection-c3a1
Closed

Fix iOS sync deeplinks opening in wrong project window#350
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-detection-c3a1

Conversation

@cursor

@cursorcursorBot commented May 23, 2026

Copy link
Copy Markdown
Contributor

Bug and impact

When iOS sends an ade:// link via the deeplinks.open sync command ("Send to your Mac"), desktop routed navigation through the global focused-window dispatcher. With multiple projects open, the deeplink could land in the wrong window—lane/PR/branch targets from project B would be applied in project A's renderer, causing broken navigation and user confusion.

Root cause

dispatchDeeplinkUrl in the per-project sync service called handleDeeplinkUrl(..., dispatchOrQueueAppNavigationRequest), which uses BrowserWindow.getFocusedWindow() instead of the sync host's projectRoot. A project-scoped navigation path already existed on appNavigationService.navigate but was not used for iOS sync.

Fix

  • Extract shared deliverAppNavigationToProject / dispatchAppNavigationForProjectRoot helpers (same window lookup as RPC appNavigationService).
  • Route iOS sync:ios deeplinks through project-scoped dispatch; fall back to global dispatch only if helpers are not yet initialized.
  • Refactor appNavigationService.navigate to use the shared helper.
  • Add regression tests for the sync dispatch contract.

Validation

  • npm --prefix apps/desktop run test -- --run src/main/services/deeplinks/projectNavigationDispatch.test.ts (2 passed)

Related open PRs (not duplicated)

Open in WebView Automation

When iOS sends ade:// links via sync deeplinks.open, the handler used the
global focused-window dispatcher. With multiple projects open, navigation
landed in the wrong window (missing lane/PR targets).
Route sync deeplinks through project-scoped window lookup (same path as
appNavigationService.navigate) and add a regression test for the dispatch
contract.
Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
@vercel

vercelBot commented May 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
adeIgnoredIgnoredPreviewMay 23, 2026 7:11pm

Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
@arul28

Copy link
Copy Markdown
Owner

Consolidated into #356.

@arul28arul28 closed this May 25, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@arul28@cursoragent