Summary
When the user scrolls up in the chat history to read previous messages and then starts typing a new message, the viewport scrolling behaves unexpectedly.
Steps to reproduce
- Start a chat session:
docsclaw chat --agent-url <url>
- Send a message and receive a long response
- Scroll up in the viewport to review the response
- Start typing a new message
- Observe unexpected scroll jumps
Likely cause
The viewport and text input components both receive keyboard events. When the user types after scrolling up, the viewport may be consuming key events or failing to snap back to the bottom properly. The updateViewport() method calls GotoBottom() only when new messages are added, not when the user starts typing.
Possible fix
- Snap viewport to bottom when text input receives a keypress
- Disable viewport key navigation while input is focused
- Or use viewport's
SetYOffset to force bottom on input activity
Related
Summary
When the user scrolls up in the chat history to read previous messages and then starts typing a new message, the viewport scrolling behaves unexpectedly.
Steps to reproduce
docsclaw chat --agent-url <url>Likely cause
The viewport and text input components both receive keyboard events. When the user types after scrolling up, the viewport may be consuming key events or failing to snap back to the bottom properly. The
updateViewport()method callsGotoBottom()only when new messages are added, not when the user starts typing.Possible fix
SetYOffsetto force bottom on input activityRelated