EACI Development Journal · UX

How Do You Keep a Chat Log Stuck to the Bottom?

Auto-scroll should follow new messages only while the reader is already near the bottom. That small condition prevents the interface from fighting someone reading older turns.

UX ~5 min issue-tagged
Issue this fixes

Streaming replies change height many times, not once. Images, fonts, and status elements can also reflow after a message is inserted, so a single `scrollTop` assignment is unreliable.

Always forcing the bottom is worse: it yanks users away from history they intentionally scrolled up to read. The interface needs to remember whether following was wanted before the update.

What was actually going wrong

The log treated every DOM change as permission to override the user's scroll position.

What I tried

What finally worked

A near-bottom check controls whether updates follow, with a deferred final scroll after content settles.

Why it worked

The code preserves user intent and still absorbs late layout changes.

What I learned

Good auto-scroll is conditional state management, not a repeated command.

Where EACI uses this today

Main chat follows active conversation without trapping users at the bottom.

This journal covers real engineering on EACI Companion / The Veil. Companions include Caelum, Chad, Natalia, Atreus, Luna, Roxy, and Cael. Journal articles stay family-safe in content. See Privacy and Ethics.