Skip to content

fix(dashboard): Make each Inbox badge count what its page shows - #3691

Merged
BYK merged 12 commits into
mainfrom
fix/inbox-counts-match-pages
Nov 18, 2026
Merged

BYK merged 12 commits into
mainfrom
fix/inbox-counts-match-pages

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

People read the Inbox badges to know when they are done, but in a usability review the badges never dropped. The badges counted items on the server, while the pages show cards and sections. To do said 10 over 7 cards. Decisions said 4 over a page that said "Nothing left here". Pull requests said 3 over 12 rows under Waiting on others. Earlier also never ended, so the Inbox had no bottom.

What changes. Each badge now counts the rows that its page shows. One definition, inboxCounts(), holds the rule:

  • To do (the Inbox entry, the header, the tab, and the To do heading): one per To do card, plus the Automation alerts that the viewer did not put away. FYI notices are not in To do, so they do not count.
  • Decisions: each question row that it lists, also questions for Everyone.
  • Pull requests: each pull request under Waiting on you. A draft with an ask that waits on the viewer now shows there too.

Answered, closed, snoozed, and cleared rows leave the counts with their rows. The server count now covers only the waiting items past the loaded pages. In flight, Snoozed, and Automations do not change. There is no API or server change.

Earlier in the Inbox shows its first 10 rows and ends with "Older work is in Done". It is a fixed number, not a time window: Earlier starts where This week ends, so 7 days would leave it empty, and 30 days still grows without end for a busy viewer.

Open question. Whether the Inbox should list older Conversations at all, beyond pinned ones and ones that need attention, is still open. This PR does not change which Conversations the stream holds.

The before shots predate the FYI list from #3679.

Before After
Inbox, light
Inbox, dark
Inbox end, light
Inbox end, dark
Decisions after an answer, light
Decisions after an answer, dark
Mobile entries, light
Mobile entries, dark
Mobile Inbox end, light
Mobile Inbox end, dark

via @BYK.

--

View Session [Sentry]

sentry-junior Bot and others added 8 commits November 18, 2026 14:13
To do, the header, and the tab count To do's cards, not their items.
Decisions counts every question that it lists, and Pull requests counts
the pull requests under Waiting on you. Closed, snoozed, and cleared rows
leave the counts with their rows. The server count now covers only the
waiting items past the loaded pages.

Earlier in the Inbox shows its first 10 rows and then links to Done, so
the Inbox ends.

Co-Authored-By: BYK <[email protected]>
The Inbox now ends after the first rows of Earlier, so it no longer
reads the older feed page that failed.

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

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

# Conflicts:
#	packages/junior-dashboard/src/client/review-desk/InboxList.tsx
#	packages/junior-dashboard/src/client/review-desk/inboxData.tsx
@sentry-junior
sentry-junior Bot requested a review from BYK November 18, 2026 16:26
@vercel

vercel Bot commented Nov 18, 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 18, 2026 5:56pm UTC

Request Review

@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 18, 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.

An ask that a link names, or that an open row holds, can come from past
the loaded pages. It showed as a row, and the server count of the items
past the loaded pages still held it, so the badges counted it twice.
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

359 screenshot changes — 0 changed · 359 added · 0 removed

Review screenshots in Frameshift

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

A row whose items closed elsewhere stays while it leaves. Its items left
the shown rows, but they still came off the server remainder as waiting,
so a badge read low until the row was gone.
…h-pages

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

# Conflicts:
#	packages/junior-dashboard/src/client/review-desk/InboxList.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.

Open question. Whether the Inbox should list older Conversations at all, beyond pinned ones and ones that need attention, is still open.

I'd say it should not. Thoughts?

@BYK
BYK enabled auto-merge (squash) November 18, 2026 17:25
…s it

The feed reads by activity, and a row shows its last message. So a full
Earlier could stop the feed while a later page still held a row for
Today or This week. The feed now stops only when Earlier is full and
its oldest loaded activity is before This week.

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

sentry-junior Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Open question. Whether the Inbox should list older Conversations at all, beyond pinned ones and ones that need attention, is still open.

Agreed, it should not. The Inbox is the list of what needs you, and a finished Conversation with nothing for you is noise there. It is what made the usability report's Earlier feel endless. Conversations already lists every Conversation, and Done holds finished asks. So the Inbox would hold To do, FYI, and In flight (running plus pinned), and it would end when those do.

What this costs:

  • You lose the glance at recent activity in the Inbox. That is a click to Conversations, and with nothing to act on, that is the right place for it.
  • A new reply in a finished Conversation with no ask or notice would leave the Inbox. If replies should pull you back, the signal is an FYI notice, not the Conversation row.

If we go that way, the Earlier cap, the "Older work is in Done" link and the feed-paging rule in this PR become dead code. The follow-up would delete them. It would not add anything. I'd keep that as its own PR, so this one stays about counts.

@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 2 potential issues.

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 4d1cb9d. Configure here.

@BYK
BYK merged commit 88816bd into main Nov 18, 2026
45 checks passed
@BYK
BYK deleted the fix/inbox-counts-match-pages branch November 18, 2026 18:11
BYK added a commit that referenced this pull request Nov 18, 2026
)

Fixes two bugs that Bugbot found on #3691 after it
merged.

- **The Inbox could stop reading the feed too early.** The first feed
page also holds every pin and each Conversation that waits on the
viewer, whatever its age. The Inbox read how far back the feed went from
the oldest row it had loaded. So an old pin could stop the feed while a
later page still held a row for Today or This week. Now only a page
after the first, which holds rows by activity alone, decides that. While
only the first page has loaded, the Inbox reads the next one.
- **"Older work is in Done" showed after a failed page.** When a needed
feed page failed, the link showed while rows could still be missing. Now
Try again shows instead.

A follow-up PR drops the Inbox's time-grouped Conversation stream, so
the Inbox shows only To do, FYI and In flight. That PR also deletes the
code this one changes: the Earlier cap, the link to Done and the feed
paging rule.

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

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

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3Aa5eb5c98b535a5fa5cab8ac9580b44c0)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Aa5eb5c98b535a5fa5cab8ac9580b44c0/?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]>
BYK added a commit that referenced this pull request Nov 18, 2026
The Inbox listed every Conversation under Today, This week and Earlier,
below To do and FYI. Most of those rows need nothing from the viewer, so
the Inbox never ended, and #3691 had to add an Earlier
cap, a link to Done and a paging rule to stop it.

Now the Inbox shows only what needs the viewer: To do, Up for grabs and
FYI. The pane's In flight still shows running and pinned Conversations,
and Conversations still lists everything. The badges are unchanged.

This deletes what only the stream used: the Earlier cap, the "Older work
is in Done" link, and the Inbox's feed paging. #3708 has
not merged yet, and it changes that same code, so this PR deletes its
changes too.

| | Before | After |
| --- | --- | --- |
| Desktop dark |
![](https://junior-prod.sentry.dev/public/artifacts/2522e2d1-4349-42c7-8dde-0df18b70c2be.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/6b6df0d7-911c-470f-a48f-e0dd9da8485c.png)
|
| Desktop light |
![](https://junior-prod.sentry.dev/public/artifacts/85cc7283-133f-4bce-b53c-66b86e541361.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/bf314467-2ad6-4e11-b4d1-cb5d2299aef5.png)
|
| Mobile dark |
![](https://junior-prod.sentry.dev/public/artifacts/6beffd50-666d-43b7-a7f6-7a3d204965b7.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/2db004dd-18ac-4e40-b32b-489c956991a7.png)
|
| Mobile light |
![](https://junior-prod.sentry.dev/public/artifacts/cbb81fbb-53ca-4fe6-b8f3-7adcccddd967.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/06de2a0b-3d1e-42b8-873f-a3dc397b31c8.png)
|

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

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

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3Aa5eb5c98b535a5fa5cab8ac9580b44c0)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Aa5eb5c98b535a5fa5cab8ac9580b44c0/?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]>
BYK added a commit that referenced this pull request Nov 20, 2026
Stacked on #3392, which stores per-person snoozes of
Inbox items on the server, with event triggers.

Inbox snoozes live in `localStorage`, so they don't follow you to
another browser, and the server counts only the ids that the browser
sends in `?snoozed=`. That workaround came in with
#3035, and Bugbot flagged it in 4565199803, 4565590631
and 4565590649.

**What changes:**
- **Snooze menu** (the times from #3666, including
Custom…): `POST /api/inbox/snoozes` with a root Conversation and its
wake time, for you only. A stack's own **Snooze**
(#3704) sends the root, and the server snoozes each of
its open items. A card, or a row of one item such as an FYI notice,
snoozes only that item (`reviewItemId`). An item wakes at that time. A
later item in the row is not snoozed, so it shows by itself while the
rest stay snoozed.
- **Snoozed view:** lists its items from the server (`GET
/api/review-items?for=viewer&snoozed=true`), stacked under their root as
in To do. Only the Inbox list reads it, so other pages, such as System
People, make no extra request. Its count is the server's, one per
snoozed open item (`/api/review-items/count?include=snoozed`). **Wake**
on a card calls `DELETE /api/inbox/snoozes` for that item; the rest of
its stack stays snoozed. A notice about an ask's subject folds onto the
ask's row here too, as in To do (#3679).
- **Wake at its time:** when the snooze timer fires, the server's
versions token moves, so the versions poll brings the row back with no
reload and no browser timer.
- **Badges:** To do, Decisions and Pull requests still count the rows on
their page (#3691). A snoozed row leaves those counts
with its row.
- **Links:** an `?item=` link to an open item waits until Snoozed has
read every page. If Snoozed can't load, the link opens no row, because
it can't tell whether a snooze hides the item.
- **Failed snooze or wake:** the row comes back, or stays in Snoozed,
with an error toast.
- **Removed:** `inboxSnooze.ts` (its snooze choices move to
`snoozeChoices.ts`), the `localStorage` snooze (with main's reading of
older row snoozes from it, and its two e2e tests), the `?snoozed=` count
param and schema field, and `countOpenReviewItemsForUser`.

**Nothing breaks:** a snooze saved in the browser is dropped once, and
the row shows again.

**Not in this PR:**
- Automation alerts in To do still snooze in the browser. They are not
Review items, so a server snooze can't hide them.

### Screenshots (1440)

| | Before | After |
| --- | --- | --- |
| Snooze menu, light |
![](https://junior-prod.sentry.dev/public/artifacts/5340a194-26c8-4162-8286-d1a0657ef2e1.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/0da06961-f3c3-496b-95db-6b8f121b701e.png)
|
| Snooze menu, dark |
![](https://junior-prod.sentry.dev/public/artifacts/1630d8b8-fd3a-4b4c-bb2f-3a170c881064.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/18135023-3be3-4723-92f5-7737462ab1a9.png)
|
| Snoozed, light |
![](https://junior-prod.sentry.dev/public/artifacts/9df850ad-d562-4ddd-a803-8ab5eeb83ea2.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/48c50643-a34f-4e5f-ab9a-e3ac46548735.png)
|
| Snoozed, dark |
![](https://junior-prod.sentry.dev/public/artifacts/1d8520d2-d2f2-4cbc-b92d-17b29fa49d93.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/ba596b37-0bcd-4387-a142-7c55aae39c97.png)
|

The menu is main's (#3666); its Before shots are from
that PR, before stacks. The After shots snooze a stack with its Snooze,
then open Snoozed. The Automations page does not change.

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

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

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3Ab71939a7534128688258b50325ab830a)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Ab71939a7534128688258b50325ab830a/?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]>

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 4d1cb9db Deployed Nov 18, 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