How GitHub renders a 2,200-file, 1M-line pull request without jank
GitHub Blog AI/ML · rss · 2026-09-24
GitHub's engineering blog details rebuilding the pull request view in the Copilot app to handle extreme diffs, stress-tested on an open source PR with 2,200 files, over 1M changed lines, and 400+ inline comments.
Key takeaways:
- Pure code diffs rely on an "all heights known before paint" contract: imperative recycled row renderers, typed-array geometry, and backend-streamed diff documents keep per-frame work constant.
- Comments break that contract — their height depends on markdown wrapping, expandable blocks, reply composers, and image loading, so estimators fail at the extremes and post-paint corrections cause scroll jumps.
- The fix splits geometry in two: exact deterministic code height plus a separate dynamic-block index keyed by identity, with fingerprints and width-bucketed cached measurements.
- Their first design (one ResizeObserver per block) was rejected as a self-retriggering feedback loop; the shipped solution is a single idle/scroll-gated measurement pass scoped to 2400px around the viewport, batch-reading mounted blocks in one reflow.
More from coding & agent
- YouArt Desktop launches: AI agent edits video in CapCut, DaVinci and Premiere from client feedback — mhdfaran · 2026-11-11
- Boubou: one-command local voice AI that serves your phone and robots over Wi-Fi — LuozhuZhang · 2026-11-11
- Python 3.15 makes AttributeError actionable: suggests .append for .push mix-ups — KhuyenTran16 · 2026-11-11
- sentence-transformers maintainer releases new embedding pooling training method, code & checkpoints — tomaarsen · 2026-11-11
- droid-mcp turns your Android phone into an MCP server with 160+ tools for Claude Code — zvone1122 · 2026-11-11
- The decade of agents: simulate real customers to test your agent before launch — EXM7777 · 2026-11-11