Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

fix(notifications): dedupe repeated presentation - #3688

Closed
k11kirky wants to merge 1 commit into
mainfrom
posthog-code/dedupe-notification-presentation
Closed

k11kirky wants to merge 1 commit into
mainfrom
posthog-code/dedupe-notification-presentation

Conversation

@k11kirky

Copy link
Copy Markdown
Contributor

Problem

Repeated delivery of the same app notification can play the completion sound and show its toast twice.

Why: notification delivery is at-least-once, so presentation needs to be idempotent during a short replay window.

Changes

Deduplicate identical, non-suppressed notifications for one second before triggering sound, toast, native notification, or dock effects. Added a regression test covering duplicate completion delivery.

How did you test this?

  • Red/green focused notification test (21 tests passing)
  • Biome lint on both changed files
  • git diff --check

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

Generated-By: PostHog Code
Task-Id: 6c21c18f-a45b-405e-8122-eedee7ddd085
@trunk-io

trunk-io Bot commented Jul 22, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 786d222.

@k11kirky k11kirky closed this Jul 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant