Skip to content

Navigation Menu

Sign in
Sign up

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

Open
matt2e wants to merge 1 commit into
main from
add-staged-url-scheme
Open

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

Conversation

@matt2e

@matt2e matt2e commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

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.

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 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

Reviewers

@baxen baxen Awaiting requested review from baxen baxen is a code owner
@wesbillman wesbillman Awaiting requested review from wesbillman wesbillman is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /