Repository navigation
Description
Describe the bug
On Windows Hub (OpenClaw Companion) v2026.7.1-2, when an assistant reply is long and contains content that loads asynchronously (images decoded after the text, Markdown tables, progress-card updates), the message height grows in non-continuous jumps. This causes the native chat timeline to stop tail-following and pin the scroll at an old position — even when the reader was following the bottom the whole time.
Related to #1285 (closed as "already implemented"); this report identifies the specific remaining mechanism that the release check did not cover.
Root cause (source-level)
In src/OpenClaw.Tray.WinUI/Chat/ReactorItemsViewScrollController.cs, InitialTailPositioner:
_following = IsNearBottom(sender)is recomputed on everyViewChanged(OnViewChanged).IsNearBottom(s) => s.ScrollableHeight - s.VerticalOffset <= FollowThreshold(threshold = 60px).- Tail navigation only runs when
changed && _following && itemsView.IsLoaded(UpdateTail).
Failure sequence:
- A long reply with images/tables/progress cards renders; images decode asynchronously (
BuildAttachment→TryDecodeAttachmentBitmap), so a row's height is unknown until the bitmap decodes. - As async content loads, message height grows in jumps. Each jump fires
LayoutUpdated/ViewChanged. - During an intermediate height jump the reader's offset is transiently not within 60px of the bottom →
_followingis set tofalse. - After content settles,
_followingstaysfalse→ no tail navigation → view is pinned at an old position.
The anchored tail-follow works when height changes are continuous (streaming text) but breaks when height changes are discontinuous (async image decode / late-rendering tables / progress-card updates), because _following is snapshotted from an intermediate layout state and never re-evaluated after the content settles.
Steps to reproduce
- Ask a question that produces a long reply containing a table and/or images.
- Wait for the reply to finish; while images/table render (async load), the message height grows in steps.
- The chat view auto-scrolls back to an earlier position and stays pinned there instead of following the latest message.
Expected behavior
The chat should keep tail-following (or preserve the reader position) correctly even when message content loads asynchronously and changes height non-continuously.
Actual behavior
The scroll anchor gets pinned at an old position after async content finishes loading.
Environment
- OS: Windows 10 Pro 22H2 (build 19045, x64)
- OpenClaw Companion (Windows Hub): v2026.7.1-2
- OpenClaw Gateway: 2026.8.1 (local, loopback bind)
- Model: DeepSeek (OpenAI-compatible)
Suggested fix
Re-evaluate _following after layout settles (e.g. re-run IsNearBottom on a settled LayoutUpdated, or distinguish user-initiated scroll from content-driven height change), so an async height jump cannot permanently drop tail-following.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Sep 2, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed September 1, 2026, 9:18 PM ET / September 2, 2026, 01:18 UTC.
Summary
Current source supports a distinct, bounded chat-scroll defect: asynchronous assistant-media completion can change a row’s height while the controller updates tail-follow state from every view change and only reissues navigation for a changed tail key. This remains worth a focused regression fix despite the related closed report.
Reproducibility: yes. source-reproducible: let an assistant image card transition from its preparing card to a decoded image while the final timeline row remains the same, then observe whether a content-driven view change clears tail-follow. Native Windows proof is still needed to confirm the event ordering on the reported runtime.
Next step
Current source exposes a controller-level tail-follow state loss and the likely repair, files, and validation path are sufficiently bounded for one focused fix PR.
Review details
Best possible solution:
Preserve tail-follow intent across content-driven reflows while letting explicit reader scrolling disable it, then cover both the late-media and manual-scroll cases with focused tests and native current-head proof.
Do we have a high-confidence way to reproduce the issue?
Yes, source-reproducible: let an assistant image card transition from its preparing card to a decoded image while the final timeline row remains the same, then observe whether a content-driven view change clears tail-follow. Native Windows proof is still needed to confirm the event ordering on the reported runtime.
Is this the best way to solve the issue?
Yes. A narrow controller fix that separates user scroll intent from content-driven layout reflow addresses the source-level state loss without changing chat data, media resolution, or user configuration.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against b8dc6091d0d4.
Label changes
Label changes:
P2: Late-rendered chat content can leave readers at an earlier position, but the evidence does not show data loss, message loss, or a hard product block.impact:ux-friction: The reported behavior disrupts reading long chat replies and requires users to recover their place manually.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:queueable-fix: Current issue advisory state selects this label.clawsweeper:fix-shape-clear: Current issue advisory state selects this label.Label justifications:
P2: Late-rendered chat content can leave readers at an earlier position, but the evidence does not show data loss, message loss, or a hard product block.impact:ux-friction: The reported behavior disrupts reading long chat replies and requires users to recover their place manually.Evidence reviewed
Acceptance criteria:
What I checked:
src/OpenClaw.Tray.WinUI/Chat/ChatAssistantMediaRenderer.cs:154, b8dc6091d0d4)_followingis true, while every ScrollView view change overwrites_followingusing a 60-pixel near-bottom threshold. A content-driven reflow of the same tail has no separate correction path. (src/OpenClaw.Tray.WinUI/Chat/ReactorItemsViewScrollController.cs:225, b8dc6091d0d4)src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs:185, b8dc6091d0d4)tests/OpenClaw.Tray.Tests/ChatTimelinePresentationTests.cs:57, b8dc6091d0d4)src/OpenClaw.Tray.WinUI/Chat/ReactorItemsViewScrollController.cs:225, ca8fb4a404ad)Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.samanthamsong commentedon Sep 4, 2026
Closing as duplicate of #1148 (same scroll behavior).