fix(desktop): set AppUserModelID on Windows so notifications fire (#50808)

Windows toast notifications silently no-op unless the app sets an
AppUserModelID — new Notification().show() returns without error and
nothing appears. The desktop's native-notification system (approval,
turn-done, input, etc.) was therefore dead on Windows while working on
macOS/Linux.

Set the AUMID to the build appId (com.nousresearch.hermes) on Windows
right after app.setName, so toasts route to the installed Start Menu
shortcut. No-op on macOS/Linux, which don't require it.
This commit is contained in:
Teknium 2026-06-22 06:31:39 -07:00 committed by GitHub
parent ff85af3fc7
commit 17dfc6bec4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -620,6 +620,16 @@ function previewFileMetadata(filePath, mimeType) {
}
app.setName(APP_NAME)
// Windows toast notifications silently no-op unless an AppUserModelID is set:
// `new Notification().show()` returns without error and nothing appears. The
// AUMID must match the installed Start Menu shortcut's AUMID, which
// electron-builder derives from the build `appId` (com.nousresearch.hermes) —
// keep this string in sync with package.json `build.appId`. macOS/Linux don't
// need this, so gate it on Windows. (Fixes: desktop approval/turn notifications
// never firing on Windows.)
if (IS_WINDOWS) {
app.setAppUserModelId('com.nousresearch.hermes')
}
// Seed the native About panel with the live Hermes version. This is refreshed
// on every open via the explicit "About" menu handler (refreshAboutPanel), so
// an in-place `hermes update` mid-session is reflected without an app restart;