Skip to content

fix(icons): use the AUMID icon for non-Store apps again - #1251

Open
n-crespo wants to merge 1 commit into
amnweb:mainfrom
n-crespo:fix/pwa-window-icon
Open

n-crespo wants to merge 1 commit into
amnweb:mainfrom
n-crespo:fix/pwa-window-icon

Conversation

@n-crespo

Copy link
Copy Markdown

Fixes #461

Problem

PWAs installed from Chrome (not Edge) show the browser's icon in the taskbar/glazewm workspace widgets if they're opened while yasb is running. After reloading yasb they show the right icon.

Cause

From what I can tell, a PWA window gets its own AUMID as soon as it opens, but its window icon only gets set about a second later. I polled a new window and saw the AUMID at ~0.2s and the icon at ~1–1.5s.

If yasb looks at the window during that gap, _window_icon falls back to _app_icon. Since #1169 that only tries the AUMID for Store app IDs (with !), so a PWA gets the browser exe's icon, and that stays cached. Before #1169 the fallback tried any AUMID through shell:AppsFolder, which I think is why this used to work.

Fix

Let _app_icon try any AUMID again. An ID that shell:AppsFolder doesn't list returns None, so apps without a listed AUMID still fall back to their exe icon like before.

I might be missing a reason it was limited to Store apps. If so, I'm happy to change the approach.

Testing

  • Opened Chrome PWAs with yasb running; the taskbar and glazewm workspaces widgets show the app icon right away.
  • Store apps (Calculator, Notepad, Terminal) still show the same icons.
  • Full test suite (2139 passed), ruff and pyright pass.

Browser web apps (PWAs) get their own AUMID as soon as their window
opens, but set their window icon about a second later. The icon
fallback only used the AUMID for Store apps, so PWAs got the browser
exe's icon, which then stayed cached. Any AUMID is tried again, as
before amnweb#1169. An ID shell:AppsFolder doesn't list still falls back to
the exe.

Refs amnweb#461

Assisted-by: Claude Code <noreply@anthropic.com>
n-crespo added a commit to n-crespo/yasb that referenced this pull request Nov 22, 2026
n-crespo added a commit to n-crespo/yasb that referenced this pull request Nov 23, 2026
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.

Web App icon in taskbar is only set after restart YASB

1 participant