Skip to content

feat(notifications): dock bounce, taskbar flash, and unread badge count#2534

Open
Pulkit7070 wants to merge 7 commits into
mainfrom
feat/notification-dock-taskbar
Open

feat(notifications): dock bounce, taskbar flash, and unread badge count#2534
Pulkit7070 wants to merge 7 commits into
mainfrom
feat/notification-dock-taskbar

Conversation

@Pulkit7070

@Pulkit7070 Pulkit7070 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • macOS: dock icon bounces once (informational) when a needs_input or ready_to_merge notification arrives and the app is not focused
  • Windows: taskbar flashes until the user focuses the window; rapid arrivals are deduped so multiple notifications do not stack focus listeners
  • Linux: flashFrame for taskbar attention + app.setBadgeCount for Unity/KDE numeric badge
  • Badge count: unread notification count kept in sync on all platforms — macOS dock.setBadge, Windows overlay icon red dot, Linux setBadgeCount
  • Notification panel: needs_input uses a minimal amber dot indicator; ready_to_merge keeps the GitPullRequest icon; sticky error state clears on dropdown reopen; panel width tightened to 320px

How it works

Real notifications arrive via SSE (notification_created event) and are merged into the React Query cache. The existing NotificationCenter component syncs badge count via a useEffect on unreadCount. The main process handlers (notifications:show, notifications:setBadge) are platform-branched with guards for null window, NaN/negative counts, and rapid-call dedup.

Testing in dev

// DevTools console — injects a fake notification and bounces the dock after 3s
__testNotif("needs_input")
__testNotif("ready_to_merge")

Test plan

  • macOS: __testNotif("needs_input") — dock bounces once, bell shows count
  • macOS: dock badge count (System Settings > Notifications > Electron > Badge app icon must be enabled)
  • Windows: taskbar flashes on notification, stops on window focus
  • Linux: flashFrame fires; app.setBadgeCount called
  • Multiple rapid notifications only flash once (dedup guard)
  • All unit tests pass: npx vitest run src/renderer/lib/notifications.test.ts

Pulkit7070 and others added 7 commits July 9, 2026 01:32
When a needs_input or ready_to_merge notification arrives and the app
window is not focused:
- macOS: dock icon bounces once (informational)
- Windows: taskbar flashes until the window is re-focused (deduped so
  rapid arrivals do not stack listeners)
- Linux: flashFrame for taskbar + app.setBadgeCount for Unity/KDE launchers

Badge count (unread notification count) is kept in sync on all platforms:
- macOS: app.dock.setBadge
- Windows: setOverlayIcon with a red dot
- Linux: app.setBadgeCount

UI: NotificationCenter panel scaled to w-[320px]; needs_input indicator
replaced with a minimal amber dot (no icon); ready_to_merge keeps the
GitPullRequest icon; error state clears on next dropdown open.

BoardWelcome empty state redesigned: 3-step inset card with flow legend,
no em dashes, cleaner typography.

Dev: __testNotif() helper in DEV builds injects a fake notification into
the React Query cache and triggers devBounce (bypasses isFocused guard)
after a 3-second delay so the dock/taskbar signal is testable from the
DevTools console.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove the 3-step card and flow legend entirely. Welcome screen is now
just the AO logo (80px), heading, one-line subtitle, and a minimal
outlined button -- no box, no numbers, no icon, no fill color.
@Pulkit7070 Pulkit7070 changed the title feat(notifications): dock bounce, taskbar flash, and unread badge feat(notifications): dock bounce, taskbar flash, and unread badge count Jul 8, 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.

1 participant