Skip to content

Open packages from unigetui://package links - #5611

Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
claude/unigetui-protocol-handler-ffc18f
Oct 27, 2026
Merged

Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
claude/unigetui-protocol-handler-ffc18f

Conversation

@mamoreau-devolutions

Copy link
Copy Markdown
Contributor

Summary

  • A unigetui://package?manager=…&source=…&id=… link now opens the package's details, from where the user can install it. Example: unigetui://package?manager=winget&source=winget&id=Git.Git&name=Git.
  • Only id is required. manager, source, version and name are optional. Other parameters are ignored, so links made by a newer version still open in an older one.
  • A link only names a package. It cannot carry installer addresses, arguments or other install options: those come from the recipient's own settings, and nothing is installed until they click Install. Links with no id, a repeated parameter, a control character, a value over 256 characters or a total over 2048 characters are refused.
  • Links go through StartupArgumentProcessor, the path bundle files already use. They open whether or not UniGetUI is already running, unlike the notification actions, which are dropped when the link starts the app.
  • The package is found with the new IpcPackageApi.FindCatalogPackage. It reuses the IPC API's exact-id search but skips loading the installed and updates lists, so it stays fast when the link starts the app. If the manager is unknown, disabled or unavailable, or the package isn't found, a notice says so and nothing opens.
  • Installs started from a link are reported with a new FROM_LINK install referral.
  • Copy link on the Discover and Installed context menus copies a link to the package. It is disabled for packages that only exist on this computer, such as WinGet "Local PC" entries.
  • docs/CLI.md documents package links. The new strings are added to lang_en.json.

Not in this PR

  • Slack, Teams and most email clients don't make unigetui:// links clickable. Sharing in chat needs an https page that redirects to the app, after which Copy link should copy that address.
  • Only the Windows installer registers the scheme. Portable installs, macOS and Linux don't.

Tests

  • Added PackageLinkTests (43 cases): parsing, encoding round-trips, refused links, building a link from a package, and making sure notification handling ignores package links while startup handling picks them up.
  • The full UniGetUI.Tests suite (946) and UniGetUI.Interface.Telemetry.Tests pass locally. The translation validation passes.
  • Checked by hand with a Debug build:
    • Started with the Git link while UniGetUI wasn't running: Git's details opened.
    • Launched a second copy with a VS Code link while the first was open: it handed the link to the running app, which opened VS Code's details.
  • Not checked: the NativeAOT publish, the error notices, Copy link, and installing from the details window.

🤖 Generated with Claude Code

A unigetui://package?manager=...&source=...&id=... link opens the package's
details in UniGetUI, from where the user can install it. The link names the
package and nothing else: install options always come from the recipient's
own settings, and nothing is installed until they click Install.

- PackageLink parses and builds the links, refusing ones with no id, a
  repeated parameter, a control character or an oversized value.
- Links go through StartupArgumentProcessor, the path bundle files use, so
  they open whether or not UniGetUI is already running.
- The package is found with IpcPackageApi.FindCatalogPackage, the exact-id
  search the IPC API already used.
- Installs started from a link are reported with the new FROM_LINK referral.
- Discover and Installed get a "Copy link" menu item.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@GabrielDuf
Gabriel Dufresne (GabrielDuf) merged commit 1d9fea3 into main Oct 27, 2026
6 checks passed
@GabrielDuf
Gabriel Dufresne (GabrielDuf) deleted the claude/unigetui-protocol-handler-ffc18f branch October 27, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants