CodeNomad/packages
Pascal André be10e46d2f
fix(chat): give each transcript scroll decision a single owner (#967)
fix(chat): give each transcript scroll decision a single owner

Fix three proven message-scroll conflicts without adding delays or a new
control layer.

Session switch oscillation: when a restored anchor was already mounted,
content-rendered and resize notifications re-issued scrollToIndex (start of
the message) while the restore stabiliser re-applied the saved intra-message
offset. The two imperative Virtua targets fought each other, producing the
rapid back-and-forth seen after A -> B -> A while A streams. A mounted anchor
with a recorded offset is now corrected only through that offset; the index
jump is issued only while the anchor is unmounted.

Premature follow resumption: the 48px proximity tolerance doubled as user
authorisation to follow, so stopping a manual read just above the bottom
re-pinned the transcript. A user gesture now resumes follow only at the true
bottom (1px) or through an explicit command (bottom button, End, submit). The
48px tolerance only keeps an already-following reader pinned. A manual reader
above the true bottom keeps the scroll-to-latest button and its exact anchor
in the session snapshot, so returning to the session restores the same gap
instead of jumping to the bottom without following.

Late history paging: a pending older/newer page kept positioning authority
after a new gesture and could pull the reader back. An opposite directional
gesture now aborts the page through the existing controller before it
positions the view. Taps, content clicks and horizontal wheel input carry no
direction and no longer cancel it; a same-direction gesture keeps it running.

Validation: new tests/browser/message-scroll.test.ts (22 cases with real
SessionView and native event dispatch) fails on the previous code and passes
with the fix, alongside a controller unit test for the true-bottom rule.
Related browser suites (session rendering, history navigation, search,
restore, streaming outline) and the UI unit suites pass. The intermittent
render-cost "unrelated child text" case fails at the same rate or less than
on dev (2/12 vs 4/12). A nominal backward jump while streaming at the bottom
was not reproduced and is not claimed fixed.
2026-10-15 11:53:15 +02:00
..
cloudflare chore(release): prepare stable 0.20.1 (#842) 2026-10-03 15:47:14 +02:00
electron-app feat(desktop): localize native menus and open About in Settings → Info (#963) 2026-10-15 00:42:23 +02:00
remote-tunnel fix(remote-control): keep a connected tunnel open past the start deadline (#931) 2026-10-13 02:12:22 +02:00
server fix(pending): name the cause, folders and sessions in the recovery warning (#965) 2026-10-15 09:17:31 +02:00
tauri-app feat(desktop): localize native menus and open About in Settings → Info (#963) 2026-10-15 00:42:23 +02:00
ui fix(chat): give each transcript scroll decision a single owner (#967) 2026-10-15 11:53:15 +02:00