fix: surface notification failure to renderer on macOS#185
Conversation
|
Thanks for digging into this — the diagnosis is sharp. You correctly spotted that the One blocking concern before this can land as a fix for #122: The
|
On macOS, Electron uses UNNotification which requires code-signing. Unsigned dev builds silently drop every notification and the user has no idea why — they toggle the setting on and nothing happens. Now the main process forwards the notification 'failed' event to the renderer via a new NotificationFailed IPC channel. The renderer logs a warning explaining that macOS dev builds need ad-hoc signing for notifications to work (codesign --force --deep -s - <app>). Closes johannesjo#122
…2+ scope - Remove taskIds from NotificationFailed payload (unused by renderer) - Add comment noting event is macOS-inert on Electron 40 - Update renderer comment: this activates after Electron 42 upgrade - Change PR scope: Refs johannesjo#122 (forward-looking groundwork, not full fix)
dee2281 to
4d63b5f
Compare
|
Thanks for the thorough review! I've pushed an update addressing all three points:
All 1420 tests pass, typecheck + lint clean. |
|
Thank you very much ! <3 |
Summary
Surface notification
failedevents to the renderer so the UI can inform the user when a notification did not deliver.On macOS, unsigned development builds silently drop notifications because
UNNotificationrequires code-signing. Thefailedevent currently fires only on Windows (Electron 40). Starting with Electron 42, it will fire on macOS too — this PR lays the groundwork by wiring the IPC channel now.Refs #122
Changes
IPC.NotificationFailedchannel + preload allowlist entryregister.ts, forward thefailedevent to the renderer viaNotificationFailed(includes error string + platform)desktopNotifications.ts, add a listener that logs a macOS-specificconsole.warnexplaining unsigned-build requirementsNotificationClickedandNotificationFailedlistener cleanupReviewer notes
taskIdsremoved from theNotificationFailedpayload — the renderer listener does not use themconsole.warnin the renderer is a DevTools-visible diagnostic. A proper toast/banner can follow when the settings-level alerts design lands