StickToBottomState
"Stick to bottom" for a chat list (the idea behind AI Elements' use-stick-to-bottom), for a normal top-to-bottom LazyListState:
While following, every layout change that leaves content below the viewport — a streamed token, a Markdown block finishing parsing, a Mermaid or KaTeX WebView reporting its height, an image decoding, the keyboard opening — pins the list back to the bottom, instantly (no animation to fall behind the stream).
The moment the user drags toward older content, following stops. Growth happens below the viewport, so what they are reading never moves.
Scrolling back to the very bottom, or jumpToLatest, resumes following.
Anything that moves the list away from the bottom that we didn't do ourselves — a drag or fling, but also accessibility scroll actions, keyboard paging or app code calling scrollToItem — stops following, so pinning never fights whoever is scrolling.