On macOS, calling navigator.setAppBadge(5) inside an installed PWA
resolves its promise, but no number badge appears on the app's Dock icon.
Notifications and "Badge app icon" are enabled for the app in System Settings;
native apps badge correctly on the same machine.


display + UNUserNotificationCenter.Both are real screen captures of the installed PWA's own Dock tile (cropped to
just that icon) from a locally built Chromium with the fix and
AppShimNotificationAttribution enabled. The badge is macOS's own rendering; with
notifications granted, setAppBadge(5) now shows it where before it stayed blank.
This sampler is itself an installable PWA. Install it (address-bar install icon,
or ⋮ menu → Cast, Save, and Share → Install page as app…), open the installed
app, then trigger the API. On an affected macOS build the promise resolves with no Dock badge;
with the fix a 5 appears.
1. Install a PWA (repro'd with Google Chat, Google Meet)
2. Open DevTools console inside the installed app
3. Run: navigator.setAppBadge(5)
A "5" badge appears on the app's Dock icon.
Promise resolves (fulfilled, undefined); no badge on the Dock.
With AppShimNotificationAttribution, the PWA bundle id registers with macOS
usernoted, which then gates NSDockTile.badgeLabel on badge authorization.
The app shim set the label but never called [NSApp.dockTile display],
UNUserNotificationCenter setBadgeCount:, or re-synced notification settings, so the
label was silently suppressed. AppShimManager::UpdateAppBadge also dropped badge updates
when the shim was not already running.
AppShimController::SetBadgeLabel now calls [NSApp.dockTile display] and
forwards the count to UNUserNotificationCenter; MacNotificationServiceUN
adds SetBadgeCount() plus a 10s timeout on permission sync; and
AppShimManager::UpdateAppBadge launches the shim in the background, re-applies the
badge when permission is granted, and surfaces the blocked-by-system indicator when denied.