The chat interface currently scrolls to the bottom after every update using the afterUpdate lifecycle hook.
As a result, whenever a new message arrives, users are automatically pushed to the latest message even if they are reading older chat history.
Current behavior:
- User scrolls upward to read previous messages
- A new message arrives
- Chat instantly jumps back to the bottom
Expected behavior:
- Auto-scroll only when the user is already near the bottom of the chat
- Preserve the user's scroll position when reviewing older messages
Suggested Improvement:
Before performing automatic scrolling, check whether the user is already near the bottom of the message container. Only trigger auto-scroll when appropriate.
Benefits:
- Improved chat usability
- Better reading experience
- Consistent behavior with modern messaging applications
- Prevents interruption while reviewing conversation history
The chat interface currently scrolls to the bottom after every update using the afterUpdate lifecycle hook.
As a result, whenever a new message arrives, users are automatically pushed to the latest message even if they are reading older chat history.
Current behavior:
Expected behavior:
Suggested Improvement:
Before performing automatic scrolling, check whether the user is already near the bottom of the message container. Only trigger auto-scroll when appropriate.
Benefits: