Skip to content

refactor(notifications): read alert settings with useEffectEvent - #3595

Merged
setchy merged 1 commit into
mainfrom
feat/use-effect-event-notification-host
Nov 1, 2026
Merged

setchy merged 1 commit into
mainfrom
feat/use-effect-event-notification-host

Conversation

@setchy

@setchy setchy commented Nov 1, 2026

Copy link
Copy Markdown
Member

Summary

Moves the sound and native-notification emission in useNotificationEffects into a React 19 useEffectEvent.

  • The notification diff effect no longer depends on playSound, showNotifications, or notificationVolume.
  • Changing those settings no longer re-runs the diff/filter pass over the notification list.
  • The next alert still reads the latest settings at alert time, so there is no stale-closure trade-off.
  • No user-visible behavior change; alerts fire at the same time with the same rules.

Verification

  • pnpm check
  • pnpm test — 2094 passed (includes a test that changes volume/show-notifications, refetches, and asserts the next alert uses the new values)
  • pnpm build

Context

This extracts the useEffectEvent portion of the closed 03-adopt-react-19-3-navigation work. It is independent of the data-router migration in #3593.

Move sound and native alert emission into an Effect Event so the notification diff only re-runs when notifications change, while the next alert still reads the latest volume and visibility settings.
@setchy
setchy requested a review from afonsojramos as a code owner November 1, 2026 20:42
@github-actions github-actions Bot added the refactor Refactoring of existing feature label Nov 1, 2026
@sonarqubecloud

sonarqubecloud Bot commented Nov 1, 2026

Copy link
Copy Markdown

@setchy
setchy merged commit 365dfbd into main Nov 1, 2026
19 checks passed
@setchy
setchy deleted the feat/use-effect-event-notification-host branch November 1, 2026 20:45
@github-actions github-actions Bot added this to the Release 8.0.0 milestone Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring of existing feature

Development

Successfully merging this pull request may close these issues.

1 participant