# Expanded diff scroll proof

Environment: Windows Server 2025 Datacenter 10.0.26100, headless Chromium 156.0.8078.4, Playwright 1.64.1, Node 26.14.0. Viewport 1280×800, light theme.

Base: 20c86ce416a732d823bafd71c1a8233495e7329b (merge-base with main). Head: 8757dcdf0c5a9b9f6ed841f159d55bc1a2198dfe. Each ran from its own worktree with `vp i`, `T3CODE_DEV_SEED=0`, and `vp run dev`; base port offset 100, head offset 200. Fresh server databases; no production data. Optional Rust process telemetry was unavailable on both sides.

## Reproduce

1. Run `node mkrepo.mjs <synthetic>/diffrepo` once. It generates eight changed files, big.ts +170/-150.
2. In each running checkout, run `node apps/server/src/bin.ts project add <synthetic>/diffrepo --title diffrepo --base-dir <checkout>/.t3`.
3. Mint a pairing link with `node apps/server/src/bin.ts pair --base-dir <checkout>/.t3`. Set PAIR_URL to that link, T3_URL to the web origin, and STATE_FILE to an isolated storage-state file. The driver saves authentication there after pairing. Omit PAIR_URL on later runs. Never publish the pairing link or storage-state file.
4. Provide Playwright 1.64.1 to drive.mjs (importable as playwright, or PLAYWRIGHT_MODULE pointing at its index.mjs). Run `node drive.mjs <new-output-directory> time-stock 5`. Alternate base/head three times, using a new output directory each time.
5. The driver opens New thread, selects diffrepo, opens Changes (Uncommitted), expands only big.ts, resets scroll to zero, then sends 40 wheel events of 40 px at 16 ms intervals over the diff. It stays within big.ts. CDP Performance metrics are sampled before the wheels and 1000 ms after them. All passes scrolled exactly 1600 px.
6. The first pass of each browser run is a prespecified warm-up, retained in raw data but excluded from reported medians. Timing used mode time-stock: no setter instrumentation, no video recording, and no modification to the renderer on either commit.
7. Separately set RECORD_VIDEO=1 and run `node drive.mjs <new-output-directory> count 3` on each side. This instruments the innerHTML setter to count byte-identical writes while forwarding every write. Count/video timings are not part of the performance result.

measurements.json contains all 30 timing passes, the six count passes, component medians and environment. All rendered shadow-root content hashes match. Final screenshot crops have zero differing pixels. Still captures were accepted only after two screenshots 500 ms apart were identical (caret hidden). Published video removes the first 19 seconds of navigation and crops x=742,y=0,width=538,height=800 to show only the Diff panel. Playback speed is unchanged. Videos show three passes with resets between them. Screenshot crops use the same rectangle; the full browser viewport was 1280×800 throughout.

Timing result: base 685.5 ms (range 560–851), head 378 ms (335–499), 44.9% lower median. The 307.5 ms improvement exceeds either warmed-pass range width (291 ms / 164 ms). Browser-run medians: base 651.5, 727, 619.5 ms; head 405.5, 400, 372 ms. Redundant writes per count pass: base 2131,2131,2131; head 0,0,0.

The thread Diff panel uses the shared StyledDiffCodeView/VirtualizedFileDiff renderer. The authenticated PR Code tab and physical Windows 11 pointer lag were not measured. No model was invoked.
