Skip to content

fix: preserve sidebar scrolling while streaming - #1789

Closed
Michaelyklam wants to merge 1 commit into
nesquena:masterfrom
Michaelyklam:fix/issue-1784-sidebar-scroll-streaming
Closed

fix: preserve sidebar scrolling while streaming#1789
Michaelyklam wants to merge 1 commit into
nesquena:masterfrom
Michaelyklam:fix/issue-1784-sidebar-scroll-streaming

Conversation

@Michaelyklam

Copy link
Copy Markdown
Contributor

Thinking Path

What Changed

  • Added passive capture listeners for wheel and touchmove that record recent non-chat-pane scroll intent without calling preventDefault().
  • Updated scrollIfPinned() to return early for a short 350ms window after a non-message scroll gesture, preventing token-render auto-scroll from fighting sidebar scrolling.
  • Added overscroll-behavior-y: contain and touch-action: pan-y to .session-list.
  • Added regression coverage in tests/test_streaming_sidebar_scroll.py.

Why It Matters

Users often browse or switch sessions while a long response is still streaming. The chat pane can keep its normal pinned behavior when the user is watching it, but sidebar scroll gestures should remain independent and responsive.

Verification

  • Reproduced before fix on clean origin/master (9875967): sidebar wheel + next scrollIfPinned() moved #messages.scrollTop from 0 to 3073.
  • Browser QA after fix in isolated local WebUI server (127.0.0.1:18784) with a synthetic 180-session sidebar and active streaming session:
    • after sidebar wheel + immediate scrollIfPinned(): #messages.scrollTop stayed 0
    • after guard expiry + scrollIfPinned(): #messages.scrollTop moved to 2992
    • .session-list computed CSS: overscroll-behavior-y: contain; touch-action: pan-y
  • python -m pytest tests/test_streaming_sidebar_scroll.py -q3 passed
  • python -m pytest tests/test_streaming_sidebar_scroll.py tests/test_streaming_markdown.py::TestExistingStreamingGuardsIntact -q10 passed
  • git diff --check → passed

UI media / evidence:

Sidebar scroll streaming fixture

Structured QA evidence: https://raw.githubusercontent.com/Michaelyklam/hermes-webui/fix/issue-1784-sidebar-scroll-streaming/docs/pr-media/1784/sidebar-scroll-qa.json

Fixes #1784

Risks / Follow-ups

  • The guard is intentionally short and only affects scrollIfPinned(), not explicit scrollToBottom(), so a user click on the bottom button still restores the chat pane immediately.
  • If WebKit reports touch targets differently than Chromium, the passive document-level capture listener should still see the original sidebar descendant target before any bubbling handlers run.

Model Used

  • Provider: OpenAI Codex
  • Model: gpt-5.5
  • Tool use: Hermes CLI agent with terminal, browser QA, file editing, pytest, git, and GitHub CLI.

@nesquena-hermes

Copy link
Copy Markdown
Collaborator

Thanks @Michaelyklam — this shipped in v0.51.18 (commit a8de4e7) as part of a 5-PR full-sweep batch. Stage rebased your branch onto current master, ran the full pre-release gate (4733 pytest, browser tests, Opus advisor verdict SHIP all 5), and merged via release PR #1799.

GitHub didn't auto-close because the merge commit only references the squash-merged stage branch, not your fork's commit directly — closing manually for hygiene.

Live now on existing installs after git pull + restart.

Release notes: https://github.com/nesquena/hermes-webui/releases/tag/v0.51.18

pull Bot pushed a commit to soitun/hermes-webui that referenced this pull request May 7, 2026
pull Bot pushed a commit to soitun/hermes-webui that referenced this pull request May 7, 2026
…1789, nesquena#1790, nesquena#1791, nesquena#1794)

Constituent PRs:
- nesquena#1783 (@Sanjays2402) custom provider + :free/:beta/:thinking suffix fix. Closes nesquena#1776.
- nesquena#1789 (@Michaelyklam) preserve sidebar scrolling while streaming. Closes nesquena#1784.
- nesquena#1790 (@Michaelyklam) keep workspace open from preview breadcrumb. Closes nesquena#1785.
- nesquena#1791 (@Michaelyklam) keep assistant-only stream deltas on current turn. Closes nesquena#1787.
- nesquena#1794 (@nesquena-hermes, APPROVED by @nesquena) UX bundle: rail tooltip
  cascade fix, +new-conversation has-tooltip--bottom-right variant, context-menu
  hover-bg, rename pre-fill via setSelectionRange.

Tests: 4723 → 4747 collected (+24). 4733 passed, 0 failed in 149s.

Pre-release verification:
- All 5 PRs CI-green individually
- File overlaps (style.css + ui.js between nesquena#1789 + nesquena#1794) auto-merged cleanly
- node -c clean on all 4 changed JS files
- Browser API sanity 11/11 endpoints
- Pre-stamp re-fetch: all PR heads match local rebases
- Opus advisor: SHIP all 5, 0 MUST-FIX, 1 SHOULD-NOTE on test pattern divergence (acceptable)

Closes nesquena#1776, nesquena#1784, nesquena#1785, nesquena#1787.
Du7chManiac pushed a commit to TheCouchCoder-com/hermes-webui that referenced this pull request May 13, 2026
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
…1789, nesquena#1790, nesquena#1791, nesquena#1794)

Constituent PRs:
- nesquena#1783 (@Sanjays2402) custom provider + :free/:beta/:thinking suffix fix. Closes nesquena#1776.
- nesquena#1789 (@Michaelyklam) preserve sidebar scrolling while streaming. Closes nesquena#1784.
- nesquena#1790 (@Michaelyklam) keep workspace open from preview breadcrumb. Closes nesquena#1785.
- nesquena#1791 (@Michaelyklam) keep assistant-only stream deltas on current turn. Closes nesquena#1787.
- nesquena#1794 (@nesquena-hermes, APPROVED by @nesquena) UX bundle: rail tooltip
  cascade fix, +new-conversation has-tooltip--bottom-right variant, context-menu
  hover-bg, rename pre-fill via setSelectionRange.

Tests: 4723 → 4747 collected (+24). 4733 passed, 0 failed in 149s.

Pre-release verification:
- All 5 PRs CI-green individually
- File overlaps (style.css + ui.js between nesquena#1789 + nesquena#1794) auto-merged cleanly
- node -c clean on all 4 changed JS files
- Browser API sanity 11/11 endpoints
- Pre-stamp re-fetch: all PR heads match local rebases
- Opus advisor: SHIP all 5, 0 MUST-FIX, 1 SHOULD-NOTE on test pattern divergence (acceptable)

Closes nesquena#1776, nesquena#1784, nesquena#1785, nesquena#1787.
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
bernyforce pushed a commit to bernyforce/hermes-webui that referenced this pull request Jul 29, 2026
bernyforce pushed a commit to bernyforce/hermes-webui that referenced this pull request Jul 29, 2026
…1789, nesquena#1790, nesquena#1791, nesquena#1794)

Constituent PRs:
- nesquena#1783 (@Sanjays2402) custom provider + :free/:beta/:thinking suffix fix. Closes nesquena#1776.
- nesquena#1789 (@Michaelyklam) preserve sidebar scrolling while streaming. Closes nesquena#1784.
- nesquena#1790 (@Michaelyklam) keep workspace open from preview breadcrumb. Closes nesquena#1785.
- nesquena#1791 (@Michaelyklam) keep assistant-only stream deltas on current turn. Closes nesquena#1787.
- nesquena#1794 (@nesquena-hermes, APPROVED by @nesquena) UX bundle: rail tooltip
  cascade fix, +new-conversation has-tooltip--bottom-right variant, context-menu
  hover-bg, rename pre-fill via setSelectionRange.

Tests: 4723 → 4747 collected (+24). 4733 passed, 0 failed in 149s.

Pre-release verification:
- All 5 PRs CI-green individually
- File overlaps (style.css + ui.js between nesquena#1789 + nesquena#1794) auto-merged cleanly
- node -c clean on all 4 changed JS files
- Browser API sanity 11/11 endpoints
- Pre-stamp re-fetch: all PR heads match local rebases
- Opus advisor: SHIP all 5, 0 MUST-FIX, 1 SHOULD-NOTE on test pattern divergence (acceptable)

Closes nesquena#1776, nesquena#1784, nesquena#1785, nesquena#1787.
bernyforce pushed a commit to bernyforce/hermes-webui that referenced this pull request Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(streaming): session-list sidebar cannot be scrolled while a chat is streaming — auto-scroll guard from #1731 is over-broad

2 participants