fix(notifications): quiet hours start and end while the app stays open (#325) #372

Merged
jared merged 1 commits from fix/quiet-hours-tick into lotus 2026-10-17 17:51:40 -04:00
Owner

Fixes #325.

useNotificationsQuiet evaluated the quiet-hours window, and the "Pause notifications" expiry, only at render time. The long-lived message and invite notifiers rarely re-render. So someone leaving Lotus open overnight with quiet hours 22:00–07:00 got every sound all night, and a 30-minute pause could outlast itself.

Change: the hook re-evaluates every 30 s, the same approach as the night-light overlay.

Verified headless (notifications granted, window unfocused), with quiet hours set to start about 75 s after the app opened:

  • A DM before the window notified.
  • A DM inside the window, with the app left alone: before the fix it still notified; now it's silent.

tsc clean · unit tests pass · ESLint/Prettier clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fixes #325. `useNotificationsQuiet` evaluated the quiet-hours window, and the "Pause notifications" expiry, **only at render time**. The long-lived message and invite notifiers rarely re-render. So someone leaving Lotus open overnight with quiet hours 22:00–07:00 got every sound all night, and a 30-minute pause could outlast itself. **Change:** the hook re-evaluates every 30 s, the same approach as the night-light overlay. **Verified** headless (notifications granted, window unfocused), with quiet hours set to start about 75 s after the app opened: - A DM **before** the window notified. - A DM **inside** the window, with the app left alone: before the fix it still notified; now it's silent. `tsc` clean · unit tests pass · ESLint/Prettier clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-16 22:19:27 -04:00
fix(notifications): quiet hours start and end while the app stays open (#325)
CI / Build & Quality Checks (pull_request) Successful in 4m7s
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 13m45s
c6419044cb
useNotificationsQuiet evaluated the quiet-hours window (and the
"Pause notifications" expiry) only at render time, and the long-lived
message/invite notifiers rarely re-render, so someone leaving Lotus open
overnight with quiet hours 22:00–07:00 got every sound all night (and a
30-minute pause could outlast itself). The hook now re-evaluates every
30 s.

Verified headless (notifications granted, window unfocused): quiet
hours set to start ~75 s after the app opened; a DM before the window
notified; one inside the window, with the app left alone: before it
still notified, now it's silent.

Fixes #325

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared merged commit 1784d40ba1 into lotus 2026-10-17 17:51:40 -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#372