[PR #2946] [CLOSED] web: preserve nested answer scroll positions during streaming #4351

Closed
opened 2026-11-07 15:35:05 +07:00 by bsakaguchi · 0 comments
Owner

📋 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)

  • 8087ada web: 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.js and git diff --check pass.
  • A user who reproduced the jump-back problem in the running Strata web UI confirmed that this patch fixed it after a hard refresh. No automated real-browser test was run.

Related: #1106 (closed replacement for #1075). This also covers the nested answer code/tool containers recreated by innerHTML updates. 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.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/2946 **Author:** [@toawotaq05](https://github.com/toawotaq05) **Created:** 10/17/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/web-stream-scroll` --- ### 📝 Commits (1) - [`8087ada`](https://github.com/Niko1221/Strata/commit/8087ada090837582fb4594e81b9e49f392eb6e50) web: preserve nested answer scroll positions during streaming ### 📊 Changes **2 files changed** (+81 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `serve/web/app.js` (+27 -4) ➕ `tools/test_chat_scroll.cjs` (+54 -0) </details> ### 📄 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.js` and `git diff --check` pass. - A user who reproduced the jump-back problem in the running Strata web UI confirmed that this patch fixed it after a hard refresh. No automated real-browser test was run. Related: #1106 (closed replacement for #1075). This also covers the nested answer code/tool containers recreated by `innerHTML` updates. No engine, model, API or startup configuration changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:35:05 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4351
No description provided.