feat(prview): PR review-comment threading, diff hunks, and web-parity activity (closes #852) - #891
Draft
ysrfz wants to merge 1 commit into
Draft
feat(prview): PR review-comment threading, diff hunks, and web-parity activity (closes #852)#891ysrfz wants to merge 1 commit into
ysrfz wants to merge 1 commit into
Conversation
Closes dlvhdr#852. Reworks the PR activity panel to mirror GitHub web's Conversation tab: group review comments under their parent thread, render the last 4 lines of each comment's diff hunk above the thread, surface [Outdated] and [Resolved] badges (wrapping to next line when the anchor overflows), render a glyph for DISMISSED reviews, and unwrap GitHub's implicit state=COMMENTED,body="" review wrappers (0/1/2+ thread cases). Also aligns the activity title's "N comments" figure with the web (N) badge, including the case where state=COMMENTED reviews with a body and zero inline comments are excluded.
This comment has been minimized.
This comment has been minimized.
Owner
|
Hey @ysrfz :) |
Nadzkielegit
approved these changes
Jul 9, 2026
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 free
to 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.
Summary
Status: WIP — please comment if you don't like the current direction while I polish the edges.
Reworks the PR activity panel to look more like GitHub web's Conversation tab. A few things going on here:
↳ {author}prefix.diffHunkon review comments and render the last 4 content lines above each thread (mirroring the collapsed preview on web).@@headers get stripped since they're just positional metadata.[Outdated]and[Resolved]render inline next to the anchor, and wrap to the next line when the anchor is too wide rather than getting clipped.↺so dismissed approvals don't look like rendering bugs.state=COMMENTED, body=""wrapper whenever a thread starts outside a formal review. The TUI was rendering these as emptyxyz reviewedblocks. Now: 0 threads → hide; 1 → promote the thread up a level; 2+ → promote them all as siblings.N commentsfigure in the title now matches the web(N)badge, including the slightly weird case where reviews withstate=COMMENTED+ body + zero inline comments get excluded (web treats them as redundant with plain IssueComments, even though it still renders the card — I went back and forth on this one, ended up matching web for consistency).Keybindings and overall panel layout unchanged.
How Did You Test this Change?
go test ./internal/tui/components/prview ./internal/data— added 14 new tests inactivity_test.gocovering each behaviour above (thread grouping, diff-hunk truncation, badges, DISMISSED glyph, implicit-review unwrap cases, count-badge web-parity)go build && go vet ./...cleangh-dashv4.24.1 on a 20+-review PR (mixed thread/IssueComment/DISMISSED activity); will attach screenshots once the UI is polishedImages/Videos
(will attach side-by-side screenshots once I'm happy with the UI)
AI Usage Disclosure
Per AI_POLICY.md: wrote the code with Claude Code as a pair-programming assistant, with substantial AI involvement on the implementation drafts and tests. Each design decision (web-parity counting, implicit-review unwrap cases, diff-hunk truncation length, badge wrap behaviour) was driven and reviewed by me, with multiple rounds of pushback on the approach before landing. I understand the changes and can explain how the activity-panel pipeline interacts with the GraphQL fragment and the existing PR view — happy to walk through any part on request.
Closes #852