# Unclosed TeX composer performance proof

Real Linux web dev client, Chromium 156.0.8078.4 headless, 1440x1000, light theme,
no CPU throttling. Both commits ran on the same machine in separate checkouts,
with each checkout's lockfile installed and its own fresh database. Dev servers
used T3CODE_DEV_SEED=0. A synthetic git repository contained only README.md.
No provider turn was sent. The scenario runner documentation excludes timing
regressions, so this uses the manual real-browser route.

For each workload, the driver clears the composer; types `check `, then
`@README`; waits for the README.md suggestion and presses Enter to create its
mention chip; types one space; writes the workload to the real browser clipboard
and pastes with Control+V; then presses t, y, p, i, n, g individually.

Workloads: `( a ` x1500 (control), `\( a ` x250/500/1000/1500, and bare `\[` lines
x1000/1500. Each case has three independent clear-and-paste repeats, six timed
keys per repeat: 126 timed keys per commit. The literal inline chunk in the
JavaScript driver is a single backslash, open parenthesis, space, a, space.

A capture-phase keydown/paste listener records performance.now(), requests an
animation frame and then a zero-delay timer. Its elapsed value measures the
first post-render paint opportunity, rather than physical display latency.
The same metric and unchanged driver are used on both commits. Raw JSON keeps
every key value, every paste value, run medians and main-thread long tasks.
The comparison uses the median of three run medians and displays the entire
range of those run medians. No concurrent encoding, builds, or measurements
were run during either final browser pass.

The driver checks the complete reconstructed composer text, including all
paragraph breaks, and keeps its SHA-256 plus the README mention-chip count.
For multiline paste, the editor inserts a paragraph boundary before the pasted
lines; this normal behavior is included in the expected text on both sides.
The hash and one-chip invariant must match for every repeat of the same case.

The on-page panel is driver-generated measurement output. Only the machine's
run-context label is hidden for privacy; the composer is untouched. Stills are
taken after blurring the editor, when two screenshots 500 ms apart are identical.
Their panels show the third repeat; the comparison chart summarizes all three.
Videos retain real elapsed time; only initial pairing/setup is trimmed.
Shared images and videos use the same 850x540 crop (x=280, y=45) of the
1440x1000 viewport, keeping the measurement panel and complete visible composer
text. This excludes private environment labels, including a reconnect notice
that appeared during the long base freezes; input remained local and intact.

Reproduce with isolated checkout paths and an output directory of your choice:

    T3CODE_DEV_SEED=0 vp run dev
    node seed.cjs CHECKOUT SYNTHETIC_WORKSPACE
    node measure.cjs CHECKOUT ORIGIN base BASE_SHA OUTPUT_DIRECTORY
    node measure.cjs CHECKOUT ORIGIN head HEAD_SHA OUTPUT_DIRECTORY
    python3 summarize.py BASE_MEASUREMENTS HEAD_MEASUREMENTS OUTPUT_DIRECTORY

Run each measure command against its matching checkout/server, sequentially.
Install dependencies separately after checking out each commit: the fix changes
a pnpm dependency patch. The driver uses the repository's installed
playwright-core and browser. seed.cjs reproduces the synthetic fixture.
