Skip to content

gln/pr-review-improvements-vzxy - #412

Merged
glehmann merged 8 commits into
mainfrom
gln/pr-review-improvements-vzxy
Sep 23, 2026
Merged

glehmann merged 8 commits into
mainfrom
gln/pr-review-improvements-vzxy

Conversation

@glehmann

Copy link
Copy Markdown
Collaborator
  • 9f706bb0 feat: include org members in the mention popup repo-user tier

    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.
  • 03f18975 feat: tiered mention suggestions with repo users and teams

    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).
  • cca0da09 fix: correct push attribution and reviewer badges

    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.
  • 19f6c138 fix: dedupe optimistic comments via content key and hide blank review 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.
  • 7ba99797 feat: render multi-commit review batches as one card

    Cross-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.
  • 26ec4961 feat: anchor review comments to the viewed commit

    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.
  • b87450c9 fix: make PR review submission reliable

    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.
  • ab8bf50d fix: open the conversation tab when navigating to the overview

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.
@glehmann
glehmann merged commit 9f706bb into main Sep 23, 2026
6 checks passed
@glehmann
glehmann deleted the gln/pr-review-improvements-vzxy branch September 23, 2026 18:53

This branch was successfully deployed

1 active deployment
github-pages — 9f706bb0 Deployed Sep 23, 2026 by glehmann via deploy #249
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