bedrock-claude-chat
bedrock-claude-chat copied to clipboard
[BUG] Stuttery auto-scroll to the bottom of the page when outputting code
Describe the bug
When writing long multi-line code blocks, the interface stutters a lot.
Filling out this field will help us investigate the issue efficiently. Providing detailed information allows us to set the appropriate priority. We appreciate your cooperation.
A clear and concise description of what the bug is.
To Reproduce
Filling out this field will help us investigate the issue efficiently. Providing detailed information allows us to set the appropriate priority. We appreciate your cooperation.
Steps to reproduce the behavior:
- Start a new chat
- Ask a question that invokes a code response.
screen recording
https://github.com/user-attachments/assets/438a05ca-8c48-4a72-8ef2-c5205533b667
Additional context
It seems like this bug occurs more often on my 2nd monitor than on my my Macbook screen..
@conradg Is the version of the application you are checking the latest?
Hmm, no this is from a forked repo forked at this commit about 2 months ago. https://github.com/aws-samples/bedrock-claude-chat/pull/303
I can see a lot has happened since then, so I will try and upgrade to the latest changes
The following code is the relevant section The useLayoutEffect is used so that the chat no longer bounces while it is being generated.
However, they are no longer followed during chat generation.
If you need this, modify it to scroll with delayed evaluation.
frontend/src/pages/ChatPage.tsx
useLayoutEffect(() => {
if (messages.length > 0) {
scrollToBottom();
} else {
scrollToTop();
}
}, [messages, scrollToBottom, scrollToTop]);
@conradg https://github.com/aws-samples/bedrock-claude-chat/pull/450 Improved. would you check this PR ?
This issue has been labeled as "stale" due to no response by the reporter within 1 month (and 14 days after last commented by someone). And it will be closed automatically 14 days later if not responded.
Close issue because fixed by #450