feat: browser push notifications for assignment, reopen and mentions - #3755
feat: browser push notifications for assignment, reopen and mentions#3755Shllokkk wants to merge 2 commits into
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
Confidence Score: 5/5Safe to merge. The previous finding is fixed, and no new actionable regressions were found. Reviews (2): Last reviewed commit: "fix: require explicit open-status filter..." | Re-trigger Greptile |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3755 +/- ##
===========================================
+ Coverage 73.76% 74.36% +0.59%
===========================================
Files 148 149 +1
Lines 10841 11100 +259
===========================================
+ Hits 7997 8254 +257
- Misses 2844 2846 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ahh i see.... lmk once the refactor is done. would love push notifs this time around. would it support this by design? |
|
Please write the description properly, it is very verbose |
|
Also we are refactoring notifications doctype to move from HD Notification to Notification (Fw) You can raise the PR once the refactor is done |
Closes #2942
What
Opt-in browser push notifications for Helpdesk agents, so they are alerted to new ticket activity even when the Helpdesk tab is not focused (e.g. they are working in another tab, window or app).
Triggers
A push is raised for the recipient agent on:
Comment emoji-reactions are intentionally not pushed (low signal).
Opt-in
Agents turn it on from a bell button in the Notifications panel header, which requests browser permission. Nothing fires until permission is granted.
Suppression
To avoid double-cueing, a push is skipped when the agent is already looking at a ticket list whose active view would already show the ticket — i.e. the view filters on assignee = me and an open status. This works for the standard "Recently Assigned Tickets" view and for any private/custom view with those filters; all other filters are ignored. Mentions always fire (a mention may be on a ticket the agent is not assigned to).
Architecture
HD Notification.after_insertalready runs for every ticket event, so it is the single seam. It now also callsnotify_via_push(), which publishes ahelpdesk:new-notificationrealtime event scoped to the recipient (user=user_to,after_commit=True).should_push()limits it to assignment / mention / reopen — a reopen is aReactionwith noreference_comment, while an emoji-reaction has one, which cleanly separates the two.usePushNotificationscomposable subscribes once tohelpdesk:new-notification, builds a translatable title, shows aNotification, and routes to the ticket on click. The opt-in state (isSupported/permission/enable) is shared with the Notifications panel header. The realtime payload carries onlynotification_type,user_fromandreference_ticket.