You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parent: #397. Blocked by: the #397 fix (touches the same machine; land after it).
What to build
Hardening for the thread-follow machine, adopting the escape/asymmetry semantics use-stick-to-bottom and assistant-ui both converged on:
Shrink vs growth asymmetry (use-stick-to-bottom): when content shrinks and the viewport is near-bottom, silently re-lock to bottom-following without scrolling; a collapsing panel must never move a reader. Growth chases only when genuinely pinned. Our onResized currently treats all resizes alike.
Immediate escape hatches: escape the pin on wheel-up (deltaY < 0) immediately, before any scroll event lands; cancel pending follow intent on pointerdown on the scroll container (assistant-ui does this to stop a stale intent hijacking the next content growth); do not re-pin while text selection is active (users select streaming text).
Content-shift vs user-scroll discrimination (assistant-ui): treat an upward scrollTop move as user intent only when scrollHeight is unchanged, so reflow above the viewport is never misread as a scroll-up.
Our machine already listens on wheel/touchmove/keydown; scrollbar-thumb drags and selection currently race the observers.
Acceptance criteria
Collapsing a card near the bottom re-locks without a visible scroll
Wheel-up during an active follow animation detaches instantly
Selecting text in a streaming message does not get yanked
Reflow above the viewport (content shrinking) does not detach a pinned viewport
Wheel-up instant escape: the wheel listener now issues scrollTo({top: current, behavior: 'instant'}) before dispatching wheelUp, hard-stopping any in-flight smooth-scroll animation, then the machine detaches as before.
Pointerdown intent cancel: already implemented pre-series (pointerDown → abandonSeek, covered by an existing test) — no change.
Selection guard: new pointerMove (only with a button held) mirrors the existing touch-drag concept into mouse drags — selection drags and scrollbar-thumb drags now enter dragging and block re-pins; pointerUp/pointercancel release through the shared onDragReleased. Bare taps deliberately do NOT detach (preserves the "tap that never moves keeps following" invariant).
Content-shift discrimination: already covered — draggedUp() requires unchanged scrollHeight before reading an upward move as user intent, and atBottom is always computed from absolute position, never delta. No change.
Note: the shrink re-lock is the prime suspect in a follow-up yank reported during live testing (see the RCA comment on #397) — it may gain a "was already pinned before the shrink" guard.
The shrink re-lock added here is confirmed as the decision-point behind the near-bottom yank — full instrumented RCA posted on #397 (native scrollTop clamp from the auto-collapsing reasoning card is misread as "user at bottom"). The branch is being superseded by the use-stick-to-bottom port; the zero-movement follow-up (defer auto-close while detached) is tracked in the #397 RCA comment.
Activity
omridevk commentedon Aug 11, 2026
Implemented on
fix/397-transcript-repin(commit fbed913), on top of the #397 fix.scrollHeightwhile not dragging and near the new bottom re-entersfollowingdirectly — state relabel only, no seek plan, so no visible scroll. Growth keeps Transcript re-pins to the bottom when content grows after the hold window #397 semantics.scrollTo({top: current, behavior: 'instant'})before dispatchingwheelUp, hard-stopping any in-flight smooth-scroll animation, then the machine detaches as before.pointerDown → abandonSeek, covered by an existing test) — no change.pointerMove(only with a button held) mirrors the existing touch-drag concept into mouse drags — selection drags and scrollbar-thumb drags now enterdraggingand block re-pins;pointerUp/pointercancelrelease through the sharedonDragReleased. Bare taps deliberately do NOT detach (preserves the "tap that never moves keeps following" invariant).draggedUp()requires unchangedscrollHeightbefore reading an upward move as user intent, andatBottomis always computed from absolute position, never delta. No change.Note: the shrink re-lock is the prime suspect in a follow-up yank reported during live testing (see the RCA comment on #397) — it may gain a "was already pinned before the shrink" guard.
omridevk commentedon Aug 11, 2026
The shrink re-lock added here is confirmed as the decision-point behind the near-bottom yank — full instrumented RCA posted on #397 (native scrollTop clamp from the auto-collapsing reasoning card is misread as "user at bottom"). The branch is being superseded by the use-stick-to-bottom port; the zero-movement follow-up (defer auto-close while detached) is tracked in the #397 RCA comment.
fix(ui-kit-chat): thread-follow hardening — shrink re-lock, wheel/poi…
fix(ui-kit-chat): drop the per-tick wheel scrollTo cancel that fought…
refactor(ui-kit-chat): replace thread-follow machine with a Solid por…
test(ui-kit-chat): behavior stories for the scroll owner and card con…
test(solid-stick-to-bottom): convert the resume browser test to real-…
test(ui-kit-chat): stories assert follow state via data attributes, n…
Chat transcript scroll ownership: Solid port of use-stick-to-bottom, …