Repository navigation
fix(dashboard): Make each Inbox badge count what its page shows - #3691
Conversation
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]>
…h-pages Co-Authored-By: BYK <[email protected]>
…h-pages 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]>
…h-pages 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
…h-pages Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
|
359 screenshot changes — 0 changed · 359 added · 0 removed |
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
left a comment
There was a problem hiding this comment.
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?
…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]>
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:
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. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes 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 4d1cb9d. Configure here.
) 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]>
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 |  |  | | Desktop light |  |  | | Mobile dark |  |  | | Mobile light |  |  | <!-- 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]>
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 |  |  | | Snooze menu, dark |  |  | | Snoozed, light |  |  | | Snoozed, dark |  |  | 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]>

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: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.
via @BYK.
--
View Session [Sentry]