fix: preserve scroll on stream completion#1709
Merged
1 commit merged intonesquena:masterfrom May 5, 2026
Merged
Conversation
0ea3dfb
Collaborator
|
Closed by the v0.51.5 release in PR #1713 (merged at 0ea3dfb, deployed to production). Thanks! Live on production: https://github.com/nesquena/hermes-webui/releases/tag/v0.51.5 🚀 |
githb-ac
pushed a commit
to githb-ac-org/hermes-webui
that referenced
this pull request
May 5, 2026
githb-ac
pushed a commit
to githb-ac-org/hermes-webui
that referenced
this pull request
May 5, 2026
4 PRs (1 surface addition, 3 fixes): - nesquena#1688 VPS resource health Insights panel (@Michaelyklam, closes nesquena#693) - nesquena#1709 preserve scroll on stream completion (@Michaelyklam, closes nesquena#1690) - nesquena#1711 hide rename tooltip on folders (@nesquena-hermes, closes nesquena#1710) - nesquena#1712 guard localStorage.setItem against QuotaExceededError (@24601) Tests: 4504 → 4527 (+23). Opus: SHIP, 6/6 verification clean. Held back: nesquena#1686 (Docker enhance) — Opus flagged sibling-repo dep that breaks standalone clones. Left open for follow-up. Co-authored-by: Michael Lam <[email protected]> Co-authored-by: 24601 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thinking Path
donerender completed.S.activeStreamIdbefore their finalrenderMessages()call, whilerenderMessages()chose betweenscrollIfPinned()andscrollToBottom()from stream liveness alone.Fixes #1690.
What Changed
_scrollAfterMessageRender(preserveScroll)instatic/ui.jsand letrenderMessages({preserveScroll:true})usescrollIfPinned()even afterS.activeStreamIdhas been cleared.static/messages.js(done,apperror,cancel, settled restore, connection loss, stale reattach, and background completion) to request scroll preservation for same-pane terminal rerenders.renderMessages()behavior unchanged for normal idle renders and session load/switch paths so opening a session still bottom-pins.tests/test_issue1690_scroll_completion.pyand updated existing scroll/source tests for the new helper-based render policy.docs/pr-media/1690/scroll-preserved-after-completion.png.Why It Matters
A long response can be hundreds of lines. If the user scrolls up while it streams, completion should not yank them back to the bottom and make them lose their place. This keeps the chat interaction predictable: live updates only follow the bottom when the user is pinned, and completed renders preserve manual scroll position.
Verification
Result:
Latest local rerun in recovered Kanban run:
Manual/browser verification:
127.0.0.1:18790from this worktree.S.activeStreamId, and calledrenderMessages({preserveScroll:true})to simulate the terminaldonepath.scrollTopunchanged at1352before/after completion,_scrollPinned=false,S.activeStreamId=null, scroll-to-bottom button still visible, andnearBottom=false.Evidence / UI Media
Raw media verified: HTTP 200, 59,886 bytes.
Risks / Follow-ups
renderMessages({preserveScroll:true})when they complete the current pane after clearing stream state.Model Used
AI assisted.
gpt-5.5