Repository navigation
feat(inbox): Add create_inbox_items notification entrypoint - #130823
Draft
hobzcalvin wants to merge 8 commits into
Draft
hobzcalvin wants to merge 8 commits into
hobzcalvin wants to merge 8 commits into
Conversation
create_inbox_items takes users and teams, expands teams to their active members in the subject's organization, records one inbox event per user, and, behind organizations:inbox-notifications, queues email and Slack DM notifications for the newly recorded events after the transaction commits. Refs ISWF-3737 Co-authored-by: Cursor <cursoragent@cursor.com>
Notification templates and delivery will reuse the existing per-event notifications and land separately, so this keeps only the user and team fan-out and recording. Refs ISWF-3737 Co-authored-by: Cursor <cursoragent@cursor.com>
Refs ISWF-3737 Co-authored-by: Cursor <cursoragent@cursor.com>
Behind organizations:inbox-notifications, create_inbox_items hands the users who got a new event to the event type's notifier after the transaction commits. Mentions resolve each user's targets with their workflow notification settings; building and sending the notification is left as a TODO. Refs ISWF-3737 Co-authored-by: Cursor <cursoragent@cursor.com>
…ate_inbox_items Refs ISWF-3737 Co-authored-by: Cursor <cursoragent@cursor.com>
The issue and notebook recorders now call create_inbox_items with user and team recipients, so recipient expansion and notification handoff happen in one place. Event types carry their own notifier, and only the mention event types define one for now. Refs ISWF-3737 Co-authored-by: Cursor <cursoragent@cursor.com>
Assignment, comment mentions, Seer PR-ready, and investigation completion now call create_inbox_items themselves, and the record_issue_* and record_notebook_completed wrappers are removed. Refs ISWF-3737 Co-authored-by: Cursor <cursoragent@cursor.com>
Refs ISWF-3737 Co-authored-by: Cursor <cursoragent@cursor.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
create_inbox_items, the Notification Platform entrypoint for the Universal Inbox (ISWF-3737), and has every existing inbox producer call it directly. The contract is being discussed on ISWF-3725.Recording.
recipientstakes users and teams. Teams expand to their active members, recipients outside the subject's organization are dropped, and a user reached both directly and through a team gets one event. Recording goes throughInboxEventType.record(), which still drops the actor and now returns the events it created.One way in. Assignment (
GroupAssignee.objects.assign), comment mentions (issues/comments.py), Seer PR-ready (seer/entrypoints/operator.py), and investigation completion (orchestration_events.py) now callcreate_inbox_itemswith users and teams. Therecord_issue_*andrecord_notebook_completedwrappers are removed.Notifications (skeleton).
INBOX_NOTIFIERSinnotifications/platform/inbox.pymaps event types to notifiers; the inbox types don't know about notifications. Behindorganizations:inbox-notifications, the users who got a new event are handed to the event type's notifier after the transaction commits, so a retry that records nothing notifies nobody. Each recipient is an individual user, notified per their personal settings; teams get no channel post.Activityand resolves each user's targets withUserRoutingStrategyand theWORKFLOWsetting. Building the notification from the existing activity template and sending it is a TODO.activity_id(feat(inbox): Add durable occurrence IDs to event data #130397).Not in this PR:
ADD_TO_INBOXaction (ISWF-3710). The existing activity notifications for these events keep sending, so cutover has to avoid double-sending.