Add support for force push diff view

Open
#87 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

The payload names no source files, so start by finding the existing API from #45 that compares a PR's previous and current HEAD, and read how it is consumed. Then check #83 for the commit-range UI it is meant to share. Done means a reviewer can open a force-push diff between the old and new PR HEAD from the UI, and the scope of the optional AI history-rewrite classification is agreed on first.

Written by the indexing model from the issue text.

Description

enhancement
Clear and concise description of the problem

When a contributor force-pushes a PR branch, the reviewer needs to understand what actually changed between the previous and current versions of the PR.

The reliable comparison is:

flowchart LR
    Old["Previous PR HEAD"] -->|"Force-push diff"| New["Current PR HEAD"]

Comparing individual commits or commit ranges across a force push is not generally reliable, because the history may be reordered, squashed, split, or otherwise rewritten. The old and new commits may no longer have a stable correspondence.

Therefore, the review unit should be the overall diff between the previous PR HEAD and the current PR HEAD.

Suggested solution

UI/UX

  • Adding addtional UI component for display force pushes
  • Adding AI classification can additionally explain what kind of history rewrite produced it.
Alternative

No response

Additional context

#83 is about reviewing selected commits or commit ranges within the current PR history. It's possible that, we can re-use the underlaying API implemented #45 with more UI for these purposes

Validations
Dominant language
TypeScript
Stars
622
Forks
40
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from antfu/pulls.review

All issues in antfu/pulls.review

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.