Skip to content

feat: session-based notification stacking with auto-dismiss#463

Merged
garysheng merged 2 commits intoPeonPing:mainfrom
smurfy92:feat/notification-stacking
Apr 14, 2026
Merged

feat: session-based notification stacking with auto-dismiss#463
garysheng merged 2 commits intoPeonPing:mainfrom
smurfy92:feat/notification-stacking

Conversation

@smurfy92
Copy link
Copy Markdown
Contributor

Summary

Group notifications from the same Claude session into a single overlay with a count badge. When the user resumes interaction (accepts a permission, submits a prompt, etc.), pending overlays are automatically dismissed.

Behavior

  • 3 notifications from the same session → single overlay showing `(3) project — needs approval`
  • The 2nd+ notification kills the previous overlay and reuses its slot position
  • Session state stored in `/tmp/peon-ping-popups/.session-<session_id>`
  • Auto-dismiss on events that mean "user resumed": UserPromptSubmit, Stop, PreToolUse, PostToolUse, PostToolUseFailure, Notification

New config

  • `notification_stacking` (bool, default `true`)

Test plan

  • Trigger 3 notifications from same session rapidly → verify single overlay with `(3)` prefix
  • Accept a permission dialog → verify overlay dismisses automatically
  • Set `notification_stacking: false` → verify each notification gets its own slot

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 14, 2026

@smurfy92 is attempting to deploy a commit to the Gary Sheng's projects Team on Vercel.

A member of the Team first needs to authorize it.

smurfy92 and others added 2 commits April 14, 2026 10:21
Notifications from the same Claude session now consolidate into a single
overlay with a count badge (e.g. "(3) project — needs approval"). When the
user accepts a permission, submits a prompt, or a task completes, pending
overlays are automatically dismissed for that session.

New config key: notification_stacking (default: true)

The stacking logic kills the previous overlay process, reuses its slot
position, and increments a count prefix. Session state is stored in
/tmp/peon-ping-popups/.session-<id> and cleaned on dismiss.

Auto-dismiss triggers on: UserPromptSubmit, Stop, PreToolUse, PostToolUse,
PostToolUseFailure, Notification — covering all cases where a previous
permission request is no longer relevant.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fresh installs now register for PreToolUse in addition to the existing
hooks. This is required for the notification auto-dismiss feature to
trigger when a user accepts a permission request (PreToolUse fires
right before the tool runs, after acceptance).

Without this, users would need to manually add PreToolUse to their
Claude Code settings.json for auto-dismiss to work.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@garysheng garysheng force-pushed the feat/notification-stacking branch from 45500b3 to b079bb9 Compare April 14, 2026 15:21
@garysheng garysheng merged commit 2369779 into PeonPing:main Apr 14, 2026
0 of 2 checks passed
garysheng added a commit that referenced this pull request Apr 14, 2026
- peon setup wizard (#465, closes #283)
- session-based notification stacking (#463)
- X close button on overlays (#464)
- notification_title_marker config (#457)
- expanded peon status (#461)
- NSPanel overlay focus fix (#462)
- overlay label + suppression fix (#460)
- pack sync robustness (#453)
- linux notify-send dismiss time (#455)
- nix zsh module (#456)
- Warcraft III Orc peon mapping fix in README EN/zh/ja (closes #333)
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.

2 participants