feat(ui): chat auto-scrolls only while pinned to the bottom — submitting reveals your message, scrolling up holds the viewport

This commit is contained in:
2026-08-24 10:53:04 -04:00
parent b16deb2b1d
commit bc0158f858
5 changed files with 558 additions and 12 deletions
+4 -2
View File
@@ -84,8 +84,10 @@ def test_raw_text_only_stored_and_re_rendered_on_restore() -> None:
on restore) — no HTML is ever stored. Restore re-applies the full
brain-message chrome: is-deflected styling, maybe-try chips, sources."""
js = _js()
assert 'addMessage("user", renderMarkdown(m.text), "auto")' in js
assert 'addMessage("brain", renderMarkdown(m.text), "auto")' in js
# Phase 18: restore landings are forced ("auto" + force) one-shot
# scrollReveal calls — the only forced scrolls in the app.
assert 'addMessage("user", renderMarkdown(m.text), "auto", true)' in js
assert 'addMessage("brain", renderMarkdown(m.text), "auto", true)' in js
assert "wrap.classList.add(\"is-deflected\")" in js
assert "appendMaybeTry(wrap, m.suggestions)" in js
assert "appendSources(wrap, m.sources)" in js