Skip to content

feat(review-desk): Show Review items in Conversations - #2466

Merged
dcramer merged 3 commits into
mainfrom
feat/review-items-in-conversations
Oct 31, 2026
Merged

dcramer merged 3 commits into
mainfrom
feat/review-items-in-conversations

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Part 4 of the review desk stack for #2401. Stacked on #2464.

  • Transcript card: when the agent adds an item (addReviewItem, directly or through executeTool), the transcript shows a review card under that tool call. The tool row stays out of the collapsed activity group so the card is visible. The card has the same actions as the review desk, shows who closed it and the answer once closed, and links to the item on the review desk. A viewer who cannot act sees it without the form; a viewer who cannot see the item sees nothing. The card needs the tool result, so a transcript that hides tool payloads shows no inline card (the bar still covers it).
  • Bar + side panel: while a Conversation has open linked items, a bar above the message box shows how many. It opens a side panel with a card per item.
  • "Waiting on you" dot: GET /api/review-items/waiting-conversations lists Conversations with an open linked item assigned to the viewer or Everyone. Unassigned items do not count. The sidebar, home list, and repository list show a lavender dot for them, and it replaces the other status markers. No layout changes.

Tests: /waiting-conversations cases in tests/integration/api/review-items/actions.test.ts, and a unit test for the tool call parser (tests/review-item-tool-call.test.ts).

The Slack card follows in the next PR.

via David Cramer.

--

View Session [Sentry]

@vercel

vercel Bot commented Oct 31, 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 Oct 31, 2026 2:59am UTC

Request Review

@blacksmith-sh

This comment has been minimized.

@blacksmith-sh

This comment has been minimized.

@sentry-junior
sentry-junior Bot force-pushed the feat/review-items-in-conversations branch from 70e7a2e to ace085f Compare October 31, 2026 02:40
@sentry-junior
sentry-junior Bot force-pushed the feat/review-items-in-conversations branch from ace085f to e5a20db Compare October 31, 2026 02:50
Base automatically changed from feat/review-desk-page to main October 31, 2026 02:56
sentry-junior Bot and others added 2 commits October 31, 2026 02:56
Show a review card in the transcript where the agent added the item. A
bar above the message box counts the open linked items and opens a side
panel to act on them. A lavender dot marks Conversations that wait on
the viewer and replaces the other status markers.

Refs #2401

Co-Authored-By: David Cramer <david@sentry.io>
Co-Authored-By: David Cramer <david@sentry.io>
@dcramer
dcramer force-pushed the feat/review-items-in-conversations branch from e5a20db to b34f94f Compare October 31, 2026 02:56
@dcramer
dcramer marked this pull request as ready for review October 31, 2026 02:56
An update replaced conversation_ids as given. It could drop the Conversation
that added the item, and hide a private item from that Conversation. The
update now always keeps that link.

Co-Authored-By: David Cramer <david@sentry.io>
@dcramer
dcramer merged commit 4c498b5 into main Oct 31, 2026
45 checks passed
@dcramer
dcramer deleted the feat/review-items-in-conversations branch October 31, 2026 03:06
dcramer added a commit that referenced this pull request Oct 31, 2026
Part 5 of the review desk stack for #2401. Stacked on #2466.

- **Card in linked Slack threads:** when an agent adds an open item,
each linked Slack thread gets a card. The controls reuse the #2149
`requestUserInput` rendering: one button per option for a single
`choice` field, otherwise an **Answer** button that opens the same form.
A notice shows **Done**. Every card shows **Dismiss** and links to the
item on the review desk.
- **Updates in place:** `junior_review_item_slack_cards` stores the
message of each card. After every agent update or close and every person
action (Slack, review desk, or Conversation card), each card changes in
place. A closed card has no controls and shows who closed it and the
answer.
- **Clicks act as the person:** a click needs the same workspace and
allowed-domain checks as a Slack mention, plus a Junior User linked to
the Slack account. It calls `actOnReviewItem` as that User, so the first
action still closes the item everywhere. The thread of the card gets the
action as Slack input from the person, like an answer to
`requestUserInput`. The other linked Conversations get the usual
messages (`exceptConversationId` keeps the thread from getting a second
copy). A click on a closed or forbidden item gets an ephemeral note and
refreshes the card.
- **Privacy:** a private item shows a card only in the thread that added
it, because other linked threads can have people who cannot see its
source. A card in a thread that can no longer show the item loses its
content.
- **Best effort:** a card failure is logged
(`review_item.slack_card.sync.failed`) and never fails the item change.

Small refactors: `buildSlackUserInputForm` takes the callback id and
metadata, so both forms share one builder. `slackUserInputAnswerNote`
takes `who` text instead of a Slack user id, because a Review item
closer is a Junior User. The Slack input that a click makes moved to
`chat/ingress/slack-interaction-input.ts` so both handlers build it the
same way.

Tests: `tests/integration/slack/review-item-card-webhook.test.ts` covers
the click flow (cards in two threads, first click closes both, a stale
click does nothing) and a private item (card only in the adding thread,
only an assignee can act).

<!-- junior-request-attribution:start -->
via **David Cramer**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC0AHB7N2JCR%3A1793326028.695969 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/slack%3AC0AHB7N2JCR%3A1793326028.695969)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0AHB7N2JCR%3A1793326028.695969/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: David Cramer <david@sentry.io>

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 8f48b58c Deployed Oct 31, 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