Skip to content

fix(dashboard): Show only Review items that wait on you in Needs you - #3046

Merged
BYK merged 3 commits into
mainfrom
fix/dashboard-needs-you
Nov 10, 2026
Merged

BYK merged 3 commits into
mainfrom
fix/dashboard-needs-you

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Refs #3030

#3037 added a mock that reports waiting Conversations, so this PR also moves that mock to the new items shape (mock-reporting/review-items.ts).

"Needs attention" mixed three signals: Review items that wait on you, unread messages, and any open PR while Junior was idle. Rows jumped into it for an ack from Junior or for a PR nobody needed to touch. This PR narrows the section to one rule and renames it Needs you.

The rule

A Conversation is in Needs you when it has an open action Review item assigned to you. That rule already existed (reviewItemNeedsUser, /api/review-items/waiting-conversations). This PR makes it the only input:

  • Unread no longer moves a row. The unread dot and bold title stay as they are (the row-marker redesign is Keep the dashboard conversation list order stable #3032).
  • Open PR while idle (unfinishedWork) no longer counts. The client field is deleted. The server field stays because auto-archive and Priority use it.

The same rule drives the Inbox count, the Inbox "Needs you" group, and the Board, so one item shows the same way everywhere.

PR asks become Review items

Plugins already put items on the review desk through PluginConversationReviewItems. A plugin can now mark an item as an ask with waitsOnAssignees: true. Core stores it as an action with no question, so the existing rule counts it. I did not add a separate hook. A second channel would count the same fact twice, and the review desk already owns assignment (Participants, #3021), dedupe, visibility, close, and the Slack card.

  • Schema: the junior_review_items_kind_check constraint now also allows an action with no request when its dedupe key starts with plugin: (migration 0098_review_item_plugin_actions). An agent's action still needs a question.
  • Replies: reply matching skips plugin items (listReplyActionItems). The plugin closes them when the provider state changes, so a "merged it, thanks" reply cannot close one by mistake.
  • GitHub, Ready to merge: the existing item becomes an ask, titled Ready to merge · #946. It closes when the PR merges, closes, or stops being ready, as before.
  • GitHub, Review requested (new): when GitHub requests a review on a Junior PR from the requester (matched through their linked GitHub account), the plugin adds Review requested · #946 to the requester's Conversation. The ask updates in place on a new request (same dedupe key). It closes when they submit a review, when the request is removed, or when the PR closes. Every fact comes from the webhook payload, so the ask needs no GitHub read and no new table. Team requests are skipped.

Row chip

The chip keeps its place and its ?review=open link. It shows the newest title with "+N more". A plugin item shows the plugin's mark (GitHub) in place of the Inbox icon. The accessible Tooltip lists every waiting title in full, with no native title attribute. The API now returns items: [{ title, plugin? }], newest first, in place of title and count.

Before After
Before: Needs attention holds unread and open-PR rows After: Needs you holds only the waiting row
Before: chip, light After: chip with GitHub mark, light

Tooltip with every waiting item:

Chip tooltip

All shots come from the mock-mode e2e harness (conversations-attention.spec.ts). The "after" mock has a GitHub ask plus an agent question on one Conversation.

Things to know

  • Board: "Ready" still means an open plugin item about the change. I dropped the kind = notice filter so it keeps working after the cutover. A PR waiting on the requester's review now also shows as Ready. That is a guess the Board already names in columns.ts.
  • Cutover: Ready-to-merge notices that are open now stay notices until the PR's readiness changes. Until then they show as FYI, not Needs you. I did not backfill, because a core migration would need to name a GitHub dedupe key.
  • Collapsed section state: the section key changes from attention to needs-you, so anyone who collapsed it sees it expanded once.

Follow-ups (why this says Refs, not Fixes)

  • Reviews on PRs Junior did not open. A colleague's PR has no Conversation to hold the ask, and Junior maps a GitHub login to a person only through a linked account. Doing this needs Review items without a Conversation (or an Inbox-only home) and a login → Identity lookup in the plugin API.
  • Review requested from someone other than the requester on a Junior PR. Same login → Identity gap.
  • Changes requested. On a Junior PR, Junior handles that feedback, so it is not an ask of the viewer today. It needs a product decision.

Likely conflicts

Frameshift changes

I pulled the baseline, candidate, and diff images for ed2372e9a (report on 085c4f39c). I measured where each of the 59 changed pairs differs, and I looked at every pair that changed outside the conversation list.

Count Cause Status
44 Conversation list only, desktop and mobile. Rows that were unread or had an open PR leave the waiting section, and the section is renamed "Needs you" (collapsed count 3 → 1). Row menus and row tooltips move with their row. Expected
4 conversations-pinned and conversation-sidebar-review-chip, dark and light. The chip shows the GitHub ask with the GitHub mark. Intended
6 List changes plus noise: conversation-unsent-answers desktop (transcript scroll), share-details and event-log-virtual (a header tooltip shows), and captured-memories-popover, details-watched-linked-work, and push-notifications-tip (another video frame). Expected + noise
5 Noise only: conversation-unsent-answers mobile and long-transcript-touch (transcript scroll), memories mobile (chart hover tooltip), settings-mcp (random port), and automation-page (the rail ends 10px short in a 910px capture). Noise, not from this PR

How I checked the noise:

  • conversation-unsent-answers: I ran it 3 times on main and 3 times on this branch. Both flip between the same two transcript scroll positions.
  • automation-page: it renders the same pixels on main and on this branch locally, so the CI difference does not come from this PR.

One finding, now fixed in 48b9d20c0: the new tooltip check hovered the chip before the existing conversation-sidebar-review-chip shots, so they captured the row's hover actions. The plain shots now come first, and the tooltip shot follows. The "after" chip shot above is retaken from the fixed order.

Testing

  • Integration: plugin-review-items.test.ts (a plugin ask waits on its assignee, counts, carries the plugin name, and a reply does not close it), review-items/actions.test.ts (new items shape), board.test.ts.
  • GitHub plugin: new pull-request-review-request.test.ts through the real webhook route (requester match in any case, other people and teams skipped, close on review or removal, update in place on a new request), and the updated pull-request-ready.test.ts.
  • Dashboard unit: conversationSections.test.ts.
  • Dashboard e2e: conversations-attention.spec.ts (Needs you, unread stays in place, chip mark and tooltip) and conversation-threads.spec.ts. Full e2e run: 132/133 passed. The one failure (conversations-event-log) timed out under 4 workers and passes alone.
  • pnpm typecheck, pnpm lint, pnpm file-length:check. The full test suites for junior-github and junior-dashboard pass, and so do the core API and review-item integration tests.

via @BYK, @dcramer.

--

View Session [Sentry]

@vercel

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

Request Review

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

74 screenshot changes — 69 changed · 3 added · 2 removed

Review screenshots in Frameshift

Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Attachment Zoom · Desktop
Conversation Attachment Zoom · Desktop
Changed
Conversation Attachment Zoom · Mobile
Conversation Attachment Zoom · Mobile
Changed
Conversation Captured Memories Popover · Desktop
Conversation Captured Memories Popover · Desktop
Changed
Conversation Captured Memories Popover · Mobile
Conversation Captured Memories Popover · Mobile
Changed
Conversation Child Agent Drawer · Desktop
Conversation Child Agent Drawer · Desktop
Changed
Show 12 more changed screenshots
Conversation Child Agent Page · Desktop
Conversation Child Agent Page · Desktop
Changed
Conversation Child Agents · Desktop
Conversation Child Agents · Desktop
Changed
Conversation Create Focused · Desktop
Conversation Create Focused · Desktop
Changed
Conversation Create Focused · Mobile
Conversation Create Focused · Mobile
Changed
Conversation Detail · Desktop
Conversation Detail · Desktop
Changed
Conversation Details Watched Linked Work · Desktop
Conversation Details Watched Linked Work · Desktop
Changed
Conversation Event Details · Desktop
Conversation Event Details · Desktop
Changed
Conversation Event Details Mobile · Desktop
Conversation Event Details Mobile · Desktop
Changed
Conversation Event Log · Desktop
Conversation Event Log · Desktop
Changed
Conversation Event Log Virtual · Desktop
Conversation Event Log Virtual · Desktop
Changed
Conversation Fork Dialog · Desktop
Conversation Fork Dialog · Desktop
Changed
Conversation Fork Links · Desktop
Conversation Fork Links · Desktop
Changed

51 more changed 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.

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 470f3a7. Configure here.

@sentry-junior
sentry-junior Bot force-pushed the fix/dashboard-needs-you branch from 14aa1f9 to 7cda2a9 Compare November 10, 2026 20:29
Base automatically changed from feat/dashboard-composer-questions to main November 10, 2026 22:22
sentry-junior Bot and others added 3 commits November 10, 2026 22:26
Needs you (was Needs attention) now holds only Conversations with an open
action Review item assigned to the viewer. Unread and open pull requests
no longer move a row.

Plugins can put asks on the review desk with waitsOnAssignees. The GitHub
plugin uses it for Ready to merge and for a review requested from the
requester on a Junior pull request. The row chip shows the plugin mark
and a tooltip with every waiting title.

Refs #3030

Co-Authored-By: BYK <[email protected]>
Co-Authored-By: David Cramer <[email protected]>
A reopened pull request sends no new review_requested event, so the ask
came back only on a new request. Read requested_reviewers on reopen.

Plugin asks have no question, so the review desk labels them Waiting on
you instead of Needs an answer.

Co-Authored-By: David Cramer <[email protected]>
Co-Authored-By: BYK <[email protected]>
@sentry-junior
sentry-junior Bot force-pushed the fix/dashboard-needs-you branch from 7cda2a9 to 50c472b Compare November 10, 2026 22:36
@BYK
BYK merged commit cb8de68 into main Nov 10, 2026
45 checks passed
@BYK
BYK deleted the fix/dashboard-needs-you branch November 10, 2026 23:48
BYK added a commit that referenced this pull request Nov 10, 2026
Fixes #3032

**Stacked on #3046** (stack
[#3058](https://github.com/getsentry/junior/stack/3058): #3037 → #3046 →
#3047 → #3035 → #3036). #3046 owns who is in Needs you; this PR owns the
order. Review the diff against `fix/dashboard-needs-you`.

The conversation list moved under the reader's pointer. Every event
moved a row, and the waiting section put the newest activity first, so a
queue you were working through kept changing order. This PR fixes the
order and cuts the row markers to three channels.

## Order

- **Needs you: the oldest wait goes first.**
`/api/review-items/waiting-conversations` now returns `waitingSince`
next to #3046's `items`. It is the `createdAt` of the conversation's
oldest open item for the viewer. New activity no longer moves the queue.
- **Date sections: sorted by the last Message.** Feed rows get
`lastMessageAt`, which is the newer of the last true user Message and
the last Junior reply that the transcript shows. Like the unread reply,
it skips tool calls, status changes, Events, and quiet replies, so they
don't move a row. It also skips progress acks (`meta.progress`). That
exclusion starts working when #3044, a separate PR, lands on main; until
then nothing writes the flag. The row age and the home card time show
this time too. A row with no Message yet uses `lastSeenAt`.
- `pinnedAndWaitingFirst` sorts the same way before paging, so pages
split where the sections do.

## Hold while you work in the list

- **One list component.** The sidebar and the home card list both render
through `ConversationSectionList`. It builds the sections, holds the
order, shows the pill, and owns pin reorder. Each list keeps only its
own row look. A dashboard lint rule (`no-restricted-imports` in
`.oxlintrc.json`) allows `buildConversationSections` and `heldListOrder`
only in that component, so a new list can't skip the hold.
- While the pointer is over the list, or focus is in it, rows keep their
section and position. The hold covers the whole list area, including its
padding and scrollbar, from the first paint. Their data still updates:
bold, dot, spinner, and the review chip.
- An **"N updated"** pill offers the new order. N is the number of rows
that the new order would add or move, using the longest increasing run,
so moving one row counts as 1. Clicking the pill applies the new order.
So does moving the pointer out once focus has left the list.
- **Row actions apply at once.** Pin, unpin, reorder, archive, and mark
read/unread release the hold, so you see their result. Opening a row
does not release it, so the row you just read stays where it was.
- The hold starts only after the feed and waiting reads finish. A
pointer resting on the list during a page load does not hold back the
first rows.
- Rows that sort after every held row, such as the next page of the home
list, show at the end. Loading more doesn't wait on the pill.
- Touch has no hover, so only a mouse or pen holds the order. On a phone
only focus holds it. The pill fades in only under `motion-safe`.
`AnimatedList` is unchanged and still animates rows in and out.

| Held, dark | Held, light |
|---|---|
| ![held
dark](https://junior-prod.sentry.dev/public/artifacts/f5a599c1-6e8f-4543-ab60-a56afe5f3b36.png)
| ![held
light](https://junior-prod.sentry.dev/public/artifacts/eda95dc0-593b-48e3-881a-d950499433cb.png)
|

In these shots, *Checkout latency triage* has started waiting. It gets
its dot, bold title, and chip in place, and the pill offers to move it
into Needs you.

The home card list in a 700px window with a mouse, held and then
applied:

| Home held, dark | Home held, light | Home applied, light |
|---|---|---|
| ![home held
dark](https://junior-prod.sentry.dev/public/artifacts/cbbd0b9a-dfd0-4daf-b080-87073152ab12.png)
| ![home held
light](https://junior-prod.sentry.dev/public/artifacts/0bcad92c-a41e-41a8-9e12-e456bd57c8ca.png)
| ![home applied
light](https://junior-prod.sentry.dev/public/artifacts/fa98bf81-1522-43ae-bd52-0d783c7a5906.png)
|

## Three marker channels

- **Position:** the section, such as Needs you.
- **Read state:** a dot plus a bold title. This is one channel, so
unread and waiting rows keep both. The separate violet "waiting" dot and
orange "unread" dot are now one accent dot. The section and the review
chip already show that a row is waiting.
- **Motion:** the running spinner.
- **Secondary text:** the private lock, and "Failed" or "Stopped", sit
beside the age, not in the marker slot. The idle glyph is gone.

This applies to the sidebar, the home and mobile list cards, and the
Code page's recent conversations rows. Thread rows under a parent keep
their own child status icon, which is unchanged.

### Mark as unread does not change

Every read/unread control works as on `main`:
- The dot slot in the sidebar is still the read toggle. It shows on
unread rows, shows a preview on hover or focus, and has the "Mark as
read/unread" tooltip.
- The row context menu still has Mark as unread/read.
- The mobile conversation menu still has Mark as unread.

This PR adds no shortcuts. The only change is that these actions release
the hold, so the row moves right away.

| Needs you, before / after (dark) | Sidebar, before / after (light) |
|---|---|
| ![sidebar
dark](https://junior-prod.sentry.dev/public/artifacts/936c7451-ad99-4aa4-9c0e-50df3375199d.png)
| ![sidebar
light](https://junior-prod.sentry.dev/public/artifacts/5e81feda-c192-43c6-9772-76acba321746.png)
|

| Read toggle on hover, before / after | Row menu, before / after |
|---|---|
| ![read
toggle](https://junior-prod.sentry.dev/public/artifacts/81379f03-ee8a-4061-9bef-e651d985c69b.png)
| ![context
menu](https://junior-prod.sentry.dev/public/artifacts/d195f5af-cd4e-41bd-8dbb-d812984a7cfd.png)
|

Before is #3046 (`470f3a73f`). In the read toggle and row menu shots,
Needs you now lists the longest wait first, so *Plan the billing
migration* moves above *Roll out payments-v42*.

| Mobile list, before / after | Mobile Needs you, before / after |
Mobile conversation menu |
|---|---|---|
| ![home
mobile](https://junior-prod.sentry.dev/public/artifacts/e1a889a2-4abf-4f7a-a1e4-64a3d8b6b472.png)
| ![needs you
mobile](https://junior-prod.sentry.dev/public/artifacts/5287b9d9-092b-40ba-80c6-8851b811058f.png)
| ![mobile
menu](https://junior-prod.sentry.dev/public/artifacts/42a266e4-603c-466c-9bf6-84cc312c0591.png)
|

On mobile, "Failed" is now text beside the time, not a rose dot on the
tile. A running card shows one spinner, in place of the time, not a
second one on the tile. The waiting card's dot is the same accent dot as
unread, not the glowing violet one.

## Pins stay manual

Pins don't change, and nothing pins on its own. For diagnosis, a pin
change tags its request span with `app.conversation.pin.action` (`pin`,
`unpin`, or `reorder`) and `app.conversation.pin.count`, which is the
viewer's pin count after the change. The names and a query recipe are in
`TELEMETRY.md`. The browser still sends only spans and ratings.

## Notes for reviewers

- **Ordering on top of #3046:** in `conversationSections.ts`,
`buildConversationSections` and `pinnedAndWaitingFirst` now take
`waiting` (the waiting map with `waitingSince`) in place of #3046's
`waitingIds` set. Membership is unchanged: a row is in Needs you only
when it is in that map.
- **Feed query cost:** the feed reads `lastMessageAt` from a new
`junior_conversations.last_message_at` column, so it adds no per-row
event reads. Recent perf work on main took two routes: #3006 caches
usage sums in Redis with a seq watermark, and #2761 reads previews
through bounded index walks. I chose a column over a Redis cache because
this time changes only when a Message is appended, and the append
already writes the Conversation row in its transaction. So there is
nothing to invalidate or watermark.
- **Write:** `refreshLastMessageAt` (`sql/last-message.ts`) runs in the
append transaction, only when the append adds a `message` or
`user_message` event. It does the three index walks once per append, not
once per root on every feed read.
- **Migration `0099_conversation_last_message_at`:** adds the nullable
column, with no backfill. An update of every root would lock the rows
that appends write (the `migration-locks` check rejects it). A row with
no stored time reads it from its events in `coalesce`, which skips that
read for every row that has one. Old idle rows drop out of the feed page
over time.
- **API change:** `waitingSince` is a required field on the strict
waiting-conversations schema. The dashboard is the only consumer. The
e2e mocks and `mock-reporting/review-items.ts` send it.

## Frameshift changes

Report for `8e5f8c40a`: 67 changed and 3 added. I measured every pair
and looked at each one that changed outside the sidebar rows.

| Count | Cause | Verdict |
|---|---|---|
| 45 | The private lock on *Direct Message* moves from the leading slot
to beside the age. This is the only change. | Expected |
| 8 | The same lock move, plus noise elsewhere: transcript scroll
position (4), a different demo video frame (3), or a "Conversation
details" tooltip (1). | Expected, plus noise |
| 5 | Mobile home cards: one accent dot for unread and waiting, and
"Failed" as text. The cards also showed a bug: an empty status slot
added a flex gap, so every title cut off 12px early. Fixed in
`a63504507`. | Expected, bug fixed |
| 2 | The Code page recent rows lose the idle dot. | Expected |
| 7 | Noise only: transcript scroll (4 mobile), a chart tooltip on a
different day on Memories, the random MCP port, and the nav rail height
in one full-page capture. | Noise |
| 3 added | `conversations-list-held` (dark and light) and
`conversation-menu-mark-unread` (mobile). | New in this PR |

I checked the noise locally against `main` where it was cheap.
`conversation-unsent-answers` (desktop and mobile) is the same on the
branch and on `main`, except for the lock, in two runs each.
`automation-page` differs between two runs of the branch, and one of
them matches `main`.

## Testing

- **Unit:** the `conversationSections` wait and last-Message order, and
the new `heldListOrder` tests (held order, pending count, new and
removed rows).
- **Integration (Postgres):**
- `unread.test.ts`: a quiet reply or a progress ack doesn't move
`lastMessageAt`, and a shown reply does. The append stores the time on
the row, and a row with no stored time still reads it from its events.
- `review-items/actions.test.ts`: `waitingSince` is the oldest item's
time.
  - `list.test.ts` and `pin.test.ts` pass.
- **E2E:**
- New: "holds the order under the pointer and offers the new one". It
checks the hold, the pill, applying on click, and applying on leave plus
blur.
- New: "holds the home list order under the pointer", in a 700px window
with a mouse.
- New: "holds the order for a pointer on the list edge through the first
load". It fails on `51a864b37`, before the hold covered the whole list
area.
- `conversations.spec` "scrolls long conversation and transcript panes
independently" now finds the sidebar scroll area by its slot, because
the list has a wrapper.
  - The mobile mark-unread test now saves a menu screenshot.
- The `conversations-attention` spec passed 3 times in a row with 3
workers.
- **Full dashboard e2e:** 144 of 146 passed with 4 workers.
`conversations-attention` "puts waiting conversations in Needs you
first" timed out under load and passes on its own. The scroll test
failed on the old locator and passes with the fix.
- **Checks:** `pnpm typecheck`, `pnpm lint` (with `migration-locks`,
`file-length`, and `test-architecture`), and the dashboard unit suite
(432 tests) pass. Full integration: 926 passed.
`any-resource-event-automations` times out here with or without this
change, and `attachment-s3-storage` needs a local S3 server.

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

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

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A8bfa5732f44bc4f91116d3ee1be8f6d7)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A8bfa5732f44bc4f91116d3ee1be8f6d7/?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 — 50c472b8 Deployed Nov 10, 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