Repository navigation
feat(notifications): Push Inbox items to their assignees - #4047
Merged
Merged
Conversation
Add a delivery record per Inbox item, User, and channel. When an open action is shown to a named User, push it to them once. Skip Everyone items, notices, items with a Slack card, snoozed items, and pushes outside the User's notification hours. When an item closes, mark its deliveries cleared, and close them on each device with the next push. Refs #3817 Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: BYK <[email protected]> # Conflicts: # packages/junior/migrations/meta/0160_snapshot.json # packages/junior/migrations/meta/_journal.json
# Conflicts: # packages/junior/migrations/meta/0161_snapshot.json # packages/junior/migrations/meta/_journal.json
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bf2a446. Configure here.
BYK
approved these changes
Nov 23, 2026
BYK
left a comment
Member
There was a problem hiding this comment.
Only approving because the code I objected was pre-existing. I need a follow up for that.
BYK
added a commit
that referenced
this pull request
Nov 23, 2026
…ter (#4051) Step 1 of #3817. It is stacked on #4047, which adds the delivery record. Today a reply in a dashboard Conversation sends a push and leaves no Inbox state. With this change the reply becomes an Inbox item, so the push comes from an item like every other notification. - **Reply notice.** When a Turn in a Conversation with no Location ends with a reply, core adds a notice for the Conversation's starter, or updates the open one. Its dedupe key is `reply:<conversationId>`, so each Conversation has one open notice, and that notice holds the latest reply. The Inbox shows it in FYI, with the Conversation title and a short preview of the reply. - **Push.** Each reply pushes the notice to the starter again, the same as the reply push did before. The push tag is now the item id, so a new reply replaces the older notification on the device. A `reply` row in `junior_inbox_item_deliveries` (one per item × User) records the latest push, or the reason it was skipped (outside hours or Slack DND). - **Close on read.** When the starter's read position reaches the latest reply, the notice closes as done. This covers the dashboard read report, the MCP `markConversationRead` tool and archive. The step 2 close-clear then removes its push from each device with the next push. An earlier read leaves the notice open. - **Starter.** The recipient is now the starter, meaning the User of the root's actor (see `TERMINOLOGY.md`). Only roots run session tasks. For an older root with no stored actor, the run's Actor stands in, as before. - **Agent guard.** Agents cannot use the `reply:` key prefix, and `canAgentChangeInboxItem` refuses reply notices. An agent can't overwrite or close the starter's notice. - A Slack thread is unchanged: it gets no notice and no push. Design: this adds the confirmed lines to `design/inbox.md` (the notice intent, and the reply-notice rule) and to `design/attention.md` (who gets a push). The operator docs describe the reply notice. No dashboard code changes. The existing FYI notice row renders the reply notice. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Abb0c4c737e0fda4b1516de7405ffd1d2 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Abb0c4c737e0fda4b1516de7405ffd1d2) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Abb0c4c737e0fda4b1516de7405ffd1d2/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <[email protected]>
22 tasks done
This branch was successfully 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.

Step 2 of #3817: notifications come from Inbox item events.
When an open action shows to a named User, Junior sends one web push to that User. A new
junior_inbox_item_deliveriestable holds one record per item × User × channel × event. The record stops a second push when the item shows again, for example after a content change.What pushes:
skippedand the reason.Close-clear: when an item closes or is dismissed, its sent deliveries change to
cleared. Web Push cannot remove a notification without showing a new one, and browsers penalize silent pushes. So the next push to that User carriesclose: [itemIds](items cleared within the 12 h TTL, at most 20), and the service worker closes those tags first.The push hooks into
ShowInboxItem.createInboxItemShowruns the Slack cards, then the push, and replacescreateSlackInboxItemShowat every call site. Like Slack cards, the push is best-effort and inline, with no retry.This also removes the
design/attention.mdgap about a question card with no reply that sends no push, as confirmed on the issue.via @BYK.
--
View Session [Sentry]