cd /news/ai-agents/github-rebuilds-the-copilot-app-s-di… · home › topics › ai-agents › article
[ARTICLE · art-170473] src=infoq.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

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

GitHub principal design engineer Alberto Gimeno published an engineering account of rebuilding the diff surface in the GitHub Copilot app so it opens a pull request with 2,200 files, more than a million changed lines and over 400 inline review comments without jank. The rebuild splits the document into deterministic code rows, whose geometry is computed up front, and dynamic blocks keyed by file, line and side, measured in a single idle-gated pass scoped to roughly 2,400 pixels around the viewport; an early design using one ResizeObserver per block writing heights back into layout was replaced with an observer that flags rather than writes. The work follows GitHub's April 2026 post that cut unified-view diff lines from roughly eight React components and ten DOM elements each to about half, and GitHub's stacked pull requests, which entered public preview on 30 July 2026 as a response to AI-generated large pull requests.

by read3 min views1 publishedNov 16, 2026
GitHub Rebuilds the Copilot App's Diff Surface to Open Million-Line Pull Requests Without Jank
Image: source

GitHub engineering has published a detailed account 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 from the main 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 went into public preview on 30 July 2026 as an explicit answer to AI-generated monsters, and a DEV Community piece 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, Pullfrog and CodeRabbit each take different runs at agent-era review, with Codegen CEO Jay Hack arguing 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.

── more in #ai-agents 4 stories · sorted by recency
── more on @github 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/github-rebuilds-the-…] indexed:0 read:3min 2026-11-16 · —