Skip to content

feat: show diff stats on PR & commit list#15

Merged
rrbe merged 2 commits intomainfrom
feat/pr-commit-diff-stats
Apr 23, 2026
Merged

feat: show diff stats on PR & commit list#15
rrbe merged 2 commits intomainfrom
feat/pr-commit-diff-stats

Conversation

@rrbe
Copy link
Copy Markdown
Owner

@rrbe rrbe commented Apr 22, 2026

Summary

  • Add a +A −D · N files badge to each row on the PR list page, matching GitHub's native color tokens and theme
  • Data fetched via a single batched GraphQL query through the service worker, with 5 min session cache + inflight dedupe (same pattern as pr-review-status)
  • Gated by a new feature-pr-diff-stats toggle in options; requires a GitHub token

Test plan

  • pnpm build succeeds; load unpacked dist/ in Chrome
  • Configure a GitHub token in extension options
  • Visit /{owner}/{repo}/pulls and confirm each row shows the stats pill
  • Verify +/−/file count values match GitHub's own PR detail page
  • Toggle the option off — badges disappear live
  • Revisit within 5 min — no extra GraphQL request (session cache hit)
  • With no token configured, feature silently no-ops
  • Dark mode renders correctly

🤖 Generated with Claude Code

rrbe and others added 2 commits April 22, 2026 16:43
Add a +A −D · N files badge to each row on PR list pages,
backed by a batched GraphQL query through the service worker
with 5min session cache (same pattern as pr-review-status).
Requires a token.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors the PR Diff Stats feature on the commits list page via a
single batched GraphQL query (5 min session cache + inflight dedupe).
Extracts shared helpers along the way: buildDiffStatsBadge for the
badge DOM, collectCommitRows for commit-row discovery (also adopted
by commit-tags), and fetchGraphQLBatch to collapse the three near-
identical aliased GraphQL handlers in the service worker.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rrbe rrbe merged commit 5885ef7 into main Apr 23, 2026
@rrbe rrbe deleted the feat/pr-commit-diff-stats branch April 23, 2026 00:55
@rrbe rrbe changed the title feat: show diff stats on PR list feat: show diff stats on PR & commit list Apr 23, 2026
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