feat: show unresolved review thread details in a click popover#26
Merged
Conversation
The PR-list "N unresolved" badge now opens a GitHub-style popover that lists each unresolved thread — file:line, author, a 2-line comment snippet, and an "outdated" marker — with every row linking to its #discussion_r… anchor. - Expand the reviewThreads GraphQL query to fetch path/line/isOutdated plus the first comment's author/bodyText/url, and map unresolved threads into a new PRReviewStatus.unresolved field. - Render a click-to-open popover (caret + bordered header + rows + "+N more" footer) styled after GitHub's hovercard / checks dropdown; dismiss on outside-click or Escape, with role/aria and keyboard support. - Tame long text entirely in CSS (path → basename + ellipsis, body → 2-line clamp) so the popover keeps a fixed 340px width. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Outdated threads carry their position in `originalLine`, not `line` (which GitHub returns as null), so the popover was showing just the filename with no line number for them. Use line ?? originalLine. Also tighten aria-haspopup to "dialog" (the popover is a link list, not a menu) and document why the query fetches comment bodies for resolved threads it later drops. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
The PR-list "N unresolved" badge was just a count. Now clicking it opens a
GitHub-style popover that lists each unresolved review thread, so you can see
what's unresolved without opening the PR — and jump straight to any thread.
Each row shows:
file:line(basename only; full path in thetitletooltip)outdatedmarker when the diff has since changed@author: comment— the first comment, clamped to 2 linesEvery row links to that comment's exact
…/pull/N#discussion_r…anchor.How
service-worker.ts): expand thereviewThreadsGraphQL query tofetch
path/line/isOutdatedand the first comment'sauthor/bodyText/url; only unresolved threads are mapped into the newPRReviewStatus.unresolvedfield (resolved ones are dropped to keep thepayload small).
pr-review-status.ts+content.css): a click-to-open popover —caret, bordered header with the
commentocticon, tidy rows, and a+N morefooter (list capped at 8). Dismisses on outside-click / Escape;
role=button,aria-expanded, and Enter/Space keyboard support. Clicks inside the popoverdon't dismiss it, so thread links navigate normally.
body → 2-line clamp), so the popover stays a fixed 340px wide no matter how
verbose a comment is.
Notes / verification
position: absolute. Checked the live PR-list DOM on a real repo(old GitHub DOM): no
overflow: hidden/auto/scrollancestor between the issuerow and
<body>, so it isn't clipped.PRReviewStatuspayloads withoutunresolveddegradegracefully — the badge renders with no popover (the existing
titletooltipstays).
Tests
pnpm typecheck+pnpm testgreen (178 passed). New cases cover theGraphQL → details mapping (incl. missing author/path/comments), popover
structure, basename truncation, click toggle, outside-click/Escape dismissal,
inside-click not dismissing, and the no-details fallback.
🤖 Generated with Claude Code