Skip to content

Consolidate duplicated review thread-message renderers; fix empty state-change bubbles in inline diff - #840

Merged
selfcontained merged 1 commit into
mainfrom
agt_940468cd505a/job-debt-collector-7aae2f03
Jul 27, 2026
Merged

Consolidate duplicated review thread-message renderers; fix empty state-change bubbles in inline diff#840
selfcontained merged 1 commit into
mainfrom
agt_940468cd505a/job-debt-collector-7aae2f03

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

What

Extracts the duplicated thread-message bubble component from reviews-feedback-item.tsx (ThreadMessage) and diff-annotations.tsx (InlineThreadMessage) into a single shared FeedbackThreadMessage in feedback-card-parts.tsx — the shared module both surfaces already import from since #836.

Why it's tech debt (and a latent bug)

The two copies were near-identical markup, but only the sidebar copy handled resolution/reopen state-change messages (state-change label + muted chip styling). The inline copy rendered message.content?.body ?? "", so marking feedback fixed with no note produced an empty bubble in the Changes tab thread — reachable in production, since the inline view doesn't filter state-change messages.

The inline grouping predicate is also aligned with the sidebar's (now includes prev.type === message.type), so a state-change chip never merges into a preceding comment group.

Behavior change

Intentional and visible: in the inline diff view, a body-less resolution/reopen message now renders as a "State change · Marked fixed/dismissed / Reopened feedback" chip instead of an empty bubble. Validated live in Playwright (dev stack, seeded review data): expanded the open ColorScale feedback in the Changes tab, clicked Mark fixed with no note, and confirmed the chip renders in both the inline thread and the reviews sidebar. Screenshots shared via dispatch media.

Tests

  • 5 new unit tests for FeedbackThreadMessage (state-change labeling, note-body prefixing, reopen, grouping header suppression)
  • pnpm run check, finalize:web, full web vitest (436), e2e (170) all green

Queued next

Top of the tech-debt backlog: server/web media tables drift (TEXT_EXTENSIONS/isTextFile/extensionForMime copy-pasted and already diverged).

🤖 Generated with Claude Code

…eadMessage
The reviews sidebar and the inline diff annotations each carried their own
copy of the thread-message bubble. The sidebar copy handled resolution/reopen
state-change messages; the inline copy rendered content.body ?? "", so a
body-less resolution message showed an empty bubble in the Changes tab.
Move the state-change-aware version into feedback-card-parts.tsx (already
shared by both surfaces since #836) and use it in both. Also align the inline
grouping predicate with the sidebar's (includes message type) so a state
change never merges into a preceding comment group.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@selfcontained
selfcontained merged commit 2795684 into mainJul 27, 2026
1 check passed
@selfcontained
selfcontained deleted the agt_940468cd505a/job-debt-collector-7aae2f03 branch July 27, 2026 09:13
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@selfcontained