mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2946] [CLOSED] web: preserve nested answer scroll positions during streaming #4351
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4351
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2946
Author: @toawotaq05
Created: 10/17/2026
Status: ❌ Closed
Base:
main← Head:fix/web-stream-scroll📝 Commits (1)
8087adaweb: preserve nested answer scroll positions during streaming📊 Changes
2 files changed (+81 additions, -4 deletions)
View changed files
📝
serve/web/app.js(+27 -4)➕
tools/test_chat_scroll.cjs(+54 -0)📄 Description
Long streamed answers repeatedly replace the answer HTML, recreating code and tool-output scroll containers. Scrolling inside those boxes jumps back on the next update, even when the outer chat scrollbar stays in place.
Preserve vertical and horizontal scroll offsets in nested code/tool output and the answer container when rebuilding changed HTML, and leave the DOM intact when the rendered answer is unchanged. Preserve the Thinking pane's reading position and capture outer-chat follow intent before a growing answer changes its height, including the final paint.
Validation:
node tools/test_chat_scroll.cjs: 6/6 pass; 5/6 fail against the unchanged upstream renderer. The tests execute the actual renderer and streaming paint callback with synthetic DOM scroll-reset behavior; no GPU or model is needed.node --check serve/web/app.jsandgit diff --checkpass.Related: #1106 (closed replacement for #1075). This also covers the nested answer code/tool containers recreated by
innerHTMLupdates. No engine, model, API or startup configuration changes.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.