{"slug": "github-rebuilds-the-copilot-app-s-diff-surface-to-open-million-line-pull-without", "title": "GitHub Rebuilds the Copilot App's Diff Surface to Open Million-Line Pull Requests Without Jank", "summary": "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.", "body_md": "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.\n\nThe 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.\n\nAt 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:\n\n```\ntotal height = deterministic code height\n + Σ dynamic block effective heights\n + scroll padding\n```\n\nDynamic 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.\n\nGimeno 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.\n\nThe 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.\n\nGitHub'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.\n\nThird-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.\n\nThe 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.", "url": "https://wpnews.pro/news/github-rebuilds-the-copilot-app-s-diff-surface-to-open-million-line-pull-without", "canonical_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_at": "2026-11-16 07:32:00+00:00", "updated_at": "2026-11-16 10:19:39.908953+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-products", "artificial-intelligence"], "entities": ["GitHub", "GitHub Copilot", "Alberto Gimeno", "Graphite", "Pullfrog", "CodeRabbit", "Codegen", "Jay Hack"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/github-rebuilds-the-copilot-app-s-diff-surface-to-open-million-line-pull-without", "markdown": "https://wpnews.pro/news/github-rebuilds-the-copilot-app-s-diff-surface-to-open-million-line-pull-without.md", "text": "https://wpnews.pro/news/github-rebuilds-the-copilot-app-s-diff-surface-to-open-million-line-pull-without.txt", "jsonld": "https://wpnews.pro/news/github-rebuilds-the-copilot-app-s-diff-surface-to-open-million-line-pull-without.jsonld"}}