Skip to content

Incremental review (push-by-push delta) #16

@haasonsaas

Description

@haasonsaas

Problem

When a developer pushes 3 commits to an open PR, they want feedback only on what changed since the last review — not a full re-review of the entire diff. No major competitor has implemented this yet, but it's the most frequently requested feature across the AI code review category.

This is an opportunity to be first-to-market.

Proposed Solution

  1. Track review state per PR:

    • Store the last-reviewed commit SHA per PR
    • On subsequent pushes, compute the delta between last-reviewed SHA and new HEAD
  2. Delta review mode:

    • diffscope pr --incremental — only review changes since last review
    • diffscope pr --since <sha> — review changes since a specific commit
    • Auto-detect incremental mode when a prior review exists for the PR
  3. Smart comment management:

    • Resolve/collapse comments on lines that were addressed in new commits
    • Add new comments only for new/changed code
    • Update the summary comment with incremental findings
  4. State storage:

    • Store review state in PR comments (hidden metadata) or in the database
    • Fallback: .diffscope.state.json for CLI-only workflows

Implementation Notes

  • The pr command already fetches the full PR diff — this needs to be scoped to a commit range
  • GitHub API: GET /repos/{owner}/{repo}/pulls/{pull_number}/commits to get commit list
  • Use git diff <last_reviewed_sha>..HEAD for the delta

Competitive Context

No major competitor has this yet. Being first would be a genuine differentiator.

Priority

Tier 2 — First-mover opportunity. Most-requested feature in the category that nobody has shipped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions