Skip to content

馃 fix: hide resolved comment threads by default in diff view - #26

Open
ibetitsmike wants to merge 2 commits into
mainfrom
mike/resolved-comments-collapsed
Open

馃 fix: hide resolved comment threads by default in diff view#26
ibetitsmike wants to merge 2 commits into
mainfrom
mike/resolved-comments-collapsed

Conversation

@ibetitsmike

Copy link
Copy Markdown

Resolved review threads in the diff view now start collapsed behind a "Resolved by X" header, expandable via the chevron.

Why the existing collapse UI never triggered

CommentThread already had collapse logic keyed on ReviewComment.is_resolved, but that field (declared "enriched from GraphQL") was never populated: REST review comments carry no thread ID or resolution state. Every thread therefore rendered as unresolved, and the diff view's Resolve button never appeared since pull_request_review_thread_id was always undefined.

Implementation notes

  • enrichCommentsWithThreads joins the already-fetched GraphQL review threads (isResolved, resolvedBy, thread ID) onto REST comments by databaseId. Applied at initial PR load and in the post-review-submit refresh, which previously would have wiped resolution state. No extra API calls on initial load.
  • Collapse state initializes from isResolved (no expand-then-collapse flash) and re-syncs when resolution changes from another view, so a thread cannot get stuck collapsed with the expand chevron hidden.
  • useThreadActions now updates both comments (diff view) and reviewThreads (overview); the overview's inline resolve handlers were replaced with this shared hook so the two views cannot drift.
  • The "by X" attribution shows only when the actual resolver is known, instead of falling back to the comment author.

Validation

  • bun test (47 pass, includes 3 new data-layer tests for the enrichment join), bun typecheck, bun fmt all clean.
  • Not verified against a live PR in a browser (browser tooling is disallowed for this project).

Mux created this PR on Mike's behalf.

@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pulldash Ready Ready Preview Aug 17, 2026 5:19pm

Request Review

Sign up for free to 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