Skip to content

Improve notification handling to reduce duplicates - #328304

Merged
sbatten merged 2 commits into
mainfrom
sbatten/fix-spammy-notification
Jul 31, 2026
Merged

Improve notification handling to reduce duplicates#328304
sbatten merged 2 commits into
mainfrom
sbatten/fix-spammy-notification

Conversation

@sbatten

@sbatten sbatten commented Jul 30, 2026

Copy link
Copy Markdown
Member

Introduce a new PendingNotificationToasts class to manage rapidly added notifications, ensuring that duplicate notifications are consolidated into a single toast. This change optimizes the rendering process and prevents spammy notifications from overwhelming the user interface. Tests validate the new behavior.

fixes #328209

Copilot AI review requested due to automatic review settings July 30, 2026 22:35
@sbatten
sbatten enabled auto-merge (squash) July 30, 2026 22:35
@sbatten sbatten self-assigned this Jul 30, 2026
@sbatten
sbatten requested a review from mrleemurray July 30, 2026 22:35
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@benibenj

Matched files:

  • src/vs/workbench/browser/parts/notifications/notificationsToasts.ts
  • src/vs/workbench/browser/parts/notifications/pendingNotificationToasts.ts

@sbatten
sbatten requested a review from benibenj July 30, 2026 22:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Consolidates rapidly duplicated notifications before toast rendering, reducing UI spam.

Changes:

  • Adds pending-toast scheduling and duplicate replacement.
  • Integrates pending-toast cleanup into notification lifecycle.
  • Adds coverage for duplicates, spam limits, and removals.
Show a summary per file
File Description
pendingNotificationToasts.ts Manages deferred toast rendering and deduplication.
notificationsToasts.ts Integrates pending-toast handling.
notificationsToasts.test.ts Tests pending notification behavior.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@sbatten
sbatten merged commit 874db42 into main Jul 31, 2026
29 checks passed
@sbatten
sbatten deleted the sbatten/fix-spammy-notification branch July 31, 2026 08:41
@vs-code-engineering vs-code-engineering Bot added this to the 1.132.0 milestone Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calling showErrorMessage with the same message multiple times does not show message

3 participants