Skip to content

feat(review-items): Save a thread reply as the item answer - #2494

Merged
dcramer merged 2 commits into
mainfrom
feat/review-item-save-reply-answer
Nov 1, 2026
Merged

dcramer merged 2 commits into
mainfrom
feat/review-item-save-reply-answer

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Part of #2488.

Each review item row should keep the answer to its question. A card or desk submit already saves it in junior_review_items.answer. A reply in the thread (added in #2491) closed the item as Replied in thread, but it left answer empty, so the row did not keep what the person said.

Change

  • closeReviewItemsAnsweredByReply takes the reply text and saves it as the free-text answer (answer.other). It uses normalizeUserInputAnswer, so the same trim and 3,000-character limit apply.
  • Slack: a leading mention of Junior is removed first (stripLeadingBotMention). Dashboard: the message text is used as is.
  • isSameClose now ignores items closed by a reply. Before this change, such an item had no answer, so a later desk submit from the same person was a conflict. With an answer saved, that submit could look like a retry and send the answer again. It stays a conflict.

No schema change: the answer column already exists.

Tests

The existing reply scenarios in review-item-card-webhook.test.ts now check the saved answer (Slack and dashboard), and that a later desk submit is rejected. Both fail without the source change. The review-item test files (27 tests), typecheck, oxlint and prettier pass.

via David Cramer.

--

View Session [Sentry]

A reply in the thread closed an action item, but the item kept no answer.
Save the reply text as the item's free-text answer, so every closed
question keeps what the person said. Remove a leading Slack mention of
Junior first.

A close by reply is never the same as a card action, so a later desk
submit is a conflict and not a retry.

Part of #2488

Co-Authored-By: David Cramer <[email protected]>
@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 7:03pm UTC

Request Review

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

Might be worth a policy pass and jargon cleanup here before merge

Rename replyAnswer to messageAnswer and reword the comments, README and
test notes. A person's message is a message, and reply stays the word
for Junior's own messages.
@dcramer
dcramer merged commit 5851939 into main Nov 1, 2026
44 checks passed
@dcramer
dcramer deleted the feat/review-item-save-reply-answer branch November 1, 2026 19:25

This branch was successfully deployed

1 active deployment
Preview – junior-docs — d5d0feec 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: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant