fix(notifications): in-app toasts no longer need browser notification permission (#324) #395

Merged
jared merged 1 commits from fix/inapp-toast-permission into lotus 2026-10-18 03:06:13 -04:00
Owner

Fixes #324.

notify() shows an in-app toast while the window is focused, and falls back to an OS notification only when it isn't. But both message and invite notifications called it only when Notification.permission === 'granted'. Anyone who declined the browser prompt, or was never asked (most web users), heard the ping and saw nothing on screen.

Change: both call sites now notify when showNotifications is on and either the window is focused (in-app toast, no permission needed) or the permission is granted (OS notification).

Verified (Chromium, page focused in another room, Notification.permission = denied; Bob sends a DM):

  • Before: no toast.
  • After: the toast shows the message.

tsc clean · ESLint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fixes #324. `notify()` shows an **in-app toast** while the window is focused, and falls back to an OS notification only when it isn't. But both message and invite notifications called it only when `Notification.permission === 'granted'`. Anyone who declined the browser prompt, or was never asked (most web users), heard the ping and saw nothing on screen. **Change:** both call sites now notify when `showNotifications` is on **and** either the window is focused (in-app toast, no permission needed) or the permission is granted (OS notification). **Verified** (Chromium, page focused in another room, `Notification.permission = denied`; Bob sends a DM): - **Before:** no toast. - **After:** the toast shows the message. `tsc` clean · ESLint clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-17 20:41:53 -04:00
fix(notifications): in-app toasts no longer need browser notification permission (#324)
CI / Build & Quality Checks (pull_request) Successful in 3m2s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 11s
CI / Playwright smoke (e2e) (pull_request) Successful in 18m38s
3bf040f17a
notify() shows an in-page toast while the window is focused and only
falls back to an OS notification otherwise, but both message and invite
notifications were gated on Notification.permission === granted. Anyone
who declined (or was never asked) heard the ping with nothing on screen.
Gate only the OS path on the permission.

Fixes #324

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared merged commit ed24d7f78e into lotus 2026-10-18 03:06:13 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#395