Skip to content

[Bug] Windows Hub chat: async content load (images/tables/progress cards) pins scroll at old position #1286

Closed as not planned

Description

@Gubruce

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 every ViewChanged (OnViewChanged).
  • IsNearBottom(s) => s.ScrollableHeight - s.VerticalOffset <= FollowThreshold (threshold = 60px).
  • Tail navigation only runs when changed && _following && itemsView.IsLoaded (UpdateTail).

Failure sequence:

  1. 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.
  2. As async content loads, message height grows in jumps. Each jump fires LayoutUpdated / ViewChanged.
  3. During an intermediate height jump the reader's offset is transiently not within 60px of the bottom → _following is set to false.
  4. After content settles, _following stays false → 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

  1. Ask a question that produces a long reply containing a table and/or images.
  2. Wait for the reply to finish; while images/table render (async load), the message height grows in steps.
  3. 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.

Activity

  1. added
    P2
    clawsweeper:fix-shape-clear
    clawsweeper:queueable-fix
    clawsweeper:source-repro
    impact:ux-friction
    issue-rating: 🦞 diamond lobster
    no-stale
    on Sep 2, 2026
  2. clawsweeper commented on Sep 2, 2026

    @clawsweeper

    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:

    • A real Windows UI run is still needed to verify the exact event ordering and to confirm that preserving tail-follow does not override a reader who intentionally scrolls away from the bottom.

    Codex review notes: model internal, reasoning high; reviewed against b8dc6091d0d4.

    Label changes

    Label changes:

    • add 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.
    • add impact:ux-friction: The reported behavior disrupts reading long chat replies and requires users to recover their place manually.
    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.
    • add clawsweeper:queueable-fix: Current issue advisory state selects this label.
    • add 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:

    • ./build.ps1
    • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore
    • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore
    • Current-head native Windows Hub proof covering late media reflow at the tail and an intentional manual scroll away from the tail.

    What I checked:

    Likely related people:

    • Karen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  3. samanthamsong commented on Sep 4, 2026

    @samanthamsong
    Collaborator

    Closing as duplicate of #1148 (same scroll behavior).

  4. locked as resolved and limited conversation to collaborators on Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2clawsweeper:fix-shape-clearclawsweeper:queueable-fixclawsweeper:source-reproimpact:ux-frictionissue-rating: 🦞 diamond lobsterno-stale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions