Skip to content

ref(inbox): Name each Inbox item by its subject kind and id - #4164

Open
sentry-junior[bot] wants to merge 97 commits into
mainfrom
ref/inbox-item-subjects
Open

sentry-junior[bot] wants to merge 97 commits into
mainfrom
ref/inbox-item-subjects

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Inbox items carried fields that only one source used: automation_id, a GitHub title parse in subject_title_parts, subject_title, and subject_url. They also packed the meaning of the source into dedupe_key prefixes (plugin:, automation:, reply:, todo:), which a check constraint and the dashboard then parsed. That copied GitHub state into our database and went stale. It also made a pull request's review ask and merge ask two items, so a snooze or pin of the review was lost at the merge.

Now an Inbox item is a pointer to its subject, a { kind, id } pair, plus the state that every item has, such as its status and assignees. Junior reads the title, state, link, owner, and visibility from the subject, live.

The subject

  • Kinds. Core kinds are question, automation, reply, and todo. A plugin kind starts with the plugin name, such as github:pull_request. A plugin registers its kinds with a label and an owner map. It can also register ask(card, viewer), which names the viewer's current ask from the live card, and codeChange, which says that the subject id is a code change's provider id.

  • Identity. (subject_kind, subject_id) names one open item, across all workspaces (junior_inbox_items_open_subject_key_uidx). It replaces dedupe_key. The plugin API drops dedupeKey from upsert, close, conversation changes, and the answered hook. They take subject now.

  • Owner and visibility. An item stores no owner. A question belongs to the Conversation that asked it, a reply and a To-do to their Conversation, an Automation alert to its Automation, and a plugin item to the Conversation that the plugin's owner map names. The item is public when its owner's Destination is public, and it follows the Destination when that changes. A To-do is always private.

  • Plugin owner map. For each subject kind, a plugin names one of its tables and the columns that hold the subject id and the owner Conversation id (owner: { table, subjectId, conversationId }). Core reads the owner through that map in access checks, counts, search, and paging. extend/build-a-plugin.md describes it.

  • Everyone. Everyone means the people who can see the item's owner. Reads already work that way: the members of a private Conversation see its unassigned items up for grabs, and people who cannot see the Conversation do not. This release still refuses Everyone on a private item ("A private item cannot be assigned to Everyone. Assign Users instead."), because the old visibility check stays for rollback. design/inbox.md records this as a Gap. The follow-up release removes the refusal and the Gap.

  • Retired columns. dedupe_key, owner_kind, owner_id, visibility, provider, and provider_tenant_id leave the Drizzle schema, and no code reads them. They keep their NOT NULLs and the old kind, owner, tenant, and visibility checks for one release, so the release before this one can still read and write every row after a rollback. A trigger, junior_inbox_items_legacy_write, fills them for new code. It uses the owner that insertInboxItem sets for its transaction (junior.inbox_item_owner_kind and junior.inbox_item_owner_id). A question item also keeps a copy of its title and body, and an action keeps a copy of its request (with evidence), which the old kind check needs.

GitHub

  • One github:pull_request item per pull request. Its id is GitHub's numeric pull request id (databaseId), which is also junior_code_changes.provider_id. A repository rename or transfer does not change it, and the link comes from the code change records, so it follows the rename.
  • Owner. The item belongs to the Conversation that opened the pull request. The plugin's owner map is junior_github_pull_request_requesters (pull_request_id → conversation_id). A partial unique index allows one opener row per pull request id. When a row was written without the id, or the repository was renamed, the backfill and the legacy trigger fall back to the code change with that number that the Conversation opened, when only one matches.
  • The ask. The row label comes from the live card: "Ready to merge" after approval when GitHub says it can merge and it is no draft, else "Review requested". A reviewer whose review GitHub still requests also sees "Ready to merge" once it is ready. The card now carries GitHub's review decision (reviewDecision, or the latest writers' reviews when the repository requires none). The decision comes from main's page prefetch: its PullRequestCards query also reads reviewDecision and the latest reviews, and stores them as review in the shared pull request cache entry. Webhooks keep that field. review: null means read with no decision. An open pull request's entry with no review, such as one that only webhooks or a REST read wrote, counts as missing, so the next page reads it. A review webhook (pull_request_review submitted or dismissed, or pull_request review_requested or review_request_removed) clears the field, so "Ready to merge" shows on the next page load after any review change. That is one GraphQL query per page, only while a pull request on it has an unread review. Issue cards use main's cached REST reads, and pull request title parts read the repository's release config, cached for 1 h. A failed GraphQL query no longer blanks cards. When GitHub can't be read, the row shows the item's own title and the kind's label.
  • Several assignees. Upsert takes the people who have an ask (assigneeIdentityIds) and the people whom this event asks (askedIdentityIds). A person joins the item only when an event asks them, so someone who left does not come back until a new ask. A person whose ask ends, such as a reviewer who reviewed, leaves the item, and their snooze and push end. A person who joins again starts with none of their old web push rows for the item, so a push that was cleared when they left does not close the new notification. The item closes when nobody is left, also when the only asks left are for people Junior can't assign.
  • Dismiss, Done, and answers close the item for everyone, as before.
  • Push. The event that gives a person an ask pushes them: review_requested for the reviewer, or the approval that makes it ready to merge for the requester. The same item pushes again when the event asks again, so moving from review to merge pushes the requester while the snooze and pin stay. Content changes alone push nobody. Nothing records the last pushed ask.
  • Merge conflict keeps its own github:merge_conflict item, with the same pull request id. It closes as done when GitHub reports the conflict gone, and with the pull request item's reason when the pull request merges or closes, also when the daily reconcile finds an end that sent no webhook. Junior still asks once per Resume, and a Dismiss stops those asks.

Questions

  • Their own table. A question an agent asks lives in junior_questions: its Conversation, Turn, title, body, request, and answer. The item points at it with { kind: "question", id }. Each addInboxItem call asks a new question, ask:<tool call id>, so a retry of the same call adds no second item.
  • Change by id. addInboxItem returns the item with its id. To change a question, its form included, an agent calls updateInboxItem with that id. There is no key to reuse.
  • Automation runs. An Automation is a definition, and each run is a Conversation. A question that a run asks belongs to that run's Conversation. A later run gets an <open-questions> block in its task: "Earlier runs of this Automation asked these questions, and they are still open. To ask one of them again, change it by its id.", then one - <id>: <title> line per question. An Automation alert, such as a failed run, stays automation:<id> and belongs to the Automation.
  • Related links. What a question is about, and the sources for its facts, are its request.related links. They show on the card, but they never decide the card or add related work to another item. A notice's request holds only related links. The Inbox payload sends it, and the notice card lists them in its Related list. A question's subject is the question, so it has no subject link, object preview, or Slack title link. The Slack card lists a question's or a notice's related links as one line of plain links below the body. A repeated link shows once, and links that would make the line too long for the card are left out. A snooze of a question still waits by default on what its first related link names, such as a pull request.
  • Related work. It lists the other open plugin items about the same object, by subject id, and the items in the Conversations that the item links. Linked Conversations show when the viewer can see them.

Tool text

addInboxItem drops subject and dedupe_key, and request.evidence becomes request.related. updateInboxItem gains request. The question shape, request.question and request.fields, is unchanged.

Tool Param Text
addInboxItem dedupe_key (removed)
addInboxItem request Required for an action item. A notice may have one with only related. Ask for related input in one item. Write the question so it stands alone: a person who sees only the card must understand it.
addInboxItem request.question The question, in markdown. Include the facts the person needs to decide. Required for an action. Not allowed for a notice.
addInboxItem request.fields What to ask, in display order. Use one choice field for a simple decision. Required for an action. Not allowed for a notice.
addInboxItem request.related Links related to the item: what it is about, such as a pull request, and the sources for its facts. With a suggested answer, link what supports it and what argues against it. Each entry has a url or a conversation_id.
addInboxItem request.related[].url A link, such as a chart, a log search, or the pull request that the item is about. The card shows these links.
updateInboxItem request Replaces the whole request, such as to change the choices of a question. An action needs a question and fields. A notice may have only related. Omit to keep it.

The input errors are:

Case Error
Action without a question An action item needs a request with a question and fields.
Notice with a question A notice asks nothing, so its request holds only related. To ask, use kind action.
A related entry with both or neither link Each related entry needs a url or a conversation_id, not both.
The same tool call again This tool call already added its item. To change it, update it by its id.

The system prompt rule for a blocked child agent now says: "When the same block repeats, change the open item that you added for it instead of adding another." It no longer builds a dedupe_key.

Reads and search

  • Inbox pages, counts, the MCP view, and snooze rows read subject links in one batch, with one query for all code change kinds. Cards still resolve once per page.
  • A question's title, body, request, and answer come from junior_questions. In /api/search, an item matches on its question's title and body, or when the title of its subject's code change matches.
  • Purging a Conversation deletes its private items, as before, except the open items of an Automation run, which a later run can still change. Then it deletes the questions that no item points to.

Automations

  • automation_id and its foreign key are dropped. The Automation of a run's question comes from the run that owns the question's Conversation. The run writers link junior_automation_runs.conversation_id as soon as the run's Conversation exists, so this read works during the run.
  • Deleting an Automation closes its runs' open questions, and its alert closes with the alert sync.
  • When a person closed the current alert, such as with Run again, any other open alert of that Automation now closes too. Before, a Blocked alert that opened in between stayed open after the Automation was active again.

Dashboard

  • A question card shows one Related list, in two columns: the question's related links first, then the related items and linked Conversations. Each target shows once, with its first entry. The list shows four entries until the reader asks for the rest.
  • The Inbox question card row no longer shows a subject title that has no card, such as "payments-v42 ·".
  • The Inbox payload no longer has replyNotice. The dashboard reads subject.kind === "reply", and the card looks the same.

Migrations

Core:

  • 20261126010100_inbox_item_subjects adds subject_kind. dedupe_key stays NOT NULL. A trigger, which also fires on old workers' inserts, gives each legacy row its subject. GitHub keys map to the pull request id through junior_code_changes, with the Conversation fallback after a rename. One backfill pass fires it for every row, then closes the older of two open items that now share a subject, such as the review and merge asks of one pull request. A closed duplicate's assignees and snooze move to the item that stays open, and its sent pushes clear. A legacy question's http(s) subject link becomes its first related link. A legacy notice has no request, so its link stays in subject_url, and its question reads it from there. Links get the stored form, URL.href as far as SQL can: the scheme and host are lowercased, and a bare origin gets /. The unique open subject index is built in the same transaction, so an old worker's second open insert fails.
  • …010103 validates and sets NOT NULL on the subject. …010105 builds the subject kind index concurrently. …010108 indexes the run's Conversation. …010159 is the schema snapshot.
  • 20261126010259_inbox_questions creates junior_questions, deletes question items whose owner Conversation is gone, and copies each question item's content to its question. A trigger copies the content that old workers still write on the item. The question stores the request's links as related. …010301 changes nothing, because the old kind check stays. …010343 is the schema snapshot.
  • 20261126011025_inbox_item_owners adds junior_inbox_items_legacy_write, which writes the old columns for new code. It closes all but the newest open item of a subject across tenants. …011048 builds the unique open subject index on (subject_kind, subject_id) concurrently. …011051 drops the owner and tenant indexes, and …011121 is the schema snapshot.

The first core migration follows both of main's current migration leaves, 20261125225142_conversation_kind_root_thread_backfill and 20261126000151_conversation_event_message_role_seq_index.

GitHub:

  • 20261124230100_pull_request_requester_ids and …230103 add and backfill pull_request_id on the requester rows, by name and number, else through the Conversation's one code change with that number.
  • 20261125013037_pull_request_opener_ids keeps the id on the oldest opener row of a pull request. …013040 builds the partial unique index on pull_request_id for opener rows. …013132 is the schema snapshot.

Follow-up release

A follow-up PR, after this release ships, loosens what this release keeps for rollback:

  • Drop NOT NULL on junior_inbox_items.dedupe_key, title, body, owner_id, and visibility.
  • Drop junior_inbox_items_kind_check, junior_inbox_items_owner_check, junior_inbox_items_tenant_check, and junior_inbox_items_visibility_check, and add a kind check that reads the subject.
  • Drop the triggers junior_inbox_items_legacy_write, junior_inbox_items_legacy_subject_question, and junior_inbox_items_legacy_subject, their functions (junior_inbox_items_legacy_question for the question trigger), and the junior_inbox_items_web_link helper.
  • Remove the owner set_config in insertInboxItem and the item copy of a question's content.
  • Allow Everyone on a private item: remove the refusal in access.ts, change the tests back so that a member sees the item and a non-member does not, and delete the Gap line in design/inbox.md.

A later release then drops the retired columns: subject_title, subject_url, subject_title_parts, automation_id, owner_kind, owner_id, visibility, provider, provider_tenant_id, dedupe_key, and the title, body, request, and answer of question items.

Enforcement

design/inbox.md states the subject, owner, question, and Automation rules. inbox-item-fields:check fails when a junior_inbox_items column or an Inbox item payload field is not in scripts/inbox-item-fields-baseline.json, and that list can only shrink.

Rollout note

add_inbox_item no longer takes dedupe_key, and its request.evidence is now request.related. Both input schemas are strict. Stored Automation instructions in production, and skills in getsentry/junior-prod, may still mention dedupe_key or evidence. A run that passes either one gets a tool input error. To change an earlier question, a run updates it by the item id: the add result returns that id, and later runs list their open questions with it.

Slack card with related links (rendered markdown block)

**Roll out payments-v42?**

The canary is green.

Related: [Canary \[errors\]](https://example.com/canary) · [Checkout latency](https://junior.example/conversations/slack%3AC456%3A1712345.0009)

Ship release 1.2.3?
…

Screenshots (mock data, inbox-item-related-card)

Before After
Dark desktop before dark desktop after dark desktop
Light desktop before light desktop after light desktop
Dark mobile before dark mobile after dark mobile
Light mobile before light mobile after light mobile

Notice with related links (mock data, inbox-notice-related-card)

Dark Light
Desktop dark desktop light desktop
Mobile dark mobile light mobile

via @BYK.

--

View Session [Sentry]

sentry-junior Bot and others added 27 commits November 21, 2026 19:15
A To-do that an agent assigns to a person now shows in that person's
Inbox as a "To do for you" row, in the stack of its Conversation. Core
owns the backing Inbox item and syncs it with each To-do change, in the
same transaction. The item is private and links no Conversation, so only
its assignee sees it.

Done marks the To-do done, and the agent sees the change in its next
<todo-delta>. The row has no Dismiss. Snooze, the Inbox counts, Needs you,
and the Conversations feed treat it like any action for the person.

Co-Authored-By: BYK <[email protected]>
Co-Authored-By: BYK <[email protected]>

# Conflicts:
#	design/inbox-stacks.md
#	design/inbox.md
#	packages/junior-dashboard/src/client/inbox/InboxItemActions.tsx
#	packages/junior/migrations/meta/0145_snapshot.json
#	packages/junior/migrations/meta/_journal.json
#	packages/junior/src/chat/todos/store.ts
A To-do for a person waits on that person alone. Its Inbox item made the
Conversation read needs_input for everyone who can see it. Leave To-do
items out of the shared status, so only the assignee's tree state shows
that the Conversation waits on them.

Co-Authored-By: BYK <[email protected]>
A To-do's item showed to its assignee for as long as the item was open,
also after they lost access to its Conversation. The assignee now sees
and acts on it only while they can see the Conversation's private
content, under the same rule as the Conversation itself.

Co-Authored-By: BYK <[email protected]>
Done checked the assignee on a snapshot of the Inbox item, then set the
To-do by id. If the agent gave the To-do to someone else in between, the
first person still closed it, along with the new assignee's item. The
update now also needs the To-do to be open and assigned to the person,
under the To-do lock.
# Conflicts:
#	design/inbox-stacks.md
#	packages/junior-dashboard/src/client/inbox/RowHoverActions.tsx
Main moved Open off the hover actions of a row with one ask, so the
e2e test now opens the row and uses the card's link.
# Conflicts:
#	design/inbox.md
#	packages/junior/migrations/meta/0147_snapshot.json
#	packages/junior/migrations/meta/_journal.json
#	packages/junior/src/api/inbox-items/routes.ts
#	packages/junior/src/chat/inbox-snoozes/store.ts
The SQL access check joined the owner to its stored root, so it skipped a
root with a null root id. conversationAccessFromRows treats such a root
as its own, so sync wrote the item and the Inbox then hid it. The SQL now
follows the same rule.
Co-Authored-By: BYK <[email protected]>

# Conflicts:
#	packages/junior/migrations/meta/0148_snapshot.json
#	packages/junior/migrations/meta/_journal.json
The open card's Done imported RowDoneButton from RowSnoozeDismiss, which
pulled that module into the shared card chunk and added about 600 B gzip
to the Inbox first load. The card now uses the plain Button, as Take and
Dismiss do. RowDoneButton serves only the row's quick action.

Co-Authored-By: BYK <[email protected]>
Co-Authored-By: BYK <[email protected]>

# Conflicts:
#	packages/junior-dashboard/src/client/inbox/InboxItemActions.tsx
#	packages/junior-dashboard/src/client/inbox/RowHoverActions.tsx
#	packages/junior-dashboard/src/client/inbox/RowSnoozeDismiss.tsx
#	packages/junior-dashboard/src/mock-reporting/inbox-items.ts
#	packages/junior/migrations/meta/0149_snapshot.json
#	packages/junior/migrations/meta/_journal.json
…ot start

The Lead home e2e expects its checkout latency card to read Working. A
To-do for the viewer there made it read Needs you, so the mock To-do now
sits in the Dashboard QA Conversation (To-do 43).
# Conflicts:
#	packages/junior/migrations/meta/0159_snapshot.json
#	packages/junior/migrations/meta/_journal.json
Co-Authored-By: BYK <[email protected]>

# Conflicts:
#	packages/junior/migrations/meta/0160_snapshot.json
#	packages/junior/migrations/meta/_journal.json
A "To do for you" row and card now carry Dismiss, Snooze, and Done, with
Done as the main action. Dismiss drops the To-do and closes its item as
dismissed. A snooze that resolves on an Event now covers To-do rows too:
its Event marks the To-do done for the person who snoozed it, alone or in
a stack. The agent sees either change in its next To-do delta.

Co-Authored-By: BYK <[email protected]>
Co-Authored-By: BYK <[email protected]>

# Conflicts:
#	packages/junior/migrations/meta/0161_snapshot.json
#	packages/junior/migrations/meta/_journal.json
Record the confirmed rules: a "To do for you" item closes with Done or
Dismiss, and a snooze that resolves on an Event marks the To-do done.
Raise the inbox bundle baseline to the measured size.

Co-Authored-By: BYK <[email protected]>
… a tab (#4092)

Stacked on #3969.

**Why:** All is the default, so it goes to the right edge, after the
filters that narrow the list. #3969 adds To-do items to
the Inbox. With a tab of their own, they stay apart from Resume and the
rest in Other.

**What changes**

- **Inbox:** Other · PRs · Decisions · To-dos · Pinned · All
- **Conversations and a repository's Conversations tab:** Done ·
Watching · Working · Needs you · Pinned · All
- **Automations:** Mine / All keeps its order.
- **Tab order:** follows the order on screen. The URL state (`?type=`,
`?state=`, `?pinned=1`) stays the same, with the new value
`?type=todos`.
- **To-dos tab:** uses the `ListTodo` icon that the To do rows already
load. Other keeps Resume and the rest, and like any type it hides at 0.
The type counts still add up to All.
- **Count API:** `GET /api/inbox-items/count` gets a `todos` field: the
waiting items that show a To-do. While later pages load, the client
counts the unloaded To-dos as To-dos, not Other.
- **Phone:** `ScopeTabs` uses less padding and a smaller gap, so all six
Inbox tabs and the "Inbox" title fit one header row at 390 px, also with
a two-digit count on every type. Automations' Mine / All tightens with
it.
- **Design doc:** `design/inbox.md` lists the new order and the To-dos
type.

## Screenshots

Mock data. Mobile is 390 px, shown at 2×.

| | Dark | Light |
| --- | --- | --- |
| Inbox, desktop |
![](https://junior-prod.sentry.dev/public/artifacts/bf30f1ae-f497-42c0-9b54-e6ac773274e4.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/c98a495e-5366-4abc-9a27-38a6b51ab77c.png)
|
| Inbox, mobile (two-digit counts) |
![](https://junior-prod.sentry.dev/public/artifacts/71612a89-4b93-4b48-9a11-25cc7d345a47.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/2d29e39b-42bd-4dfd-9681-60c6d2c83fc8.png)
|
| Conversations, desktop |
![](https://junior-prod.sentry.dev/public/artifacts/63382892-063c-4a4b-9653-43036ef76745.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/2e83cd10-00cc-4843-92a4-2286b487d834.png)
|
| Conversations, mobile |
![](https://junior-prod.sentry.dev/public/artifacts/0fc60b91-8c9c-45eb-9723-c9f3756f2b7b.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/54ab9f09-3ca3-4b4d-9dce-b766f4106487.png)
|
| Automations, desktop |
![](https://junior-prod.sentry.dev/public/artifacts/0123320e-8977-4281-893c-2b0f634c0067.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/ed491598-0eb5-43f2-8a64-440497c2ab0e.png)
|
| Automations, mobile |
![](https://junior-prod.sentry.dev/public/artifacts/606794e6-2b98-483e-95b2-faaac6440bf2.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/209cc151-cdb6-446c-a9df-c5c09296c555.png)
|

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A0e0c9f21f9f884e850892453d4b9bee5 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A0e0c9f21f9f884e850892453d4b9bee5)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A0e0c9f21f9f884e850892453d4b9bee5/?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]>
Co-Authored-By: BYK <[email protected]>

# Conflicts:
#	design/attention.md
#	design/inbox.md
#	packages/junior/migrations/meta/0162_snapshot.json
#	packages/junior/migrations/meta/_journal.json
#	packages/junior/src/chat/inbox-items/access.ts
#	packages/junior/src/chat/inbox-items/tools/add.ts
#	scripts/dashboard-bundle-size-baseline.json
A resolve trigger cancelled the snooze in one transaction and then marked
the To-do done. If that step failed, the Event was spent and the To-do
stayed open. Change the To-do first, so a failure leaves the snooze to
fire again, and a repeat changes nothing.
Co-Authored-By: BYK <[email protected]>

# Conflicts:
#	design/attention.md
#	design/inbox.md
#	package.json
#	packages/junior-dashboard/e2e/inbox/inbox-filters.spec.ts
#	packages/junior-dashboard/e2e/inbox/inbox-fyi.spec.ts
#	packages/junior-dashboard/e2e/inbox/inbox-todos.spec.ts
#	packages/junior-dashboard/tests/inboxCounts.test.ts
#	packages/junior-github/src/webhooks/pull-request-action.ts
#	packages/junior-github/tests/pull-request-review-again.test.ts
#	packages/junior/migrations/meta/0163_snapshot.json
#	packages/junior/migrations/meta/0164_snapshot.json
#	packages/junior/migrations/meta/0165_snapshot.json
#	packages/junior/migrations/meta/0166_snapshot.json
#	packages/junior/migrations/meta/0167_snapshot.json
#	packages/junior/migrations/meta/_journal.json
#	packages/junior/src/api/inbox-items/routes.ts
#	packages/junior/src/chat/conversations/sql/status.ts
#	packages/junior/src/chat/inbox-items/access.ts
#	packages/junior/src/chat/inbox-items/actions.ts
#	packages/junior/src/chat/inbox-items/plugin.ts
#	packages/junior/src/chat/inbox-items/store.ts
#	packages/junior/src/chat/inbox-items/tools/add.ts
#	packages/junior/src/chat/inbox-items/waiting.ts
#	packages/junior/src/chat/inbox-snoozes/store.ts
#	packages/junior/src/chat/inbox-snoozes/triggers.ts
#	packages/junior/src/chat/inbox-snoozes/viewer.ts
#	packages/junior/src/chat/todos/inbox-items.ts
#	packages/junior/src/db/schema/inbox-items.ts
#	packages/junior/tests/integration/inbox-item-tools.test.ts
#	packages/junior/tests/integration/plugin-inbox-items.test.ts
One github:pull_request item per pull request, with its ask read live
from the pull request. The subject kind and id replace the dedupe key,
Inbox search matches code change titles through the subject, and the
subject preview is back to how main has it.

Co-Authored-By: BYK <[email protected]>
@sentry-junior
sentry-junior Bot requested a review from BYK November 24, 2026 01:05
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 26, 2026 3:53am UTC

Request Review

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

…udience

Everyone means the people who can see the item's owner. An agent can now
assign a private item to Everyone, and the members of its private
Conversation see it up for grabs. People who cannot see the Conversation
still do not see it. A person's Inbox reader reads the items for Everyone
whose owner they can see, and the single-item read checks the same.

Co-Authored-By: BYK <[email protected]>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

The owner rule for items for Everyone also matched public owners, so a
person of another workspace got a public item for Everyone in their
Inbox. The rule now covers only private items. A public item reaches
Everyone through its workspace, as before.

Co-Authored-By: BYK <[email protected]>
sentry-junior Bot and others added 2 commits November 25, 2026 21:26
The To-do branch of the assignee check used the owner expression for every
subject kind, so it also planned the question lookup. It now reads the
owner from the To-do's subject id, which is all a To-do item needs.

Co-Authored-By: BYK <[email protected]>
The read now costs about 1,010. An Inbox item's owner comes from its
subject on purpose, since the item stores no owner, so each owner check
costs one more index lookup than a stored owner column.

Co-Authored-By: BYK <[email protected]>
Co-Authored-By: BYK <[email protected]>

# Conflicts:
#	design/inbox.md
#	packages/junior-github/src/webhooks/pull-request-action.ts
#	packages/junior-github/tests/pull-request-action.test.ts
sentry-junior Bot and others added 2 commits November 26, 2026 00:13
The release before this one still reads and writes dedupe_key, title,
body, owner_id and visibility, so this release keeps their NOT NULLs and
the kind, owner, tenant and visibility checks. A trigger writes those
columns for new code from the owner that it names for its transaction.
Question items keep their copy of the content, and a notice keeps its
link in subject_url. The visibility check stays, so a private item
cannot be assigned to Everyone yet.

Co-Authored-By: BYK <[email protected]>
Co-Authored-By: BYK <[email protected]>

# Conflicts:
#	packages/junior-github/src/webhooks/pull-request-action.ts
#	packages/junior-github/tests/plugin-harness.ts
#	packages/junior-github/tests/pull-request-action-harness.ts

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Main's #4398 changed the review-again text, which this branch keeps in
pull-request-item.ts. The comment-only review test uses the item subject.

Main has two migration leaves (conversation_kind_root_thread_backfill and
conversation_event_message_role_seq_index). The Inbox item migrations move
after both, and the first one follows both leaves, so there is one leaf.
This release keeps the old visibility check for rollback, so it still
refuses Everyone on an item from a private Conversation. The follow-up
release that loosens the old checks removes this Gap.

Co-Authored-By: BYK <[email protected]>
@blacksmith-sh

blacksmith-sh Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
money-units/money-units View Logs
provider-state/provider-state View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

A Participant who left a private Space no longer sees its items for
Everyone or for no one, matching Conversation access.
A card read that GitHub answered before a review webhook no longer
stores the old review decision.
…lease

An edit changes the question before the item, so the item copy gets the
new content, and a close keeps the answer on the item.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ee48698. Configure here.

A close that lands between the question write and the item write no
longer leaves the question changed on a closed item.

This branch was successfully deployed

1 active deployment
Preview – junior-docs — e03175c3 Deployed Nov 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant