feat(desktop): register codeg:// URL scheme to open a conversation - #725
Open
changexbc wants to merge 1 commit into
Open
feat(desktop): register codeg:// URL scheme to open a conversation#725changexbc wants to merge 1 commit into
changexbc wants to merge 1 commit into
Conversation
The desktop app did not register a system URL scheme, so external tools could launch Codeg but not jump to a specific session. Register `codeg://`, resolve `codeg://session/<id>` against the live conversation table (numeric PK or the agent's external_id), and reuse the existing focus-conversation event for a warm start. A cold start bakes the lookup into the main window query string so DeepLinkBootstrap opens the tab after hydration.
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.
Why
The desktop app never registered a system URL scheme (
CFBundleURLTypes/ protocol handler). External tools can launch Codeg (open -b app.codeg) but cannot jump to a specific conversation tab.In-app markdown already uses
codeg://session/<id>as a mention badge. This PR makes that form a real OS deep link.What
codegcustom scheme viatauri-plugin-deep-link(macOS / Windows / Linux).codeg://session/<id>— Codeg numeric PK or the agent'sexternal_id(Grok UUID, Codex thread id, …)codeg://workspace?conversationId=<id>— same lookup;folderId/agentoptionalcodeg://open— just show the workspacecodeg://agent/…,codeg://commit/…,codeg://embedded/…).workspace://focus-conversation(same path as the pet panel)./workspace?folderId=&conversationId=&agent=so the existingDeepLinkBootstrapopens the tab after hydration (an event emitted before the webview subscribes would be dropped).Docs:
docs/url-scheme.md.Examples
Tests
src-tauri/src/deep_link.rs(numeric id, external id, path traversal, workspace query mismatch).cargo test --features test-utils --lib deep_linkcargo clippy --lib --features test-utils -- -D warningsNot available in
codeg-server/ browser-only mode — that path already has the/workspace?…query string.