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
- Start an assistant response that streams enough reasoning to exceed the reasoning panel's maximum height.
- Keep the reasoning panel collapsed initially, then expand it while the response is still running.
- 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.
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
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-autoscroll container with no initial or streaming follow-tail behavior. User interaction inside it does not suspendHappyThread's outer follow-tail state, while the outerResizeObserverkeeps callingscrollToBottomInstant()as the inner content grows.Expected behavior