# GitHub Rebuilds the Copilot App's Diff Surface to Open Million-Line Pull Requests Without Jank

> Source: <https://www.infoq.com/news/2026/11/github-pull-requests-rebuild/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global>
> Published: 2026-11-16 07:32:00+00:00

GitHub engineering has [published a detailed account](https://github.blog/engineering/user-experience/rendering-huge-pull-requests-in-the-github-copilot-app/) of how it rebuilt the diff surface in the GitHub Copilot app to open a pull request with 2,200 files, over a million changed lines and more than 400 inline review comments without turning the review into a waiting exercise.

The post, by Principal Design Engineer Alberto Gimeno, lands at a moment when AI coding agents are producing far more pull requests than reviewers can digest, and the bottleneck has moved from writing code to reading it.

At the heart of the rebuild is a decision to stop pretending a pull request is a single uniform list. Code rows have a known height at a known font size, so their geometry can be computed up front and never rebuilt. Comments do not. A markdown body wraps differently at different widths, `<details>` sections can be toggled in place, reply composers grow as a user types, and images change height when they load. Rather than force one variable-height virtualizer to absorb both, the team split the document into two independent domains:

```
total height = deterministic code height
 + Σ dynamic block effective heights
 + scroll padding
```

Dynamic blocks are keyed by identity (file, line, side) rather than pixel position, with a fingerprint tracking content, open state and measurement width. A single idle-gated measurement pass reads mounted blocks in one batch, scoped to roughly 2,400 pixels around the viewport, and corrections are anchored to whatever the reader is looking at so the surface never fights an active scroll.

Gimeno is open about an early mistake, the team's first instinct was one `ResizeObserver` per block writing heights back into the layout, a classic feedback loop whose cost grows with every mounted block. The shipped design keeps the observer but defaults it to flagging rather than writing, with a deliberate frame-synchronous exception when the user toggles a `<details>` or expands a reply composer, so the code below moves in the same frame.

The work builds on an [April 2026 post](https://github.blog/engineering/architecture-optimization/the-uphill-climb-of-making-diff-lines-performant/) from the main [github.com](http://github.com) files-changed team, who reported that unified-view diff lines previously rendered as roughly eight React components and ten DOM elements each, and cut both roughly in half.

GitHub's own [stacked pull requests](https://docs.github.com/en/pull-requests/how-tos/stacked-pull-requests) went into public preview on 30 July 2026 as an explicit answer to AI-generated monsters, and a [DEV Community piece](https://dev.to/code-board/why-large-pull-requests-are-killing-your-code-quality-in-2026-52ij) cited Microsoft research finding review quality degrades sharply once a pull request exceeds roughly 200 lines, a rounding error against the Copilot app's million-line test case.

Third-party tools have filled the gap from the review side. [Graphite](https://graphite.dev/), [Pullfrog](https://pullfrog.com/) and [CodeRabbit](https://coderabbit.ai/) each take different runs at agent-era review, with Codegen CEO Jay Hack [arguing](https://codegen.com/code-review-bottleneck/) that the winners in this new era will be the teams that redesign their workflows around the fact that review, not code, is now the bottleneck.

The team also describes the measurement loop built around the rebuild. The surface carries permanent structured probes for its own invariants, which run as CI budgets against a synthetic huge-pull-request fixture, and an autopilot drives the real desktop app through a scripted flow, cold and warm, so an agent can read the on-disk log and spot regressions without anyone at the keyboard. Gimeno's closing line is addressed to anyone who reviews code for a living: open the worst pull request you have got.
