Skip to content

feat(notifications): add actionable native alerts - #3491

Open
setchy wants to merge 4 commits into
mainfrom
feat/actionable-native-alerts
Open

setchy wants to merge 4 commits into
mainfrom
feat/actionable-native-alerts

Conversation

@setchy

@setchy setchy commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Move OS notifications from the preload web API to a main-process service behind typed IPC.
  • Publish individual notifications with repository grouping, a cap with summary fallback, native actions, and removal-on-read.
  • Add notification list anchoring, sticky group headers, and focus-intent scrolling so a native click reveals the matching row.
  • Add native style, actions, keep-visible, and notification-click controls to the Alerts section.
  • Add pnpm sign:dev so macOS development builds can deliver native notifications.

Native notification behavior

  • Actions: Mark as read, Mark as done (where supported), and Unsubscribe (where supported). Button labels follow the interface language.
  • Clicking the notification body opens the target.
  • Individual style publishes up to five notifications per batch; a larger batch becomes one summary. Summary always publishes one count notification, which stays until nothing unread remains.
  • Read, done, unsubscribe, account removal, and app reset remove the corresponding OS notification. Quitting or updating the app does not.
  • Keep notifications on screen applies to Windows and Linux; on macOS the system decides (System Settings → Notifications).
  • Notification identities are short hashes, within Windows' 64-character toast tag/group limit.
  • Windows: interactions are delivered once, through Notification.handleActivation.

macOS note: action buttons require the alert notification style, so notifications stay on screen until dismissed by default. Since macOS 11, actions sit behind the hover-only Options menu.

Release notes: default behavior change

New defaults: Individual style with actions on. A batch of new notifications now shows up to five separate notifications (previously one combined notification). Users can switch to Summary in Settings → Alerts.

Manual checks still pending

  • Signed macOS build: actions, click, removal, restored notifications after restart
  • Windows: toasts show (tag/group length), single delivery per click/action, cold-start activation, Action Center persistence
  • Linux: action-capable and action-incapable notification servers

@github-actions github-actions Bot added the enhancement New feature or enhancement to existing functionality label Oct 24, 2026
@setchy
setchy force-pushed the feat/actionable-native-alerts branch from 9e98192 to 1d9bff5 Compare October 24, 2026 17:55
@setchy
setchy changed the base branch from main to refactor/settings-inbox-alerts October 24, 2026 17:55
@setchy
setchy force-pushed the feat/actionable-native-alerts branch 2 times, most recently from 71713bf to 43e64db Compare October 24, 2026 19:40
Base automatically changed from refactor/settings-inbox-alerts to main October 24, 2026 19:43
@setchy
setchy force-pushed the feat/actionable-native-alerts branch 2 times, most recently from 23adf0f to f133fb0 Compare October 24, 2026 21:31
@setchy
setchy force-pushed the feat/actionable-native-alerts branch from f133fb0 to 211f7ae Compare October 25, 2026 02:36
@setchy
setchy changed the base branch from main to refactor/settings-controls-primer October 25, 2026 02:36
@setchy
setchy force-pushed the feat/actionable-native-alerts branch 3 times, most recently from 34c218b to f698481 Compare October 25, 2026 03:32
Base automatically changed from refactor/settings-controls-primer to main October 25, 2026 03:33
@setchy
setchy force-pushed the feat/actionable-native-alerts branch 3 times, most recently from b865812 to a32756f Compare October 25, 2026 11:49
Move OS notifications into a main-process service behind typed IPC, with native actions, grouping, and list anchoring.

Keep focus scrolling animated and make the browser tests wait for the scroll to settle. Address the Sonar findings on identifier validation, optional chaining, stable string sorting, and the intentionally sequential native publish loop.
@setchy
setchy force-pushed the feat/actionable-native-alerts branch from a32756f to 0448183 Compare October 25, 2026 11:49
Resolve conflicts from the settings-controls and visual-regression refactors:

- Keep main's shared createGitifyBridgeApi helper and move the native
  notifications bridge mock into it
- Keep both NotificationRow attributes: focus tracking and exit animation
- Merge AlertSettings tests: main's control conventions plus the native
  notification style, actions, and click coverage
- Take the native notification test suite; main's tests covered the
  removed preload API
- Accept main's deletion of the Settings route snapshot
- Refresh the notification-volume visual baselines for the new Alerts rows
…e-alerts

Resolve conflicts with #3449 (drop the retired auth callback from preload),
#3523 (i18n) and #3530 (TSDoc): translate the new Alerts settings and the
native summary notification, keep the native-notification contributor notes
alongside the Translations guide, and document the new preload/shared APIs.
@setchy
setchy marked this pull request as ready for review October 29, 2026 01:53
@setchy
setchy requested a review from afonsojramos as a code owner October 29, 2026 01:53
- Use short hashed identities (max 12 chars) so Windows toasts stay within
  the 64-character tag/group limit; resolve interactions by hashing the cache.
- Windows: deliver clicks and actions only via handleActivation, which also
  fires for live notifications, so each interaction is handled once.
- Keep the summary notification until no unread notifications remain.
- Translate action button labels in the renderer and send them over IPC;
  validate label and identity lengths in the main process.
- Hide 'Keep notifications on screen' on macOS, where it has no effect.
- Keep delivered notifications on quit; handle actions on restored macOS
  notifications by opening the notification.
- Rename the INDIVIDUAL style value to 'individual'.
- Use the singular summary text for one notification.
- Read actionIndex from the event details (the positional arg is deprecated).
- Keep the click-fallback URL in the renderer instead of sending it over IPC.
- Queue interactions again while the renderer reloads.
@setchy
setchy force-pushed the feat/actionable-native-alerts branch from b4eefae to 3de7b5f Compare October 29, 2026 02:10
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or enhancement to existing functionality

Development

Successfully merging this pull request may close these issues.

1 participant