Skip to content

feat(inbox): Show why a snoozed item woke - #3968

Merged
BYK merged 6 commits into
mainfrom
feat/inbox-wake-reason
Nov 21, 2026
Merged

BYK merged 6 commits into
mainfrom
feat/inbox-wake-reason

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

A snoozed Inbox item that wakes now says why, in a short muted line on its row and card: "Woke: #3842 is merged" or "Woke: snooze time reached". Only the person whose snooze woke sees it.

Record. junior_inbox_snoozes gets a nullable wake_reason jsonb (migration 0147): { kind: "time" } or { kind: "event", namespace, eventType, identifier }. It is set when a snooze settles as woken:

  • a timer fires, or a snooze is set to a time already past → time
  • publish fires a subject-Event or named-resource trigger → the Event, its resource and its type

A trigger with the resolve outcome closes the item, and a manual Wake records nothing, so neither shows a reason.

Show. GET /api/inbox-items adds an optional wake to open items for the viewer: { kind: "time" } or { kind: "event", eventType, resource, phrase? }. The phrase comes from the Event catalog, the same phrase the Snooze dialog uses. The dashboard moves eventSentence and sentenceCase out of SnoozeDialog into snoozeSentences.ts, so the condition ("When #3842 is merged") and the reason ("Woke: #3842 is merged") use the same code. An Event with no phrase reads "Woke: on ".

  • Item row and closed Conversation row: the line under the title.
  • Open Conversation row: the line moves to the card of the item that woke.

Clear. The reason clears when the viewer:

  • opens the item from the Inbox: expands its row, or follows its Open link. This calls the new DELETE /api/inbox/snoozes/wakes. The open row keeps the line until it closes.
  • acts on it: answer, Dismiss, take, or Done, through POST /api/inbox-items/:id/actions
  • snoozes it again

Notes for review

  • The text uses the Event's present-tense catalog phrase ("is merged"), not "was merged". Past tense would need a new phrase field in the plugin event API, so I left it out.
  • The list read gains one statement. It runs in parallel with the other payload reads, so the SQL budgets in actions.test.ts and evidence.test.ts go up by one statement. A page whose other reads issue no SQL also gains one serial round.
  • The transcript question card and the classic sidebar do not show the reason.
  • design/inbox.md states the rule.

Screenshots (mock data)

Inbox rows, one woken by an Event and one by time:

Desktop Mobile
Dark
Light

Open Conversation row, with the reason on the card of the item that woke:

Desktop Mobile
Dark
Light

via @BYK.

--

View Session [Sentry]

sentry-junior Bot and others added 2 commits November 21, 2026 20:48
When a time or an Event wakes a snooze, record why on the snooze and show
it as a muted line on the woken item's Inbox row and card, such as
"Woke: #3842 is merged". Only the viewer whose snooze
woke sees it. Opening the item from the Inbox, acting on it, or snoozing
it again clears it.

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

vercel Bot commented Nov 21, 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 21, 2026 10:11pm UTC

Request Review

@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 21, 2026

@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.

Key the opened wake by its object, not the item id, so a later wake of the
same item shows. A modified click on an item row title opens its owner, so
it clears the wake too.
@github-actions

Copy link
Copy Markdown
Contributor

26 screenshot changes — 18 changed · 8 added · 0 removed

Review screenshots in Frameshift

Automation Run Details · Desktop
Automation Run Details · Desktop
Changed
Automations Runs Filters · Desktop
Automations Runs Filters · Desktop
Changed
Conversation Row Context Menu · Desktop
Conversation Row Context Menu · Desktop
Changed
Conversation Row Context Menu Light · Desktop
Conversation Row Context Menu Light · Desktop
Changed
Conversations Pinned · Desktop
Conversations Pinned · Desktop
Changed
Conversations Pinned Light · Desktop
Conversations Pinned Light · Desktop
Changed
Show 12 more changed screenshots
Inbox Feedback Dialog · Desktop
Inbox Feedback Dialog · Desktop
Changed
Inbox Feedback Dialog Light · Desktop
Inbox Feedback Dialog Light · Desktop
Changed
Inbox Feedback Entry · Desktop
Inbox Feedback Entry · Desktop
Changed
Inbox Feedback Entry Light · Desktop
Inbox Feedback Entry Light · Desktop
Changed
Inbox Palette Feedback · Desktop
Inbox Palette Feedback · Desktop
Changed
Inbox Palette Feedback Light · Desktop
Inbox Palette Feedback Light · Desktop
Changed
Inbox Palette Pages · Desktop
Inbox Palette Pages · Desktop
Changed
Inbox Palette Pages Light · Desktop
Inbox Palette Pages Light · Desktop
Changed
Inbox Question Card · Desktop
Inbox Question Card · Desktop
Changed
Inbox Question Card · Mobile
Inbox Question Card · Mobile
Changed
Inbox Question Card Light · Desktop
Inbox Question Card Light · Desktop
Changed
Inbox Question Card Light · Mobile
Inbox Question Card Light · Mobile
Changed

# Conflicts:
#	packages/junior-dashboard/src/client/inbox/InboxRow.tsx
#	packages/junior-dashboard/src/client/inbox/RowHoverActions.tsx

@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.

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

@BYK
BYK enabled auto-merge (squash) November 21, 2026 22:11
@BYK
BYK merged commit 770e119 into main Nov 21, 2026
56 checks passed
@BYK
BYK deleted the feat/inbox-wake-reason branch November 21, 2026 22:19

This branch was successfully deployed

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