gln/pr-review-improvements-vzxy - #412
Merged
Merged
Conversation
Pending review comments now sync to GitHub correctly, including comments on deleted lines and on context outside the diff, so submitting a review no longer fails with 422 "Line could not be resolved" or silently drops comments. Pending comments survive reloads and render once, under their own diff side, with multi-line ranges highlighted.
Comments made while viewing a single commit or an older push version are now anchored to that commit on GitHub instead of the PR head. Drafts record their target sha; head-anchored drafts keep the GraphQL live sync, while cross-commit sessions submit one REST review per target commit (GitHub anchors an entire review to a single commit) with multi-line ranges preserved. Lines are pre-snapped against the cumulative base..sha diff, matching GitHub's validation frame. A duplicate guard skips groups already submitted after a lost response, and pending drafts only render under the diff they were made on. Post-submit optimistic timeline entries are deduped against events the refetch already returned, since the reviews and timeline endpoints lag independently.
Cross-commit submissions still create one REST review per target commit, but each group's first comment now carries a hidden HTML-comment marker (<!-- pulldash:review-group g=.. i=.. n=.. -->) correlating the batch. The overview timeline (and keyboard navigation) folds member reviews into the primary card so a multi-commit session appears as a single review with all threads; review bodies stay untouched, so github.com shows the same content as before with nothing visible added. The submission duplicate guard strips markers before comparing (a retry regenerates the token), comment editing strips the marker for display and re-attaches it on save, and plain-text previews (conversations sidebar, resolved-thread list, quote-reply) strip it too.
… bodies Refetched threads can lack IDs for REST-submitted comments, so the optimistic copy rendered twice until the next refresh. Match refetched threads by a path/line/body content key (ignoring the regenerated review-group marker) to drop duplicates. Also hide COMMENT review cards with whitespace-only bodies, matching GitHub's rendering.
Synthetic normal-push version events were attributed to the PR author, so a push to a dependabot PR showed dependabot[bot] as the pusher; attribute them to the author of the newest commit instead. Reviewer badges used opinionated logic, so an approval kept its green check after the author re-requested review and the reviewer later left a comment review (xcp-ng-tests#709). Badges now show the latest non-dismissed review per user, while approval counts and merge readiness keep the opinionated logic.
The mention popup now ranks candidates: PR participants first, then repo collaborators, then org teams, with GitHub-wide search merged on top. Teams insert as @owner/slug and render with a team badge. PR participants also gained reviewers and issue commenters (previously only review comment authors were included).
Team members without direct collaborator access (e.g. vxgmichel on xcp-ng-tests) were only surfaced via the GitHub-wide search, so @v missed them. The repo-user tier now merges the org roster (paginated, gracefully empty for user-owned repos or hidden member lists) with collaborators.
This branch was successfully deployed
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.
9f706bb0feat: include org members in the mention popup repo-user tierTeam members without direct collaborator access (e.g. vxgmichel on
xcp-ng-tests) were only surfaced via the GitHub-wide search, so @v
missed them. The repo-user tier now merges the org roster (paginated,
gracefully empty for user-owned repos or hidden member lists) with
collaborators.
03f18975feat: tiered mention suggestions with repo users and teamsThe mention popup now ranks candidates: PR participants first, then repo
collaborators, then org teams, with GitHub-wide search merged on top.
Teams insert as @owner/slug and render with a team badge. PR participants
also gained reviewers and issue commenters (previously only review
comment authors were included).
cca0da09fix: correct push attribution and reviewer badgesSynthetic normal-push version events were attributed to the PR author,
so a push to a dependabot PR showed dependabot[bot] as the pusher;
attribute them to the author of the newest commit instead.
Reviewer badges used opinionated logic, so an approval kept its green
check after the author re-requested review and the reviewer later left a
comment review (xcp-ng-tests#709). Badges now show the latest
non-dismissed review per user, while approval counts and merge readiness
keep the opinionated logic.
19f6c138fix: dedupe optimistic comments via content key and hide blank review bodiesRefetched threads can lack IDs for REST-submitted comments, so the
optimistic copy rendered twice until the next refresh. Match refetched
threads by a path/line/body content key (ignoring the regenerated
review-group marker) to drop duplicates. Also hide COMMENT review cards
with whitespace-only bodies, matching GitHub's rendering.
7ba99797feat: render multi-commit review batches as one cardCross-commit submissions still create one REST review per target commit,
but each group's first comment now carries a hidden HTML-comment marker
() correlating the batch.
The overview timeline (and keyboard navigation) folds member reviews into
the primary card so a multi-commit session appears as a single review
with all threads; review bodies stay untouched, so github.com shows the
same content as before with nothing visible added. The submission
duplicate guard strips markers before comparing (a retry regenerates the
token), comment editing strips the marker for display and re-attaches it
on save, and plain-text previews (conversations sidebar, resolved-thread
list, quote-reply) strip it too.
26ec4961feat: anchor review comments to the viewed commitComments made while viewing a single commit or an older push version are
now anchored to that commit on GitHub instead of the PR head. Drafts
record their target sha; head-anchored drafts keep the GraphQL live sync,
while cross-commit sessions submit one REST review per target commit
(GitHub anchors an entire review to a single commit) with multi-line
ranges preserved. Lines are pre-snapped against the cumulative base..sha
diff, matching GitHub's validation frame. A duplicate guard skips groups
already submitted after a lost response, and pending drafts only render
under the diff they were made on. Post-submit optimistic timeline entries
are deduped against events the refetch already returned, since the
reviews and timeline endpoints lag independently.
b87450c9fix: make PR review submission reliablePending review comments now sync to GitHub correctly, including comments
on deleted lines and on context outside the diff, so submitting a review
no longer fails with 422 "Line could not be resolved" or silently drops
comments. Pending comments survive reloads and render once, under their
own diff side, with multi-line ranges highlighted.
ab8bf50dfix: open the conversation tab when navigating to the overview