Repository navigation
fix(ui): scroll chat to bottom on initial load - #274
Merged
Merged
Conversation
The chat view was starting at the top showing oldest messages instead of scrolling to the bottom to show the latest messages (like WhatsApp). Root causes: 1. scheduleChatScroll() was called without force flag in refreshActiveTab() 2. The scroll was targeting .chat-thread element which has overflow:visible and doesn't actually scroll - the window scrolls instead Fixes: - Pass force flag (!chatHasAutoScrolled) when loading chat tab - Wait for Lit updateComplete before scrolling to ensure DOM is ready - Scroll the window instead of the .chat-thread container - Use behavior: 'instant' for immediate scroll without animation
thewilloftheshadow
suggested changes
Jan 6, 2026
thewilloftheshadow
left a comment
Member
There was a problem hiding this comment.
The PR notes “.chat-thread has overflow: visible so the window scrolls,” but that isn’t true in constrained layouts/tests where .chat-thread is the scroll container (overflow auto/max-height). Switching to window breaks auto-scroll there. Please update the logic to scroll the actual scroll container (use .chat-thread when it’s scrollable, otherwise fall back to window) so both layouts work.
Contributor
|
I just fixed up the bits. |
Contributor
|
Merged — thanks @kiranjd!\n\nTests: pnpm lint, pnpm build, pnpm test, pnpm docs:build |
7 tasks
dgarson
added a commit
to dgarson/clawdbot
that referenced
this pull request
Feb 9, 2026
dgarson
added a commit
to dgarson/clawdbot
that referenced
this pull request
Feb 9, 2026
…" (openclaw#275) This reverts commit b8a6209.
dgarson
added a commit
to dgarson/clawdbot
that referenced
this pull request
Feb 9, 2026
…nclaw#274)" (openclaw#275)" This reverts commit 13a8f9e.
dgarson
added a commit
to dgarson/clawdbot
that referenced
this pull request
Feb 9, 2026
* Revert "Revert "Web: refine conversation loading and demo delays (openclaw#274)" (openclaw#275)" This reverts commit 13a8f9e. * feat: add comprehensive configurable debug/trace logging for block/stream replies
Closed
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
fix(ui): scroll chat to bottom on initial load
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
fix(ui): scroll chat to bottom on initial load
muneebhashone
pushed a commit
to muneebhashone/clawdbot
that referenced
this pull request
Aug 25, 2026
fix(ui): scroll chat to bottom on initial load
zeekay
pushed a commit
to Dream-AI-4444/bot
that referenced
this pull request
Sep 11, 2026
fix(ui): scroll chat to bottom on initial load
lhfer
pushed a commit
to lhfer/openclaw
that referenced
this pull request
Oct 11, 2026
fix(ui): scroll chat to bottom on initial load
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem
When opening the Chat view in the dashboard, users had to manually scroll down to see the latest messages. This was poor UX since chat interfaces conventionally show the most recent messages first.
Root causes:
scheduleChatScroll()was called without theforceflag inrefreshActiveTab().chat-threadelement which hasoverflow: visible- it doesn't scroll, the window doesSolution
forceflag (!chatHasAutoScrolled) when loading chat tab to force initial scrollupdateCompletebefore scrolling to ensure DOM is readywindowinstead of the.chat-threadcontainerbehavior: 'instant'for immediate scroll without animationTest plan
🤖 Generated with Claude Code