HERMES-GIELIE/static
Ming e05b99b7fd fix(scroll): guard _scrollAfterMessageRender and _finishDone against pin hysteresis snap-back
Two scroll-state bugs cause the viewport to snap to the bottom after
streaming completes, even when the user has scrolled up to read:

1. _scrollAfterMessageRender (ui.js): when preserveScroll=true and
   _scrollPinned=true (re-set by the 250px near-bottom hysteresis),
   _followMessagesAfterDomReplace() calls scrollToBottom(), overriding
   the user's position. Added !_messageUserUnpinned guard so explicitly
   scrolled-up users get their snapshot restored instead.

2. _finishDone (messages.js): the explicit scrollToBottom() at L3302
   fires when shouldFollowOnDone is true, but that flag only checks a
   120px near-bottom threshold. Added _isMessagePaneNearBottom(250)
   gate so users reading 250px+ above bottom keep their position.

Also adds a new 'auto_scroll_follow' setting (default: off) that gates
scrollIfPinned() and _shouldFollowMessagesOnDomReplace(). When disabled,
the viewport never auto-scrolls during streaming — the user controls
scroll position manually and uses the ↓ button to jump to bottom.

7-file setting-add pattern applied:
- api/config.py: _SETTINGS_DEFAULTS + _SETTINGS_BOOL_KEYS
- static/boot.js: both init paths
- static/ui.js: scrollIfPinned() + _shouldFollowMessagesOnDomReplace()
- static/index.html: checkbox in appearance settings
- static/i18n.js: en + zh-CN translations
- static/panels.js: payload, autosave, populate, full save
- messages.js: no additional changes (gated via _shouldFollowMessagesOnDomReplace)

Tests updated: test_tars_scroll_reset_regressions, test_issue1690,
test_issue3545. All 116 scroll-related tests pass.
2026-06-11 21:48:14 +02:00
..
vendor fix: vendor math and yaml assets for CSP 2026-05-26 23:49:02 +02:00
apple-touch-icon.png
assistant_turn_anchors.js Release LW stage — v0.51.359 (#3962 assistant turn anchor phase 0 scaffold) (#3977) 2026-06-10 23:14:18 -07:00
boot.js fix(scroll): guard _scrollAfterMessageRender and _finishDone against pin hysteresis snap-back 2026-06-11 21:48:14 +02:00
commands.js Release v0.51.297 — stage-3711 (terminal remote-backend guard #3711) (#3745) 2026-06-06 14:17:17 -07:00
favicon-32.png
favicon-192.png
favicon-512.png
favicon-512.svg
favicon.ico
favicon.svg
i18n.js fix(scroll): guard _scrollAfterMessageRender and _finishDone against pin hysteresis snap-back 2026-06-11 21:48:14 +02:00
icons.js Merge remote-tracking branch 'origin/master' into fix/session-list-touch-actions 2026-05-18 22:22:35 -06:00
index.html fix(scroll): guard _scrollAfterMessageRender and _finishDone against pin hysteresis snap-back 2026-06-11 21:48:14 +02:00
login.js feat: add passkey sign-in 2026-05-25 00:14:38 +00:00
manifest.json Stage 405: PR #2842 — feat: polish installed PWA startup by @AJV20 2026-05-24 18:28:52 +00:00
messages.js fix(scroll): guard _scrollAfterMessageRender and _finishDone against pin hysteresis snap-back 2026-06-11 21:48:14 +02:00
onboarding.js
outline.js fix(outline): keep outline valid on the todos sidebar panel (Opus follow-up) 2026-06-10 23:55:05 +00:00
panels.js fix(scroll): guard _scrollAfterMessageRender and _finishDone against pin hysteresis snap-back 2026-06-11 21:48:14 +02:00
pwa-startup.js Stage 405: PR #2842 — feat: polish installed PWA startup by @AJV20 2026-05-24 18:28:52 +00:00
sessions.js fix: preserve live stream output across session switches (cross-client) 2026-06-10 20:12:05 +00:00
style.css feat(outline): opt-in conversation outline panel (#2124) 2026-06-10 23:46:39 +00:00
sw.js Release LW stage — v0.51.359 (#3962 assistant turn anchor phase 0 scaffold) (#3977) 2026-06-10 23:14:18 -07:00
terminal.js Release v0.51.297 — stage-3711 (terminal remote-backend guard #3711) (#3745) 2026-06-06 14:17:17 -07:00
ui.js fix(scroll): guard _scrollAfterMessageRender and _finishDone against pin hysteresis snap-back 2026-06-11 21:48:14 +02:00
workspace.js Release v0.51.343 — Release LG (Phase-1 batch: #3883 + #3878 + #3880) (#3891) 2026-06-09 13:03:15 -07:00