Add diff-stats-by-extension#9476
Draft
samaluk wants to merge 5 commits into
Draft
Conversation
Open
5 tasks
Extract pure aggregation for basename labels and per-extension +/− totals with vitest coverage.
Wire click on native diffstat to anchored popover with per-extension breakdown from REST pull files API, caching, and cursor affordance CSS.
Hosts screenshot for raw.githubusercontent.com links in gh-generated text.
Import feature entry point and refresh readme-parser snapshots.
Restore the feature import after dropping the broken root commit, refresh imported-features metadata, and exempt the readme entry from the inline screenshot rule (preview lives under media/).
044fc5e to
dd64996
Compare
|
Please avoid force-pushing to this PR. It makes it harder for reviewers to track what changed since the last review. Just push new commits on top of the branch instead — PRs are squashed on merge, so the commit history doesn't need to be clean. |
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.
Closes #9475
This adds
diff-stats-by-extension, a small enhancement for PR review: clicking GitHub's existing line-count diffstat opens a popover with additions and deletions grouped by file extension.I kept the native diffstat in place and only intercept a normal left click. Cmd/Ctrl-click and other altered clicks still fall through to GitHub. The numbers come from the PR files REST endpoint, so the feature uses GitHub's own changed-file metadata instead of parsing patches locally.
The grouping logic is split into a helper with focused Vitest coverage, and the feature runs on both the Conversation and Files tabs. For very large PRs, the popover notes when the file list may have been capped.
Fork-side review PR: samaluk#1
Test URLs
easy-toggle-files- Apply to code search #7036Screenshot