no auto-scroll on new message #47

Closed
opened 2026-04-19 08:25:33 +00:00 by zaelgohary · 1 comment
Member

ChatView rendered the message list but had no effect to scroll the container when a new message was appended. Users had to scroll down manually after every send/receive.

Fix: bridge props.messages.len() into a Signal so use_effect can actually react to it (plain props don't subscribe), then schedule a double-requestAnimationFrame that sets scrollTop = scrollHeight after the newly-appended bubble has been laid out.

`ChatView` rendered the message list but had no effect to scroll the container when a new message was appended. Users had to scroll down manually after every send/receive. **Fix**: bridge `props.messages.len()` into a Signal so `use_effect` can actually react to it (plain props don't subscribe), then schedule a double-`requestAnimationFrame` that sets `scrollTop = scrollHeight` after the newly-appended bubble has been laid out.
zaelgohary changed title from bug: new messages don't auto-scroll into view to no auto-scroll on new message 2026-04-19 08:32:19 +00:00
Author
Member

Fixed by #56.

Fixed by https://forge.ourworld.tf/lhumina_code/hero_archipelagos/pulls/56.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_archipelagos#47
No description provided.