Files
Codeman/test
Codeman maintainer c29e323bb6 feat(story-mode): the wire updates in place and glides after new events
The Director's cut rebuilt the whole wire with replaceChildren on every
refresh (every 4 s poll and SSE burst of a running turn), so it never
followed new events and a rebuild could throw the reader's place, focus
and hover away.

Rows are now keyed by event id and headings by the row they head (a panel
that changes kind or number as the turn grows keeps its heading node).
Unchanged nodes are reused, a changed row is patched in place (a running
tag flips to its result on the same node), new rows are inserted in
order with a short transform and opacity entrance, and a new turn
replaces the list. _storyEventRow still builds every row.

While the wire follows, it glides to the newest row with a critically
damped spring on animation frames: a burst of updates moves the target
and the glide keeps its speed, so there is no stop and restart. Measured
against the browser's own smooth scrollTo on a growing transcript, the
spring moved a median 8 px a frame over ~25 frames with no stalls, while
scrollTo snapped at ~41 px a frame over ~10 frames and its read of the
new scrollHeight forced a layout inside the update (a 57 ms long task).

Scrolling up by hand (wheel, touch, scroll keys, the scrollbar) stops
following and shows a pill that counts the rows that came in since;
clicking it, or scrolling back to the bottom, follows again. The glide
only moves down and is never read as the reader scrolling up. A running
newest turn, and the Director's cut turned on during one, open at the
bottom, following; a finished turn opens at the top. Under
prefers-reduced-motion there is no entrance and the list jumps.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-19 05:25:32 +02:00
..
2026-06-19 17:58:06 -04:00
2026-06-19 17:58:06 -04:00
2026-08-22 14:13:57 +02:00
2026-07-20 02:36:02 +02:00
2026-06-19 13:10:17 -04:00