Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

Adds support for posting notifications to the native macOS Notification Center using UNUserNotificationCenter. Previously, notifications were only shown via the custom GPUI-like UI and would disappear after the timeout. Now, notifications are also posted to the system notification center where they persist until the user interacts with them.

Changes:

  • New SystemNotificationCenter.swift singleton that wraps UNUserNotificationCenter
  • When showing a notification, it's posted to both the custom UI and the system notification center
  • User interactions from the notification center (click/dismiss) trigger the appropriate Rust callbacks
  • Notifications are removed from the center when explicitly dismissed by the user (but persist after timeout)

Review & Testing Checklist for Human

  • Verify Swift compiles on macOS - This code was written on Linux and couldn't be tested. Confirm the Swift package builds successfully.
  • Test notification permissions flow - First launch should request notification permissions. Verify the authorization dialog appears and subsequent notifications work.
  • Check for race condition in authorization - The code waits 0.5s after requesting auth before posting. If auth takes longer, the first notification may not appear in notification center.
  • Verify dual notification behavior is acceptable - Users will now see both the custom UI notification AND a system notification. Confirm this is the intended UX.
  • Test notification center interactions - Click a notification in notification center and verify it triggers collapsed_confirm. Dismiss from notification center and verify dismiss is called.
  • Check if app entitlements need updating - macOS apps may need UserNotifications capability in entitlements.

Recommended test plan:

  1. Build and run the app on macOS
  2. Trigger a calendar event notification (5 min before event)
  3. Let the custom UI notification timeout
  4. Open Notification Center and verify the notification persists there
  5. Click the notification and verify the app responds correctly

Notes

Requested by @ComputelessComputer

Link to Devin run: https://app.devin.ai/sessions/e560037fd42147c9a86bb90089e30aef

- Add SystemNotificationCenter.swift to post notifications to the system notification center
- Notifications now appear in Notification Center and persist after the custom UI disappears
- Handle notification center interactions (click to confirm, dismiss)
- Remove notifications from center when user explicitly dismisses them

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
@netlify
Copy link

netlify bot commented Feb 3, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit 7b7b5da
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6981bc480b341500079d715b

@netlify
Copy link

netlify bot commented Feb 3, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit 7b7b5da
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6981bc48161b7a0007b3b61d

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@yujonglee
Copy link
Contributor

/staging

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Branch Commit Status
devin/1770109369-native-notification-center 7b7b5dac View

@yujonglee yujonglee closed this Feb 8, 2026
@yujonglee yujonglee deleted the devin/1770109369-native-notification-center branch February 8, 2026 13:21
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