Skip to content

fix(cli): auto-scroll to bottom on turn end (#2378)#2383

Open
GoggleHe wants to merge 2 commits into
esengine:v1from
GoggleHe:fix/cli-auto-scroll-on-turn-end
Open

fix(cli): auto-scroll to bottom on turn end (#2378)#2383
GoggleHe wants to merge 2 commits into
esengine:v1from
GoggleHe:fix/cli-auto-scroll-on-turn-end

Conversation

@GoggleHe
Copy link
Copy Markdown

@GoggleHe GoggleHe commented May 30, 2026

Summary

When the user scrolls up during a streaming turn, the chat-scroll-store sets pinned=false and the viewport stays at the user's position. On turn end, nothing re-pinned the viewport, so the user had to manually scroll down or press End to see the final answer.

This PR adds chatScroll.jumpToBottom() after setBusy(false) in the main turn execution path so the viewport always settles on the final output.

Root Cause

Reasonix has two scroll implementations:

Desktop/Web (useAutoScroll.ts) CLI/Ink (chat-scroll-store.ts)
Turn-end re-pin Already handled via busy transition Missing — pinned stayed false

The desktop version already handles this correctly (fixed in #1182). This PR brings the CLI version to parity.

Change

1 file, +3 linessrc/cli/ui/App.tsx

Related

When the user scrolls up during a streaming turn, the chat-scroll-store
sets pinned=false and the viewport stays at the user's position. On turn
end, nothing re-pinned the viewport, so the user had to manually scroll
down or press End to see the final answer.

Add chatScroll.jumpToBottom() after setBusy(false) in the main turn
execution path so the viewport always settles on the final output.
@GoggleHe GoggleHe force-pushed the fix/cli-auto-scroll-on-turn-end branch from a8144ca to fa33d16 Compare May 30, 2026 19:13
@esengine esengine added the v1 Legacy TypeScript line (0.x) — v1 branch, maintenance only label May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v1 Legacy TypeScript line (0.x) — v1 branch, maintenance only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

每次运行完要手动下滑动 模型回答后聊天窗口不会自动往下滑到最新的聊天记录

2 participants