Skip to content

fix(dashboard): Lead the reader to a new review item question - #2533

Merged
BYK merged 9 commits into
mainfrom
fix/review-item-card-start-in-view
Nov 2, 2026
Merged

BYK merged 9 commits into
mainfrom
fix/review-item-card-start-in-view

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

When Junior adds a Review item that asks a question, the reader could miss it. A tall card was pinned at its end, so the reader saw the last options and Send first. The message box below it also suggested that the answer goes there.

Show the start of the card. When a pin would cut off the start of a new card, the transcript scrolls to the top of the card and stops following, so later layout or poll updates do not move it away. Each card does this one time. When the reader scrolls back to the bottom, following continues as before.

Hide the message box, review bar, and queued messages while Junior waits. When the last Review item that Junior added in the transcript is open, has a question, and the viewer can act on it, the message box, the open review item bar, and the queued messages hide. So the question is the last thing on the page, and the reader answers in the card. The card's existing Dismiss action closes the item and shows them again. No extra prompt takes space, which matters most on mobile. Nothing hides while a Turn runs, because the message box holds the stop control. When the reader answers or dismisses, the item closes and the message box comes back.

The message box stays mounted while hidden, so its text and images stay. It does not hide while it has focus, so a reader who types when the question arrives keeps the message box. In that case, using the review bar or queued messages (for example, to edit one) keeps them shown, so the click is not lost.

The item comes from the addReviewItem tool call in the transcript and uses the same item query as the card. So the message box hides as soon as the card shows, without waiting for the Conversation review item list to refresh.

A Playwright journey on desktop and mobile opens a Conversation that ends with an addReviewItem call for a three-field request. It checks that the card heading is in the viewport, that the message box, review bar, and queued messages are hidden, and that Dismiss on the card closes the item and shows the message box and queue again. It saves conversation-review-item-card and conversation-review-item-dismissed screenshots for Frameshift.

Before (main) After After Dismiss
Desktop Desktop before: only the end of the card shows, with the message box below Desktop after: the card title and question show, and the question is the last thing on the page Desktop: the item is dismissed and the message box is back
Mobile Mobile before: only the end of the card shows Mobile after: the card title and question show, and the question is the last thing on the page Mobile: the item is dismissed and the message box is back

Fixes #2508

via @BYK.

--

View Session in Sentry

A bottom pin showed only the end of a tall Review item card in the
transcript, so the reader saw the last options and Send first, and the
title and question were above the view.

When a pin would cut off the start of a new card, the transcript now
scrolls to the card start and stops following. Each card does this
once. Scrolling to the bottom resumes following as before.

Fixes #2508
@vercel

vercel Bot commented Nov 2, 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 2, 2026 2:23pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

10 screenshot changes — 6 changed · 4 added · 0 removed

Review screenshots in Frameshift

Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Attachment · Mobile
Conversation Attachment · Mobile
Changed
Conversation Attachment Modal · Desktop
Conversation Attachment Modal · Desktop
Changed
Conversation Child Agent Drawer · Desktop
Conversation Child Agent Drawer · Desktop
Changed
Conversation Child Agent Drawer · Mobile
Conversation Child Agent Drawer · Mobile
Changed
Conversation Sidebar Collapsed · Desktop
Conversation Sidebar Collapsed · Desktop
Changed

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

I think we should also hide/replace the "Message junior" part when a question arises. That was the main issue that got me confused.

When the last Review item that Junior added in a Conversation is open
and asks the viewer a question, a prompt replaces the message box. The
reader then answers in the card instead of typing the answer as a new
message. The prompt can scroll to the question, or show the message box
again for that item. It does not show while a Turn runs.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9313bd1. Configure here.

…start-in-view

# Conflicts:
#	packages/junior-dashboard/src/client/conversations/ConversationPage.tsx
@sentry-junior sentry-junior Bot changed the title fix(dashboard): Show the start of a new tall review item card fix(dashboard): Lead the reader to a new review item question Nov 2, 2026
Unmounting the composer dropped attached images, which live only in
its state, and moved keyboard focus out of the dock. Hide the composer
instead, do not hide it while it has focus, and move focus to it when
the reader picks Write a message.

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

Mostly okay but why not just a simple x or Dismiss button on the question section and replace the message box to avoid confusion and save space, especially on mobile?

Drop the prompt bar that replaced the message box. While Junior waits
for an answer, the message box hides and the question card shows. The
card's Dismiss action closes the item and shows the message box again,
which saves space on mobile.

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

I think we should also hide the queued messages or move them on top of the question box (so the question box sits at the very bottom, remember, replacing the new message box)

Queued messages sat between the question and the bottom of the page.
Hide them with the message box, so the question is last. When the
message box shows only because it has focus, using the queue keeps
both shown, so a click on a queued message is not lost.

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

Nice

@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 review bar is cutting the questions. We should hide that or move it over too

The open review item bar sat below the question and cut it off. Hide it
with the message box and queued messages, so the question is last.
@BYK
BYK merged commit 6f060eb into main Nov 2, 2026
42 checks passed
@BYK
BYK deleted the fix/review-item-card-start-in-view branch November 2, 2026 14:29
BYK added a commit that referenced this pull request Nov 10, 2026
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](https://junior-prod.sentry.dev/public/artifacts/42135758-c06b-4088-b6f0-059227d97287.png)

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

![Confirm for details panel
picks](https://junior-prod.sentry.dev/public/artifacts/598db96b-026b-4fc0-9de4-fcbb66963b9f.png)

## 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)](https://junior-prod.sentry.dev/public/artifacts/4c2a651c-f42b-4ca0-951e-7cc684049e81.png)

<img alt="The same on mobile"
src="https://junior-prod.sentry.dev/public/artifacts/ebdf64f3-29f3-4266-9405-b7a5e1121b0b.png"
width="320">

## 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 |
| --- | --- |
| <img
src="https://junior-prod.sentry.dev/public/artifacts/ca739733-48f0-4f91-9975-19a84eebc4e4.png"
width="480" alt="Desktop: Some questions did not load, with Try again,
above the message box"> | <img
src="https://junior-prod.sentry.dev/public/artifacts/d5f8b65d-29d5-4d50-b499-39d3210ce121.png"
width="200" alt="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 #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 #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:
- [Claude
Code](https://docs.anthropic.com/en/docs/claude-code/permissions) shows
its permission prompt at the input, with numbered options and Esc to
cancel.
- [VS Code agent
approvals](https://code.visualstudio.com/docs/agents/run/approvals) put
the approval controls in the chat input.
- **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](https://junior-prod.sentry.dev/public/artifacts/5fc6c65d-e1c1-43bd-9b91-289ffcc46792.png)
![Single choice question,
light](https://junior-prod.sentry.dev/public/artifacts/dc7fcd4c-465e-4f24-b057-4170a14e7b8d.png)

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

![Question stepper,
dark](https://junior-prod.sentry.dev/public/artifacts/62fc14b2-c49b-48e4-ab66-f52ab30dc1c4.png)
![Question stepper,
light](https://junior-prod.sentry.dev/public/artifacts/aec4ed93-a2f3-4954-9627-51070acde2f5.png)

A typed answer in the message box:

![Typed
answer](https://junior-prod.sentry.dev/public/artifacts/87d31ed6-7b19-4571-9682-ecbeef39daf7.png)

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

![Answered transcript
record](https://junior-prod.sentry.dev/public/artifacts/3fae4444-e6b6-43cf-aeee-dac126e431da.png)

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

<img width="300" alt="Mobile question, dark"
src="https://junior-prod.sentry.dev/public/artifacts/1a01af3b-a380-44c7-9ba4-f304b4e98481.png">
<img width="300" alt="Mobile question, light"
src="https://junior-prod.sentry.dev/public/artifacts/e79cc360-97d0-4400-b598-48851e881828.png">
<img width="300" alt="Mobile tall form"
src="https://junior-prod.sentry.dev/public/artifacts/742b2f28-c7bb-42bf-8edd-ec0087ce2da1.png">

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

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

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

--

[View Session in
Sentry](https://sentry.sentry.io/explore/conversations/agent%3A29bc0bc7abd06247a0e0286293c42573/?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]>

This branch was successfully deployed

1 active deployment
Preview – junior-docs — b8c898cb Deployed Nov 2, 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.

Start of a new review item card is off screen in transcript

1 participant