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
@@ -1,57 +0,0 @@
# Task 01 — styles.css: `.thinking-text` overflow hidden (no user scroll)
**Phase:** `21_thinking_no_scroll` · **Source:** `TODO.md` L4 —
*"Disable scroll in the thinking window. Users don't need to scroll back
through thinking, just see it live."*
## Objective
One CSS property change makes the Thinking window a live-tail-only view:
`overflow-y: hidden` instead of `auto`, keeping the 320px clip. The
phase-17 JS bottom-pin (which keeps working under `overflow: hidden`) is
the sole scroller.
## Work
1. `frontend/assets/styles.css` — in the phase-17 thinking block
section (~line 444):
```css
details.thinking .thinking-text {
padding: 0 0.75rem 0.75rem;
color: var(--ink-soft); /* 6.9:1 on --surface */
font-size: 0.875rem;
line-height: 1.55;
max-height: 320px;
overflow-y: hidden; /* no scroll back (owner choice 2026-08-24):
the window is a live tail only — the phase-17
JS bottom-pin (scrollTop = scrollHeight per
chunk) is the sole scroller */
}
```
(Only the `overflow-y` value + comment change; every other declaration
stays byte-identical.)
2. `frontend/assets/app.js` — **no change expected.** Verify the pin is
intact: the streaming `thinking` branch still does
`textEl.scrollTop = textEl.scrollHeight` on every chunk (~line 886).
If (and only if) the pin were missing/broken, fix it — do not remove
or alter any other scrolling behavior.
3. `tests/unit/test_thinking_no_scroll.py` (new — repo source-pin
pattern):
- `styles.css`: the `details.thinking .thinking-text` rule contains
`overflow-y: hidden` and `max-height: 320px` (no `overflow-y: auto`
left in that rule).
- `app.js`: the bottom-pin line
`textEl.scrollTop = textEl.scrollHeight` is still present (the
live-tail mechanism).
4. Manual smoke (dev server): stream a long thinking turn; try to wheel /
drag / Tab+ArrowDown inside the Thinking block — it must not move;
the newest chunk is always the one visible at the bottom.
## Testing & Quality
- `uv run pytest tests/unit/test_thinking_no_scroll.py -v` green.
- `uv run ruff check . && uv run pyright` clean.
## Completion Criteria
- [ ] `.thinking-text` is `overflow-y: hidden`, `max-height: 320px`, with
the owner-choice comment.
- [ ] The JS bottom-pin is verified intact (no app.js diff unless the
pin was broken).
- [ ] Unit pins green; lint/types clean; manual smoke passed.