Skip to content

feat: add staged: URL scheme for deep linking into New Project UI#402

Open
matt2e wants to merge 1 commit intomainfrom
add-staged-url-scheme
Open

feat: add staged: URL scheme for deep linking into New Project UI#402
matt2e wants to merge 1 commit intomainfrom
add-staged-url-scheme

Conversation

@matt2e
Copy link
Contributor

@matt2e matt2e commented Mar 17, 2026

Adds support for a staged: custom URL scheme so users can open Staged from a browser link (e.g. staged://github.com/owner/repo/pull/123) and have the New Project form automatically prefilled.

Changes

  • Backend (Tauri): Integrate tauri-plugin-deep-link to register the staged: URL scheme on macOS. The plugin emits a deep-link-open event to the frontend both when the app is already running and when it is cold-launched via a URL.
  • Frontend (Svelte):
    • New convertDeepLinkToHttps utility converts staged://github.com/… URLs back to https:// GitHub URLs.
    • App.svelte listens for the deep-link-open event and dispatches a staged:new-project-with-url custom DOM event.
    • ProjectsList, NewProjectModal, SplashScreen, and NewProjectForm accept an initialUrl prop that, when present, opens the modal and prefills the repo via the existing parseGitHubUrl helper.
  • Configuration: Info.plist, tauri.conf.json, and capabilities/default.json updated to declare the scheme and grant the deep-link permission.

@matt2e matt2e requested review from baxen and wesbillman as code owners March 17, 2026 06:08
Register a custom `staged:` URL scheme so that navigating to e.g.
`staged://github.com/owner/repo/pull/123` in a browser opens Staged
and prefills the New Project form with the parsed GitHub URL.

Backend:
- Add tauri-plugin-deep-link dependency and register the plugin
- Configure the `staged` scheme in tauri.conf.json and Info.plist
- Add deep-link:default capability permission
- Forward incoming URLs to the frontend via a `deep-link-open` event,
  handling both app-already-running and cold-launch cases

Frontend:
- Add deepLink.ts utility to convert `staged:` URLs to `https:` URLs
- App.svelte listens for `deep-link-open` and dispatches a
  `staged:new-project-with-url` window event with the converted URL
- ProjectsList, NewProjectModal, SplashScreen, and NewProjectForm all
  accept an optional `initialUrl` prop that gets parsed via the
  existing `parseGitHubUrl` helper to prefill repo/PR/branch fields
@matt2e matt2e force-pushed the add-staged-url-scheme branch from 071846e to b5a3e65 Compare March 17, 2026 22:54
Sign up for free to 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.

1 participant