Consolidate duplicated review thread-message renderers; fix empty state-change bubbles in inline diff - #840
Merged
Conversation
…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>
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Extracts the duplicated thread-message bubble component from
reviews-feedback-item.tsx(ThreadMessage) anddiff-annotations.tsx(InlineThreadMessage) into a single sharedFeedbackThreadMessageinfeedback-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/reopenstate-change messages (state-change label + muted chip styling). The inline copy renderedmessage.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
FeedbackThreadMessage(state-change labeling, note-body prefixing, reopen, grouping header suppression)pnpm run check,finalize:web, full web vitest (436), e2e (170) all greenQueued next
Top of the tech-debt backlog: server/web media tables drift (
TEXT_EXTENSIONS/isTextFile/extensionForMimecopy-pasted and already diverged).🤖 Generated with Claude Code