fix(desktop): stop streaming autoscroll bounce; move attachments below user bubble
Streaming auto-follow chased content growth while parked at the bottom, which rubber-banded — the tail pin and the virtualizer's own measurement adjustments fought for scrollTop. Drop it; the one-time new-turn jump already lands a fresh message in view and the viewport stays put after. Attachments rendered inside the editable user bubble and were collapsed via an IntersectionObserver + [data-stuck] CSS hack while the bubble was pinned. Render them as a flow sibling BELOW the sticky bubble instead, so they scroll away behind it naturally — no observer, no collapse. Image refs still render as thumbnails, file refs as chips; no border. Removes the now-unused useStuckToTop hook and its CSS.
This commit is contained in:
@@ -918,17 +918,6 @@ canvas {
|
||||
mask-image: none;
|
||||
}
|
||||
|
||||
/* Attachment chips sit above the clamped text. They render normally in flow,
|
||||
but collapse to nothing while the bubble is stuck to the top of the viewport
|
||||
(data-stuck, set by an IntersectionObserver sentinel) so a prompt with
|
||||
attachments can't eat the screen as you scroll past it during a stream. */
|
||||
[data-stuck='true'] .sticky-human-attachments {
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
border-bottom-width: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* The thread renders items in natural document flow (padding spacers, not
|
||||
transforms) and @tanstack/react-virtual already adjusts scrollTop itself
|
||||
when an off-screen turn is measured and its real height differs from the
|
||||
|
||||
Reference in New Issue
Block a user