Repository navigation
feat(identity): 1.2: AppIdentity.Claim, an app id and the Start menu shortcut that names it - #2
Merged
Merged
Conversation
…shortcut that names it An unpackaged app is known to the Windows shell by its executable's file name, which it cannot turn into an app: the media flyout says "Unknown app". Claim sets the process's app id and makes sure a Start menu shortcut carries it, where the shell finds the name and the icon. Written when missing, repointed when its target is gone, kept while its target is there, and never taken from a shortcut that does not carry the id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FkhFc6pKjAdGDmiG4zaKWM
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.
An unpackaged Windows app is known to the shell by its executable's file name, which the shell cannot turn into an app: Windows' media flyout calls its media session "Unknown app" (YtPlayer's did).
AppIdentity.Claim(appId, displayName)gives the process the app id (AppUserModelID) and makes sure a Start menu shortcut of that name carries it, which is where the shell finds the name and the icon (Chrome is "Google Chrome" the same way). The shortcut is:The outcome comes back as
StartMenuShortcut; nothing throws for a shell that refuses. The shell's link object is called by vtable slot (IShellLinkW, IPropertyStore, IPersistFile), so there is no COM wrapper dependency. No-op off Windows.Tests: the policy as a pure function (everywhere), and round trips through real shortcuts in a temp folder (Windows). Checked live: a session published under the id showed in the media flyout as "YtPlayer", with the exe's icon, once the shortcut existed.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FkhFc6pKjAdGDmiG4zaKWM