[dogfood] Review-wide diff summary (DO NOT MERGE) - #34
Open
sdavisde wants to merge 2 commits into
Open
Conversation
Answers "how big is this review, and where do I start?" without a render surface walking hunks itself: file and binary counts, total churn, and the largest file and hunk. `build_review` computes it once on the background snapshot build and hands it to the UI on `ReviewSnapshot`. Churn is added+removed, so a line rewritten in place counts twice — the measure estimates how much there is to read, and a rewrite means reading both sides. Binary files count as files but never as lines, matching the call `stat_display` already makes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011wAgKziALkaqa3WNEibtX7
`App` now holds the snapshot's `ReviewSummary` alongside `total_stats`, refreshed on every rebuild and suspended/restored with the commit and file views like the rest of the per-target state. First use: the git panel's counts line gets a `[N bin]` chip. Binary files sit in the file count but contribute nothing to `+A -R`, so without it the counts read short with no explanation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011wAgKziALkaqa3WNEibtX7
sdavisde
force-pushed
the
dogfood/diff-review-summary
branch
from
July 30, 2026 02:38
55e0966 to
fd95557
Compare
sdavisde
commented
Jul 30, 2026
|
|
||
| <p align="center"> | ||
| A portable, efficeint tool for reviewing code | ||
| A portable, efficient tool for reviewing code |
Owner
Author
There was a problem hiding this comment.
[praise] I like how you fixed this grammar
| /// Whether this kind implies the file's content changed. A rename or | ||
| /// copy may carry hunks or be path-only; every other kind always | ||
| /// carries content. | ||
| pub fn is_content_change(self) -> bool { |
Owner
Author
There was a problem hiding this comment.
[issue] What is this function doing?
sdavisde
commented
Jul 30, 2026
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.
Dogfood fixture — do not merge. This branch exists so redquill's PR review mode (
R→ Pull Requests) has a real GitHub PR to review against, with enough substance to exercise line comments, file comments, hunk navigation, and per-file review status.That said, the code is real and the tree is green:
cargo build,cargo test(1576 pass),cargo clippy --all-targets -- -D warnings,cargo fmt --check.What's here
Two commits, deliberately different in shape:
feat(diff): roll a review up into one summary— newdiff::summarizeproducing aReviewSummary(file/binary counts, total churn, largest file and hunk), plusDiffStat::total/net/is_emptyandHunk::changed_lines.build_reviewcomputes it once on the snapshot build. Docs indocs/diff-summary.md; README typo fix rides along.feat(ui): carry the review summary on App and flag binary files—Appholds the summary, suspends/restores it with the commit and file views, and the git panel's counts line grows a[N bin]chip.11 files: a new module with its own tests, several small multi-hunk edits, a new markdown doc, and one all-additions doc/test block — a mix worth scrolling through.
Known review bait (intentional)
build_reviewnow walks the files twice: once for the per-fileStatDisplaymap, once insidesummarize. The comment above that loop used to promise a single pass. Worth arguing about.ReviewSnapshotcarries bothtotalandsummary.stat, which are the same number by construction.ReviewSummary(largest_file,largest_hunk,content_files,net()) has no consumer yet — onlybinary_filesis rendered.🤖 Generated with Claude Code
https://claude.ai/code/session_011wAgKziALkaqa3WNEibtX7