Actual
Nothing appears. The sound plays, so it looks like the browser or OS is blocking notifications when it isn't.
Cause (from reading the source)
NotificationsSettings.tsx:84 calls showNotification(), and web/src/lib/notify/notify.ts:96 returns early when document.visibilityState === "visible" && document.hasFocus(). That guard is right for new mail, but when you press the button, the tab is always visible and focused, so the test can never show.
Suggested fix
Give showNotification() a force option (or have the Test button call the service worker's showNotification directly) so the test skips the focus check.
Environment
ihasmail 2026.10.5+g20c32ed (same code on main 2649c00), Docker, Stalwart 0.16.23, macOS desktop browser. It's client-only, so it should reproduce against the mock.
**Steps to reproduce**
1. Settings > Notifications, allow notifications (permission "granted").
2. Press "Test notification".
**Expected**
A sample new-mail notification appears.
**Actual**
Nothing appears. The sound plays, so it looks like the browser or OS is blocking notifications when it isn't.
**Cause (from reading the source)**
NotificationsSettings.tsx:84 calls showNotification(), and web/src/lib/notify/notify.ts:96 returns early when document.visibilityState === "visible" && document.hasFocus(). That guard is right for new mail, but when you press the button, the tab is always visible and focused, so the test can never show.
**Suggested fix**
Give showNotification() a force option (or have the Test button call the service worker's showNotification directly) so the test skips the focus check.
**Environment**
ihasmail 2026.10.5+g20c32ed (same code on main 2649c00), Docker, Stalwart 0.16.23, macOS desktop browser. It's client-only, so it should reproduce against the mock.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Steps to reproduce
Expected
A sample new-mail notification appears.
Actual
Nothing appears. The sound plays, so it looks like the browser or OS is blocking notifications when it isn't.
Cause (from reading the source)
NotificationsSettings.tsx:84 calls showNotification(), and web/src/lib/notify/notify.ts:96 returns early when document.visibilityState === "visible" && document.hasFocus(). That guard is right for new mail, but when you press the button, the tab is always visible and focused, so the test can never show.
Suggested fix
Give showNotification() a force option (or have the Test button call the service worker's showNotification directly) so the test skips the focus check.
Environment
ihasmail 2026.10.5+g20c32ed (same code on main
2649c00), Docker, Stalwart 0.16.23, macOS desktop browser. It's client-only, so it should reproduce against the mock.Fixed in #51, thanks @dwofford. The test button shows a real notification now, and it'll be in Monday's release.
Live on ihasmail.com now, and in Monday's release for self-hosted.