GitHub Rebuilds Code Review for Giant Pull Requests
GitHub reworked code review in the Copilot app: diffs now open without lag even in pull requests with a million lines, thousands of files, and hundreds of c
Blog · Published: 4 December 2026 · 5 min read

GitHub Rebuilds Code Review for Giant Pull Requests
GitHub engineers have published a detailed breakdown of how they rebuilt the diff-viewing system in the Copilot app to open a pull request with 2,200 files, more than a million changed lines, and over 400 comments without interface freezes. Details are laid out in the piece GitHub Rebuilds the Diff View for Huge PRs, and it's not about cosmetics — it's about a problem nearly every team faces: code today is written faster than code review can keep up.
The author of the piece, principal design engineer Alberto Gimeno, directly ties the task to the rise of AI agents — they generate pull requests faster than humans can read them. The bottleneck has shifted from writing code to checking it, and that is exactly why code review at this scale required a dedicated engineering solution rather than a cosmetic interface tweak.
Key figures from GitHub's breakdown give a sense of the scale of the task:
- a pull request with 2,200 files and more than a million changed lines
- over 400 inline comments in a single review
- the interface measurement range limited to roughly 2,400 pixels around the visible viewport
- diff row rendering cut in half — down to four React components and five DOM elements
How the New Change-Viewing System Works
The main architectural decision was to stop treating a pull request as a single uniform list. Code lines and comments are measured and processed separately, which noticeably simplifies subsequent code review even for very large changes.
Separating Code and Comments
Code lines have a fixed height at a known font size, so their geometry can be calculated in advance and never recalculated. Comments behave differently: markdown wraps differently depending on block width, expandable sections change height, the reply field grows as text is typed, and images add height after loading. The resulting page height is made up of the deterministic height of the code, the sum of the dynamic blocks, and the scroll padding.
A Single Measurement Pass Instead of a Chain of ResizeObservers
The first attempt was to subscribe via a ResizeObserver on each block, writing the height straight back into the layout — a classic feedback loop whose cost grows with the number of elements. In the final version, the observer is kept, but by default it only flags a change rather than writing it immediately; real-time writing happens only on an explicit user action, such as expanding a section or expanding the reply field, so the code below shifts within the same frame.
Why Pull Request Size Is Critical for Code Review
The piece references Microsoft research showing that review quality drops sharply once a pull request exceeds roughly 200 lines. Against that backdrop, the million-line test case looks extreme, but it clearly illustrates the limit the industry is heading toward as code auto-generation grows.
Responses to the same challenge include GitHub's own "stacked" pull requests, which entered public preview in summer 2026, and third-party tools like Graphite, Pullfrog, and CodeRabbit, each taking a different approach to speeding up pull request analysis in an era when code isn't written by humans alone.
- breaking large changes into logical parts before submitting for review
- using automated checks as a first filter before human code review
- enforcing interface and logic invariants through CI budgets rather than manual testing
What This Means for Teams That Maintain Websites
Even the fastest diff viewer doesn't replace an independent check of the result after publication. A large merge into a site's code — a theme, a plugin, an analytics script — can silently affect load speed, indexing, or SSL settings, even if code review went through formally without issues.
That's why the practice of handling large pull requests should logically be complemented by regular technical site audits after major releases: checking page availability, redirect correctness, response speed, and basic security parameters.
- load speed and stability after deployment
- redirect correctness and absence of broken links
- SSL certificate status and security headers
- page indexability for search engines
Check how much of this is on your own site
A free scan surfaces broken links, JS errors and performance problems in about a minute.