feat: add staged: URL scheme for deep linking into New Project UI#402
Open
feat: add staged: URL scheme for deep linking into New Project UI#402
Conversation
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
071846e to
b5a3e65
Compare
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.
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
tauri-plugin-deep-linkto register thestaged:URL scheme on macOS. The plugin emits adeep-link-openevent to the frontend both when the app is already running and when it is cold-launched via a URL.convertDeepLinkToHttpsutility convertsstaged://github.com/…URLs back tohttps://GitHub URLs.App.sveltelistens for thedeep-link-openevent and dispatches astaged:new-project-with-urlcustom DOM event.ProjectsList,NewProjectModal,SplashScreen, andNewProjectFormaccept aninitialUrlprop that, when present, opens the modal and prefills the repo via the existingparseGitHubUrlhelper.Info.plist,tauri.conf.json, andcapabilities/default.jsonupdated to declare the scheme and grant the deep-link permission.