Skip to content

[Bug] Windows Hub chat auto-scrolls back to an old position after each assistant reply #1285

Closed

Description

@Gubruce

Describe the bug

In OpenClaw Companion (Windows Hub) v2026.7.1-2, every time the assistant finishes a reply, the chat window automatically scrolls back to an earlier/old position instead of staying at the latest message (or keeping the current reading position). This makes reading long conversations very inconvenient.

To Reproduce

  1. Open OpenClaw Companion (Windows Hub) v2026.7.1-2, connected to a local Gateway (2026.8.1).
  2. Open a chat session with enough messages so the conversation overflows the viewport.
  3. Scroll down to the bottom (or to a later message).
  4. Send a message and wait for the assistant reply to finish.
  5. The view auto-scrolls back to an old/earlier position in the conversation.

Expected behavior

The chat should keep the current scroll position (or stay pinned to the latest message) after the assistant finishes replying.

Actual behavior

After the assistant reply completes, the chat auto-scrolls back to an old position (not following the new message, not staying where the user is reading).

Logs / Notes

After each assistant message completes, the tray log (%LOCALAPPDATA%\OpenClawTray\openclaw-tray.log) shows:

[ChatTrace] chat.message role='assistant' final=True
[EVENT] sessions.changed received -> refreshing sessions list

It appears the sessions-list refresh resets the chat scroll anchor (the message view is re-rendered without preserving the scroll position).

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 provider: DeepSeek (OpenAI-compatible)
  • Connection: local ws://127.0.0.1:18789 (stable; not a reconnect issue)

Suggested fix direction

Preserve the chat scroll anchor across the sessions.changed refresh — e.g. keep scroll pinned to the newest message while streaming/after completion, and only reset when the user explicitly switches sessions.

Activity

  1. added
    P2Normal priority bug or improvement with limited blast radius.
    impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.
    on Sep 2, 2026
  2. clawsweeper commented on Sep 2, 2026

    @clawsweeper

    Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

    Close as implemented: the native chat timeline already preserves a reader’s position unless it is following the tail, and the fix shipped in the reported v2026.7.1-2 release.

    So I’m closing this as already implemented rather than keeping a duplicate issue open.

    Review details

    Best possible solution:

    Keep the released anchoring behavior and reopen only with a current-release trace showing a session update changes the viewport despite this path.

    Do we have a high-confidence way to reproduce the issue?

    No. Read-only inspection found that an ordinary sessions update publishes metadata without a history reload, while tail navigation only runs for a changed tail when the reader is already following it.

    Is this the best way to solve the issue?

    Yes. The existing keyed tail-follow policy is the narrow maintainable solution because it preserves an earlier reading position while retaining bottom follow for new messages.

    Security review:

    Security review: No pull-request patch is under security review.

    AGENTS.md: found and applied where relevant.

    What I checked:

    Likely related people:

    • karkarl: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    • calebeden: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

    Codex review notes: model internal, reasoning high; reviewed against b8dc6091d0d4; fix evidence: release v2026.7.1-2, commit ca8fb4a404ad.

  3. Gubruce commented on Sep 2, 2026

    @Gubruce
    Author

    Hi @clawsweeper, thanks for the check — but I can still reproduce this on the shipped v2026.7.1-2, and I found the specific trigger.

    Key trigger: the scroll anchor gets "pinned" to an old position when a reply is long AND its content loads asynchronously (e.g. a Markdown table rendering, or images loading in after the text), causing the message height to change non-continuously (in jumps) after the assistant finishes replying.

    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 the images/table are still rendering (async load), the message height grows in steps.
    3. The chat view auto-scrolls back to an earlier position and stays pinned there ("stuck"), instead of following the latest message.

    The "preserve reader position unless following the tail" logic doesn't cover the case where height changes discontinuously — the scroll anchor isn't recomputed after the async content finishes loading.

    Happy to attach a screen recording if useful. Could you please re-check with this trigger / reopen?

  4. locked as resolved and limited conversation to collaborators on Sep 4, 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

    P2Normal priority bug or improvement with limited blast radius.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions