Skip to content

feat(inbox): Snooze an Inbox item until an Event on its subject - #3851

Merged
BYK merged 6 commits into
mainfrom
feat/snooze-event-triggers
Nov 20, 2026
Merged

BYK merged 6 commits into
mainfrom
feat/snooze-event-triggers

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #3567 and #3392: a snooze can now end on any Event type that the item's subject supports, not only at a time.

API

  • POST /api/inbox/snoozes takes triggers: [{eventType, outcome: "wake" | "resolve"}] (1–10), with or without wakeAt. One of them is required. The schema stays strict.
  • The request names no resource. The server aims each trigger at the resource that each snoozed item's subject names, so a viewer cannot wait on a resource that no item they can see names. If an item's subject has no resource, or its resource type does not support the Event type, the request fails with a 400.
  • A resolve trigger dismisses the item, so all the items must be ones the viewer can dismiss (canActOnReviewItem). Otherwise the request fails with a 400.
  • Triggers go into junior_inbox_snooze_triggers as before. Matching and the first-to-fire race (publish/hasMatch) do not change. No migration.

Resource from a subject URL (provider-neutral)

  • pluginEventsSchema gets an optional resourceForUrl(url), the inverse of resourceUrl. Core asks each Event source which resource a subject URL names. Core has no provider URL rules.
  • GitHub implements it for the repository, pull request (including subpages such as /files) and issue pages on github.com.
  • A Review item payload's subject.resource gives {namespace, resourceType, events}. events is every supportedEvents entry of that resource type, which follows the review ask to "add all event types we support". A resource type that cannot be watched gets no subject.resource.

Dashboard

  • The snooze menu shows Event… after Custom…, only when every item in the row names a resource of the same type. It has a number key, like the times.
  • The Event panel lists the resource's Events with sentence-case labels, without the resource prefix: "Checks passed", "Merged". A Wake / Dismiss toggle chooses the outcome. Dismiss shows only when the viewer can dismiss each item.
  • The Event label helper moved from ConversationWatches to a shared eventLabel.ts.

Mock data, light and dark, at 1440:

Light Dark
Menu menu light menu dark
Event panel event light event dark

via @BYK.

--

View Session [Sentry]

`POST /api/inbox/snoozes` now takes `triggers`, each an Event type and a
`wake` or `resolve` outcome, with or without `wakeAt`. The server aims
each trigger at the resource that the item's subject names, so a viewer
cannot wait on a resource that no item they see names. A `resolve`
needs a viewer who can dismiss every item.

A plugin's Event source can name the resource of a web page with
`resourceForUrl`, the inverse of `resourceUrl`. GitHub names the
repository, pull request or issue of a github.com link. A Review item's
subject lists that resource and its Event types, and the snooze menu
shows them under Event…, to wake or dismiss the row.
@vercel

vercel Bot commented Nov 20, 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 20, 2026 10:27am UTC

Request Review

@sentry-junior
sentry-junior Bot requested a review from BYK November 20, 2026 09:03
@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 20, 2026
@blacksmith-sh

This comment has been minimized.

@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 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 bab27c5. Configure here.

@BYK BYK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good start but we should also allow these on other cards too by stating which PR or issue we're watching. Even for a PR we should be able to make it wake up etc by an event happening on a different PR.

This can be a follow up or you can build it here if it changes your design and architecture fundamentally

@sentry-junior

sentry-junior Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. I've kept this PR as it is, because snoozing on another resource adds to the current design rather than changing it. That makes it a good separate follow-up:

  • API: each trigger would take an optional resource, such as a PR or issue URL that the plugin's resourceForUrl resolves, and fall back to the item's subject as it does now. A named resource needs the Watch checks: the resource type must be watchable, and the viewer must be allowed to watch it. The subject skips those checks only because the item already names it.
  • Menu: Event… would show on every card. You name the PR or issue, then pick its Event and Wake or Dismiss.

The triggers table, matching and the first-to-fire race would stay the same.

…ggers

# Conflicts:
#	packages/junior-dashboard/src/client/conversations/ConversationWatches.tsx
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

13 screenshot changes — 9 changed · 4 added · 0 removed

Review screenshots in Frameshift

Automation Run Details · Desktop
Automation Run Details · Desktop
Changed
Automation Skill Editor · Desktop
Automation Skill Editor · Desktop
Changed
Automations Runs Filters · Desktop
Automations Runs Filters · Desktop
Changed
Conversation Attachment Zoom · Mobile
Conversation Attachment Zoom · Mobile
Changed
Conversation Question · Desktop
Conversation Question · Desktop
Changed
Conversation Question Answered · Desktop
Conversation Question Answered · Desktop
Changed
Show 3 more changed screenshots
Conversation Question Light · Desktop
Conversation Question Light · Desktop
Changed
Review Item Evidence Dock · Desktop
Review Item Evidence Dock · Desktop
Changed
Review Item Evidence Dock Light · Desktop
Review Item Evidence Dock Light · Desktop
Changed

…ggers

# Conflicts:
#	packages/junior-dashboard/src/client/conversations/ConversationWatches.tsx

@BYK BYK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's do those follow ups once this PR merges.

@BYK
BYK merged commit 2c5320a into main Nov 20, 2026
54 checks passed
@BYK
BYK deleted the feat/snooze-event-triggers branch November 20, 2026 18:55
BYK pushed a commit that referenced this pull request Nov 20, 2026
…wer names (#3877)

A snooze could only wait on Events of the item's own subject, so a card
with no subject, or a PR card that depends on another PR, could not wake
when that other work moved. Now a snooze can wait on Events of any pull
request or issue the viewer can see, on a time, or on both. Builds on
#3851.

**API**
- A snooze trigger takes an optional `resourceUrl`. The plugin that owns
the page's Events reads it with `resourceForUrl`, and watchability is
checked the same way as for a Watch. The plugin's link type must also
let the viewer see the page now and read an object there:
`viewerCanViewPluginLink` uses the link type's `canView` and `resolve`,
never the web page card. For GitHub, that is the viewer's linked login
plus repository permission, and the pull request or issue must exist.
Without a URL, a trigger waits on each item's subject, as before.
- A page the viewer cannot see, a missing page, or one without Events
fails the snooze with 400.
- New `GET /api/inbox/snoozes/resource?url=` returns the Events of a
page, or 404.
- A trigger with a named page applies to every item in the row.
`resolve` still needs a viewer who can dismiss the item.
- One snooze takes up to `INBOX_SNOOZE_MAX_TRIGGERS` (30) triggers, so
every Event of one page fits.

**Event phrases**
- A plugin Event declaration can set `phrase`: how the Event reads after
its resource's name, such as `is merged` or `gets a new comment`. Core
stays free of provider wording.
- The GitHub plugin sets phrases for its pull request and issue Events.
The snooze resource payloads (`GET /resource` and an item subject's
`resource`) carry them as `phrases`.

**Dashboard**
- The Snooze menu offers 15 and 30 minutes, then the other times, then
Custom….
- Custom… opens one dialog for a time, conditions, or both. The first of
them ends the snooze.
- Conditions are built like Sentry alert conditions: Add condition adds
a row with a page and one of its Events, such as "This pull request · is
merged". A row starts on the item's own subject; on an item with no
subject, it opens the page search at once. The page button opens the
same search as the composer's `#` menu, which also takes a pasted pull
request or issue link. Wake or Dismiss applies to every condition, and
any of them ends the snooze. Rows are a list so that `AND` can join them
later.
- The search floats over the dialog, an Event select keeps its size
while its link loads, and the dialog is pinned to the top, so it grows
down without jumping.
- A link that the viewer can't snooze on shows an error, and its Event
select stays off.
- The dialog loads on first use, so the Inbox bundle stays about the
same size.

Demo, from mock data:

![Custom snooze
demo](https://junior-prod.sentry.dev/public/artifacts/3d09dafb-25e9-496a-9072-4c62e6036a5b.gif)

| | Dark | Light |
|---|---|---|
| Desktop: menu |
![](https://junior-prod.sentry.dev/public/artifacts/37c66d60-500f-4b86-b0ab-e56751d11b71.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/920fc110-7891-4d5a-9a14-2f4c28e10dd5.png)
|
| Desktop: conditions on the row's PR |
![](https://junior-prod.sentry.dev/public/artifacts/8aaad21d-9d7c-4ed1-9daa-04d1b43b3a03.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/6428cbdd-3f6c-45e4-8316-0b74a919eb7f.png)
|
| Desktop: PR search |
![](https://junior-prod.sentry.dev/public/artifacts/3f89841d-7261-48ea-8a30-8c6b03a63cee.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/b6afe73d-dc7e-4683-b8e7-50ec92e502df.png)
|
| Desktop: time and another PR |
![](https://junior-prod.sentry.dev/public/artifacts/a0258067-4a18-4751-8ae6-5fd281cf4790.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/e573f974-e3fe-4131-85ab-0549cbb471e6.png)
|
| Mobile: the row's PR and a pasted issue |
![](https://junior-prod.sentry.dev/public/artifacts/10bf5073-e9cf-4eb9-b60a-d1d3dd29813a.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/69267afa-e54b-4dfb-8251-8e81377afca6.png)
|

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

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

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A77b39812ae242b4588c9a0c8db5b1a8c)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A77b39812ae242b4588c9a0c8db5b1a8c/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>

This branch was successfully deployed

1 active deployment
Preview – junior-docs — e6dbeb02 Deployed Nov 20, 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