fix(agent-chat): glide mouse wheel notches on the shared scroll clock

Merged
TE
9d ago
+561-11

Leo: "smoother scrolling in webkit: i mean with a mouse instead of just trackpad. i have mos and lawrence doesn't, tho we'd presumably be doing a bit of our handrolled mos-ish thing".

Recuts and credits #24327 on current feat-cmux-next. Discrete mouse notches ease their distance on the existing shared jump animation runner; precise trackpad/Mos scrolling remains native. The original default-on Debug setting is retained. No second animation clock, row-id compensator or per-token row scan is added. Explicit Find/reveal/Send placements own their position; the host's animation-speed token and Reduce Motion are honored.

Landed at d76bfca6eeabd8658c824d1bede56072fb62a974, reviewed head 6f94bd6389df0e6815fb1eba17e401d7b16dfc7e. Review (gpt-6-astra, xhigh): SHIP at that head. Its 22 deterministic unit tests passed. Subsequent real WebKit browser measurements exposed a one-pixel rounding tail; #26135 contains the focused final correction rather than claiming this old head was free of that defect.

Before/after recordings below show the complete feature with #26135 applied: before base aa82735368f69b31aafcd6666304502a7716bc62 (run40485963038), after a38d2a5a62c7513f88fee35cb8d9f83d45daca73 (run40488708004). The latter passes25unit+12browser cases, full2862-file typecheck and base-compared web lint. Maximum Chromium frame step100→34px, WebKit41→29px, eight moving frames and exact100px landing in both engines. Headless Linux uses a real Chromium wheel and a constructed macOS WebKit non-precise notch, not macOS hardware input. These are actual fixture recordings, never Leo's screenshots.

BrowserBeforeAfter
ChromiumBefore ChromiumAfter Chromium
WebKitBefore WebKitAfter WebKit

Full recordings: , , , . These are browser fixture captures, not Leo's screenshots. SHA-256 and capture provenance were verified before upload. The publisher defers image OCR to the repository's privacy workflow on Linux.

One frame loop ends after its wheel distance is covered or when a native wheel, another input, an explicit placement/jump, hiding, chat switch or removal takes ownership. Cleanup cancels the frame and transient input/visibility listeners; unmount removes the installer wheel listener. Existing row-id anchor and follow-state ownership stay unchanged. Rail-opus owns user-scroll intent gating; explicit wheel arbitration stays with the installer.

Agent session: agent session