Skip to content

Expanded streaming reasoning panel fights nested scrolling #1397

Description

@KorenKrita

Problem

When a reasoning block is manually expanded while an assistant response is still streaming, its inner scrollbar is difficult to control and opens at the beginning of the reasoning content instead of following the latest output.

Reproduction

  1. Start an assistant response that streams enough reasoning to exceed the reasoning panel's maximum height.
  2. Keep the reasoning panel collapsed initially, then expand it while the response is still running.
  3. Try to drag or wheel the reasoning panel toward the latest content.

The reasoning panel starts at scrollTop = 0. At the same time, outer chat follow-tail remains active and repeatedly scrolls the outer viewport as the reasoning content grows, making the nested scrollbar feel as if it is resisting the user's input.

Root cause

The reasoning panel is an independent overflow-y-auto scroll container with no initial or streaming follow-tail behavior. User interaction inside it does not suspend HappyThread's outer follow-tail state, while the outer ResizeObserver keeps calling scrollToBottomInstant() as the inner content grows.

Expected behavior

  • Expanding a streaming reasoning panel should show the latest reasoning output.
  • The inner panel should follow new reasoning while it remains at the bottom.
  • Manual scrolling inside the reasoning panel should take control without fighting the outer chat viewport.
  • Scroll chaining from the reasoning panel to the outer chat should be contained.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions