GitHub Copilot rebuilt its pull request view to handle enormous changes.
Some refactors cannot be split cleanly, creating single pull requests with massive diffs. The review experience must remain fast and smooth despite this scale.
The team tested the limits using an open source project with over a million changed lines. This specific project also had more than 400 inline review comments attached to it.
Rendering code rows is well understood through virtualization techniques. Every line of code has a known height based on font size and layout.
Comments are the difficult part because their height depends on rendering time. Markdown wrapping, expandable sections, and loading images all affect comment size.
The old design assumed all heights were known before the page painted. This contract breaks when dynamic content like reply boxes or images appear.
GitHub split the document geometry into two independent domains. The first domain handles deterministic code height exactly as calculated upfront. The second domain manages dynamic blocks that measure their own effective heights.
Dynamic blocks use stable keys anchored to files and lines rather than pixels. This prevents reflow from losing track of review threads during resizing.
The system records fingerprints of content changes to update heights efficiently. Width measurements are rounded into buckets to avoid invalidating data on window resize.



