webviews bench: hover sweep over the compact thread rail

Merged
TE
2d ago
+445-0

Adds webviews/bench/thread-rail-hover.bench.ts, a bench for the compact thread rail's hover path, for before/after numbers on the rail hover lag Leo named (2026-11-04: "hovering across the session rail gets a bit laggy ... it needs to get faster", "hover previews kinda lag").

A 1,000-prompt chat in the real pane (production build of its dev entry, stand-in acpmux, Chromium, as thread-minimap-frame-cost.bench.ts). The pointer sweeps up and down the drawn ticks at 2 px per 8 ms for 4 s. It reports per-frame main-thread busy time (p50/p95/max, script and render apart), long tasks, layout forced from script, style/paint totals, the row latency (pointermove into a row to the first frame showing it active with its card text), Event Timing for the ticks' pointerover, and with PROFILE=1 the top self-time functions. ARMS=plain,seethrough adds the app's see-through root attribute so the card's see-through blur runs.

bun bench/thread-rail-hover.bench.ts [rounds=3] [turns=1000]

Bench only: no shipped code changes.

Changelog

none

Agent session: agent session

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds webviews/bench/thread-rail-hover.bench.ts, a benchmark for the compact thread rail's hover path, to capture before/after numbers on the hover lag seen when sweeping across the rail. Bench only: no shipped code changes.

  • Runs a 1,000-prompt chat in the real pane on Chromium and sweeps the pointer across the rail's ticks at 2 px per 8 ms.
  • Reports per-frame main-thread busy time (scripting and rendering apart), long tasks, layouts forced from script, row latency from pointermove to the first frame showing the row, and Event Timing for the ticks' pointer events.
  • PROFILE=1 adds a CPU profile with top self-time functions; ARMS=plain,seethrough covers the see-through blur path.
  • Run with bun bench/thread-rail-hover.bench.ts [rounds=3] [turns=1000].