Deep Links

Register the app protocol and route external intents safely.

The default protocol is soar-tauri://. PROTOCOL_SCHEME in shared/constants.ts and plugins.deep-link.desktop.schemes in tauri.conf.json must agree; pnpm rebrand --scheme <name> updates both.

From URL to route

tauri-plugin-deep-link supplies cold-start URLs through getCurrent() and runtime URLs through onOpenUrl(). tauri-plugin-single-instance is registered first in Rust: a second launch focuses the existing window and emits its argv. src/lib/intents/ then parses soar-tauri://… and --route=/settings, validates the path against NAVIGATION_ROUTES, and dispatches it once the router is ready. Unknown paths are silently dropped. Menus and tray use the same list, preventing those navigation sources from drifting.

Two real consumers are Supabase auth redirects and the Creem checkout bounce: soar-tauri://billing?status=success&orderId=… opens Billing, which rereads the server-backed entitlement.

Development and testing

Debug desktop builds call deep_link().register_all() during startup. macOS and Linux can therefore target the dev app directly; Windows normally resolves a scheme through an installed NSIS build. On Windows, run an installed build once to register the handler, then start the dev app before testing.

open 'soar-tauri://settings'
start soar-tauri://settings
xdg-open 'soar-tauri://settings'

Verify a known path focuses/navigates the running app, then confirm an unknown path does nothing. Test packaged builds on every target OS before release.

On this page