Skip to content

feat(identity): 1.2: AppIdentity.Claim, an app id and the Start menu shortcut that names it - #2

Merged
sebgod merged 1 commit into
mainfrom
feat/app-identity
Oct 13, 2026
Merged

sebgod merged 1 commit into
mainfrom
feat/app-identity

Conversation

@sebgod

@sebgod sebgod commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

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:

  • written when missing, pointing at the running executable;
  • repointed when its target is gone (the app was moved);
  • kept while its target is there, even when another copy runs (a development build does not take over the installed app's);
  • left alone when a shortcut of that name does not carry the id (someone else's).

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

…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
@sebgod
sebgod merged commit 225be0a into main Oct 13, 2026
2 checks passed
@sebgod
sebgod deleted the feat/app-identity branch October 13, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant