Skip to content

feat(dashboard): Ask Review item questions in the composer - #3037

Merged
BYK merged 11 commits into
mainfrom
feat/dashboard-composer-questions
Nov 10, 2026
Merged

BYK merged 11 commits into
mainfrom
feat/dashboard-composer-questions

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

When Junior asks a question (an open action Review item that waits on the viewer), the question now docks directly above the message box. Before, a full card appeared in the transcript at the tool-call position, above Junior's final message, and the message box and queued messages were hidden until the reader answered or dismissed it.

What changes

Docked question (review-desk/ComposerQuestion.tsx)

  • Shows every open question in the Conversation that the viewer can answer, oldest first. When more than one is open, the header shows "1 of N" with previous and next buttons.
  • Header: title and Dismiss. Esc dismisses when focus is in the question and not in a text field.
  • Single choice questions show their choices as buttons with number hints. Keys 1–9 pick one. The hints use aria-keyshortcuts.
  • multi_choice and text fields stay inline. The docked form has no note field ("Anything else?"), no Other…, and no Send of its own: the message box is the one place to write and send. Its placeholder changes to "Or type your answer…".
  • When the question has focus, typing a printable key moves focus to the message box, so the key starts the answer there.
  • After an answer, the next question takes focus. When none are left, the message box does.
  • A palette or list switch into a waiting Conversation focuses the question on desktop, so number keys work at once. On touch screens nothing takes focus, as before.
  • On mobile, the question sits in the ComposerDock above slot. It rides the keyboard with the message box and scrolls inside the dock when it is tall.

Message box

  • The hide-composer logic is gone from ConversationReplyFooter: the reviewItemId prop, composerShownForItemId, focus tracking, and the hidden wrappers. The message box and queued messages always show.
  • A typed message still answers through the existing server path: api/conversations/create.ts → closeReviewItemsAnsweredByReply. That path matches the reply to open questions with the decision model and closes the matches with the reply as other. Coverage for it already exists in tests/integration/slack/review-item-card-webhook.test.ts (dashboard post) and in the review-item-replies classifier eval. This PR does not change that path.
  • One Send. Send in the message box first sends the picks of every docked question that has them, then the typed message. The server matches that message to the questions still open. A reader can pick answers for some questions and type the answer for another in one send. Send is enabled when only picks wait. If an answer fails, the draft and the picks stay so the reader can retry.
  • The "Send without your answers?" confirm now applies only to picks in the details panel, because those do not go with a message.
  • Respond (selection quote) uses the same appendText handle. The box is always visible now, so the quote always lands.

Transcript

  • The full ReviewItemCard at the tool-call position is replaced by a one-line record: "Asked title", then "Waiting on you", the one-line answer, or "Dismissed". The title links to the review desk. If the viewer cannot read the item, the raw tool frame shows as before.
  • transcriptListRows moves each ask to the end of its Turn, after the final message, so the reader sees why before what. The moved row takes the seq of the row before it, so row order stays monotonic for rowIndexForSeq and the New marker. Activity on both sides of an ask stays one group.
  • TranscriptReviewItemCard and the pin-start scroll mechanism in transcriptBottomPinning.ts are deleted. The card was their only consumer.
  • The review desk and the details panel still use ReviewItemCard and ReviewItemActions unchanged. The Inbox page and the app shell are not touched.

Mock mode

  • mock-reporting/review-items.ts serves Review items from process-local state. It has two new Conversations:
    • Roll out payments-v42: one open choice question, plus an earlier question that was answered by a typed reply.
    • Plan the billing migration: three open questions (described choices, multi_choice plus text, plain choice).
  • Actions change the state. A mock send closes the oldest open question in its Conversation, as a stand-in for the decision model.
  • The e2e harness resets this state.

Review follow-up: one Send

@BYK pointed out that the docked form and the message box both send to the agent. The form's "Anything else?" note and the message box were redundant, and a reader could not type an answer and also answer some of the questions. The docked form now has no note and no Send. The message box sends the picks first, then the typed words. The stepper and the placeholder are unchanged.

Picks in the docked form plus a typed answer, sent together

The details panel form keeps its own note and Send. Its picks still ask before a message drops them:

Confirm for details panel picks

Scroll to context

The docked question now shows where Junior asked it. A step with Previous or Next, an answer that moves to the next question, or a click on the question title scrolls the transcript so that question's "Asked …" record sits in the middle. The record gets a short violet ring, the same ring style that ConversationReviewItems uses.

  • A question that docks by itself during a live Turn moves the transcript only while it follows the latest, and then only far enough to show the record. A reader who scrolled up stays where they are.
  • Opening a Conversation keeps today's start: the latest message or the "New" marker.
  • With prefers-reduced-motion, the transcript jumps instead of a smooth scroll. Only the transcript scrolls, never the page. This is checked on desktop and on mobile.
  • The scroll goes through the bottom-pinning owner (showRow in transcriptBottomPinning.ts). It updates the saved place, so a dock resize does not pull the reader back.
  • A record outside the loaded rows opens the page around its Turn, as a Turn link does (openLink). There is no new paging path. While a search hides the record, or in the event log, nothing scrolls. A question added from a child Conversation has no record here, so it does not scroll either.

A step moves the transcript to the question's record (desktop)

The same on mobile

A page of questions that fails to load

If a page of open questions fails to load, the footer says "Some questions did not load." with Try again. Before this, the dock treated the list as complete, so questions on that page and later ones never docked.

Desktop Mobile
Desktop: Some questions did not load, with Try again, above the message box Mobile: Some questions did not load, with Try again, above the message box

Why

  • Mapping (Norman, The Design of Everyday Things). The control that answers a question should sit where the answer goes. The old card answered in the transcript, but the message box, the one control people use to talk to Junior, was hidden. Docking the question on the message box puts every way to answer (click, key, or typed words) in one place.
  • Mode errors (Norman). Hiding the message box created a hidden mode: the reader had to answer the card before they could talk again, and nothing said so. Moving focus into the box showed it again, so the same action had two results. The new layout has no mode: the box is always there, and a typed reply is a valid answer.
  • Nielsen heuristic ref(capabilities): Move jr-rpc to bash custom command path #3, user control and freedom. Esc dismisses and the box stays usable. People can step out of a question without hunting for the card in scrollback.
  • Nielsen heuristic test issue #4, consistency and standards. The question now looks and acts like the rest of the composer dock (queued messages, pending auth). The ask also follows the agent-tool convention:
  • Why before what. A record after the final message keeps the transcript in reading order. The old card sat above the reasoning that motivated it.

Screenshots

Single choice question, dark and light:

Single choice question, dark
Single choice question, light

Several open questions, "2 of 3" (multi_choice plus text), dark and light:

Question stepper, dark
Question stepper, light

A typed answer in the message box:

Typed answer

Answered: the transcript records show both answers, and the box is back to "Message Junior…":

Answered transcript record

Mobile, dark and light, and a tall form that scrolls inside the dock:

Mobile question, dark Mobile question, light Mobile tall form

Supersedes #2533's hide-composer approach

#2533 (for #2508) hid the message box and queued messages while a question waited, so the question was the last thing on the page. This PR removes that hiding. Each #2533 concern is still covered:

  • Draft text and images stay. The message box no longer hides or unmounts, so its text and images stay through a question, an answer, and a Dismiss.
  • Stop is available during a Turn. The message box always shows, and onStop still depends only on stoppable.
  • A tall card pinned at its end (Start of a new review item card is off screen in transcript #2508). The transcript shows only a one-line record, so nothing tall is pinned. The docked form scrolls inside the dock: up to 50vh on desktop, and the dock's 55% cap on mobile. Its title and question stay in view. The tall-question e2e checks this on desktop and mobile.
  • The question is the obvious next thing. It sits in the fixed dock directly above the message box. It stays in view at any transcript scroll position, and it takes focus after a palette or list switch on desktop.
  • Answering never needs a mode switch. fix(dashboard): Lead the reader to a new review item question #2533 needed rules such as "do not hide while focused" and "Dismiss brings it back". With no hidden state, those rules are no longer needed.

Testing

  • New e2e/composer-questions.spec.ts, run against the mock Conversations:
    • The question docks with the message box visible, desktop and mobile.
    • The transcript record shows the open state, then the answer.
    • The stepper keeps picks across steps. A number key answers one question; then picks on another plus a typed message go out in one Send, picks first, and the typed words answer a third.
    • A typed key moves to the message box, and a typed message answers.
    • Respond lands in the box under a question.
    • Scroll to context, desktop and mobile: load does not scroll; Previous/Next scroll to and mark the record; the title click jumps back; an answer moves to the next question and its record; the page itself does not scroll.
    • A question that docks while the reader is scrolled up does not move the transcript.
  • Updated scenarios:
    • Tall question in conversations-event-log.spec.ts: docked, Esc dismiss, record says Dismissed.
    • Palette switch in command-palette.spec.ts: the question takes focus.
    • review-desk.spec.ts: docked picks go out before the typed message with no confirm; picks in the details panel still get the confirm.
  • tests/transcriptListRows.test.ts: asks move to the end of their Turn, seq order holds, and activity merges around them.
  • Checks: pnpm --filter @sentry/junior-dashboard typecheck, the dashboard vitest suite (425 tests), pnpm file-length:check, test-architecture:check, dashboard-style:check, dashboard lint, ast-grep:lint.
  • Full dashboard e2e: 135 of 138 passed with 4 workers. The 3 that timed out under load (conversation-send, conversations-event-log inspect, conversations views) pass when rerun alone.

Frameshift changes

I diffed each of the 103 changed screenshots against its baseline (report for f56e1f0):

  • 85: the two new mock Conversations and the Inbox count.
    • 28 show only the Inbox count on the navigation rail.
    • 10 show only the Inbox count in the top bar.
    • 47 show the Conversation list, desktop and mobile, with the two new rows. In some of these the row under the cursor also changes, because the rows below the new ones move down.
  • 4: the docked question, as intended.
    • conversations-pinned (dark and light): the open question docks above the message box.
    • conversation-unsent-answers (desktop and mobile): the confirm now covers the docked form, and the transcript shows the "Asked …" record. The details panel lists only this Conversation's items, because the review-desk.spec.ts mock now applies the conversationId filter.
  • 2: report totals. On locations (desktop and mobile), private Conversations go from 4 to 6, because the new mock Conversations count as private.
  • 15: noise that also happens on main.
    • Five conversation-attachment views and conversation-long-transcript-touch stop at a different scroll position.
    • conversation-share-details and conversation-event-log-virtual show or hide a hover tooltip.
    • Four views catch a different video frame.
    • settings-mcp has a random port.
    • person-profile was captured before its charts loaded.
    • settings-notifications differs only in anti-aliasing.
    • For the attachment, long-transcript, and share views, I ran the specs twice on main: main differs from itself in the same areas.

No layout, spacing, or transcript change appears outside the question rows and the docked question.

Follow-ups (out of scope)

  • Notices and action items without a request do not dock. Their transcript record links to the review desk.
  • The details panel "Needs you" list still repeats the open question. That belongs with the Inbox bundles work.

Mock preview: JUNIOR_DASHBOARD_MOCK_CONVERSATIONS=true pnpm dev, then open Roll out payments-v42 or Plan the billing migration.

via @BYK.

--

View Session in 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 8:51pm UTC

Request Review

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

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

130 screenshot changes — 109 changed · 16 added · 5 removed

Review screenshots in Frameshift

Automation Attention · Desktop
Automation Attention · Desktop
Changed
Automation Details Failing · Desktop
Automation Details Failing · Desktop
Changed
Automation Details Failing Light · Desktop
Automation Details Failing Light · Desktop
Changed
Automation Details Healthy · Desktop
Automation Details Healthy · Desktop
Changed
Automation Editor · Desktop
Automation Editor · Desktop
Changed
Automation Editor Conflict · Desktop
Automation Editor Conflict · Desktop
Changed
Show 12 more changed screenshots
Automation Editor Public · Desktop
Automation Editor Public · Desktop
Changed
Automation Event Editor · Desktop
Automation Event Editor · Desktop
Changed
Automation Event Editor Any Resource · Desktop
Automation Event Editor Any Resource · Desktop
Changed
Automation Page · Desktop
Automation Page · Desktop
Changed
Automation Page Light · Desktop
Automation Page Light · Desktop
Changed
Automation Paused · Desktop
Automation Paused · Desktop
Changed
Automation Run Details · Desktop
Automation Run Details · Desktop
Changed
Automation Run Details Light · Desktop
Automation Run Details Light · Desktop
Changed
Automation Runs · Desktop
Automation Runs · Desktop
Changed
Automation Skill Editor · Desktop
Automation Skill Editor · Desktop
Changed
Automation Skill Missing · Desktop
Automation Skill Missing · Desktop
Changed
Automation Skill Picker · Desktop
Automation Skill Picker · Desktop
Changed

91 more changed screenshots in Frameshift.

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

The composer and the question dock both send messages to the agent so they should not be separate. The "Anything else?" and "Or type your answer" boxes serve the same thing and are redundant but even worse a user cannot "type their answer" and also answer some of the questions. We should fix this scenario.

I liked your multi question system and the placeholders though.

@dcramer

dcramer commented Nov 9, 2026

Copy link
Copy Markdown
Member

how is this going to work if there are a dozen review items?

@sentry-junior

sentry-junior Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in d3dc670. Send in the message box now sends the docked picks first, then the typed message. The docked form's "Anything else?" note and its own Send are gone, so you can pick some answers and type the rest in one send. The stepper and the placeholders are unchanged. Screenshots are in the PR body under "Review follow-up: one Send".

@sentry-junior

sentry-junior Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

@dcramer Here's how it handles a dozen open items:

  • One question at a time. The dock shows the oldest open question first, marked "1 of 12", with Previous and Next. It never stacks cards. Its height is capped (50vh on desktop, the dock's 55% / 24rem cap on mobile) and it scrolls inside, so the message box and queued messages stay in view.
  • Only questions you can answer dock. That means items that are open, kind action, have a request, and that you can act on. Notices and items without a request don't dock. They show only as transcript records and in the details panel.
  • Answering moves to the next question. A choice or its number key answers the question shown. The next oldest question then appears and keeps focus, so you can work through them from the keyboard.
  • Picks survive paging. Every question stays mounted, so picks stay when you page away and back. One Send in the message box sends every question that has picks, then the typed message. The server matches that message to the questions still open.
  • Transcript. Each ask is one "Asked …" line after the final message of its Turn, so 12 asks add 12 lines, not 12 cards.

Known limit: the dock reads only the first page of the Conversation's open items, 50 by default. With more than 50 open questions it would show "of 50". The review desk and the details panel still page through all of them. I can add pagination to the dock if you want it.

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

Stale Bugbot comment from a previous run.

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

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.

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.

Stale Bugbot comment from a previous run.

@sentry-junior

sentry-junior Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

@dcramer Correction: the 50-item first-page limit is gone. The dock now loads every page of open questions (72a0e7ab1).

sentry-junior Bot and others added 9 commits November 10, 2026 20:08
An open question that waits on the viewer now docks above the message
box instead of hiding it. The question shows its title, "1 of N" with
previous and next when several are open, choices as buttons with number
keys, the form fields inline, and Dismiss on Esc. A typed message still
answers it through the reply matching on the server, and Respond quotes
land in the same box.

The transcript keeps a one-line record of each ask after the final
message of its Turn, with the answer once there is one. The full card
and the pin-start scroll that only it used are gone.

Mock reporting now serves two Conversations with open questions, so the
docked question can be checked with JUNIOR_DASHBOARD_MOCK_CONVERSATIONS.

Co-Authored-By: BYK <[email protected]>
Co-Authored-By: David Cramer <[email protected]>
Every open question stays mounted, so a step to another question keeps
its picks and notes, and each still reports its unsent answer. Take
leaves the question open, so it keeps focus on the question.

Co-Authored-By: BYK <[email protected]>
Co-Authored-By: David Cramer <[email protected]>
The docked form had its own note and Send next to the message box, so a
reader could not pick some answers and type the rest. Send in the
message box now sends the picks of every docked question first, then the
typed message, which the server matches to the questions left open. The
docked form drops its note and Send; Send in the message box is enabled
when only picks wait. Picks in the details panel still ask before a
message drops them.

Co-Authored-By: BYK <[email protected]>
Co-Authored-By: David Cramer <[email protected]>
…e a message

The dock read only the loaded page of open items, which holds notices
too, so a later question never docked. It now loads every page.

Send with an empty draft sends only the docked picks, so it no longer
asks about details-panel picks that no message drops.

Co-Authored-By: David Cramer <[email protected]>
Co-Authored-By: BYK <[email protected]>
A step, an answer that moves to the next question, or a click on the
question title scrolls the transcript to that question's record and marks
it for a moment. A question that docks by itself moves the transcript only
while the reader follows the latest. Opening a Conversation keeps its
start position. With reduced motion the transcript jumps. A record outside
the loaded rows opens the page around its Turn, like a link.

Co-Authored-By: BYK <[email protected]>
Co-Authored-By: David Cramer <[email protected]>
A question on a later page docked after the open had already focused the
message box, so its number keys did not work. The docked questions are
now pending until every page is in.

Co-Authored-By: David Cramer <[email protected]>
Co-Authored-By: BYK <[email protected]>
The reveal marked a request done before its row mounted or its record
loaded its item, so a step to an unmounted record never scrolled. It now
waits until the record is in the DOM.

Co-Authored-By: David Cramer <[email protected]>
Co-Authored-By: BYK <[email protected]>
While later Review item pages load, a question from an early page docks
before the open snapshot exists. It was open on load, so it must not
move or mark the transcript. A question that docks by itself counts as
an arrival only after the snapshot of the open exists.

Co-Authored-By: David Cramer <[email protected]>
Co-Authored-By: BYK <[email protected]>
A docked question now takes the open's focus at once, so a later page
does not pull the focus out of the message box. When Send fails on a
pick of a hidden question, that question shows with its error. Each
loaded page asks for the next one, so a slow page no longer stops the
load of later pages.

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

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

…to load

A moved ask now gets the New marker before it when it is unread, so it
does not sort above the marker under the seq of the row before it.

When a page of open questions fails to load, the reply footer says so
and offers Try again, instead of treating the list as complete.

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

A failed page of open questions now keeps the list pending until Try
again loads it. The open-time snapshot and the focus request then wait
for the full list, so recovered questions take the focus and do not
count as just asked.
@BYK
BYK merged commit 7d7f821 into main Nov 10, 2026
42 checks passed
@BYK
BYK deleted the feat/dashboard-composer-questions branch November 10, 2026 22:22
BYK added a commit that referenced this pull request Nov 10, 2026
…3046)

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 #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](https://junior-prod.sentry.dev/public/artifacts/46d47483-13e9-4845-9107-2b0305e1f37a.png)
| ![After: Needs you holds only the waiting
row](https://junior-prod.sentry.dev/public/artifacts/2aa8b910-bede-44ed-9bc0-46c10c276ed7.png)
|
| ![Before: chip,
light](https://junior-prod.sentry.dev/public/artifacts/c0b2235d-4c53-4512-9756-0f2ff4155e1f.png)
| ![After: chip with GitHub mark,
light](https://junior-prod.sentry.dev/public/artifacts/78defe67-342a-4389-8885-a6a8c734360c.png)
|

Tooltip with every waiting item:

![Chip
tooltip](https://junior-prod.sentry.dev/public/artifacts/f68214b1-732e-480f-96b9-e39cfec33040.png)

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

- **#3032 (sort order, reorder freeze, row markers):** both edit
`conversationSections.ts` and `ConversationSidebar.tsx`. Here the
section rename and the `attentionIds` → `waitingIds` option are the main
changes. The chip moved to `WaitingChip.tsx`.
- **#3031 (progress replies don't mark unread):** touches unread, not
section membership. Small overlap at most.
- **#3036 (Inbox bundles):** consumes Review items. The new plugin asks
land in its "Needs you" group with no change there.
- **Migrations:** this adds `0098_review_item_plugin_actions`. A
parallel PR that also adds a migration needs a renumber.

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

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

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

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A347ecd22af4f5aa5e0960cd65ba322a4)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A347ecd22af4f5aa5e0960cd65ba322a4/?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]>
Co-authored-by: David Cramer <[email protected]>
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 — 6ecc0d66 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.

2 participants