fix(ui): thinking window no longer scrolls — live 320px view pinned to the stream tail

This commit is contained in:
2026-08-24 18:24:57 -04:00
parent 76c6a01199
commit 04a7f4c05d
11 changed files with 618 additions and 279 deletions
+7 -6
View File
@@ -18,10 +18,11 @@ Test → story mapping (Playwright Mapping Rule):
5. ``test_thinking_with_deflection``
Determinism note: the mock paces every SSE frame at 0.02s and the thinking
text is ~700–900 chars (≈ 60–75 frames ≈ 1.2–1.5s) before the first
content frame, so "attach → assert open" runs well inside the open window
on headless Chromium; all other assertions are made after the send button
re-enables (fully settled state).
text is ~2 700 chars (≈ 230 frames ≈ 4.5s — lengthened in phase 21 so the
scratchpad overflows the 320px window) before the first content frame, so
"attach → assert open" runs well inside the open window on headless
Chromium; all other assertions are made after the send button re-enables
(fully settled state).
"""
from __future__ import annotations
@@ -139,8 +140,8 @@ def test_thinking_block_streams_open_then_collapses(
# token — and is created OPEN.
details = page.locator(".msg.brain").last.locator("details.thinking")
details.wait_for(state="attached", timeout=10_000)
# The ~800-char thinking stream (≈1.3s) keeps the block open right
# after attach — assert while it is still streaming.
# The ~2 700-char thinking stream (≈4.5s, phase 21) keeps the block
# open right after attach — assert while it is still streaming.
expect(details).to_have_attribute("open", "")
expect(details.locator(".thinking-text")).not_to_have_text("")