fix(console): scrolling up in a streaming transcript stays up (#80) #81

Merged
cmoriarty merged 3 commits from claude/gifted-mestorf-47cad3 into main 2026-09-27 10:33:21 -04:00
Owner

Closes #80.

The follow-the-tail @live specs timed out against the fixture backend. Once they measured the right element they exposed a real bug: scrolling up while an agent streams was undone within a frame. Following used virtua's scrollToIndex, which re-aims at its target for 150 ms after every measurement, and the revealing row follows every frame.

Changes

  • Transcript.tsx: following is a plain scroll to the bottom. Opening a transcript or rebuilding its fold repeats that scroll each frame until the height holds, and stops when the operator scrolls away. A scroll the transcript made itself does not clear the pin.
  • follow-the-tail.spec.ts: opens the running agent step with the longest transcript (a run at a review gate opens on the review), measures [data-lines] instead of the run rail, and checks the transcript opened at its bottom and that a scroll up left the tail.
  • fakeosfd.py: a tail-demo run whose transcript overflows and grows a line every quarter second.
  • OpenSpec: transcript-follows-the-tail is proposed and archived; agent-transcript gains the follow-the-tail requirement.

Verification

  • Fast lane passes.
  • Full lane with OSF_URL at a --status fixture: 92/92 browser in 2 of 3 runs. The other run had one timeout in delegation.spec.ts's subagents-panel spec with four workers; that spec passes 4/4 on its own, with and without this change.
  • Each follow-the-tail check fails on the old code, with following disabled, and without the own-scroll guard. Known gap: reverting only the per-frame follow path depends on timing and slips through.
  • Checked in a real browser with a mouse wheel: following, scrolling up while lines arrive, and scrolling back.

The branch predates main's last three commits (#74 run bar); it merges cleanly.

🤖 Generated with Claude Code

Closes #80. The follow-the-tail `@live` specs timed out against the fixture backend. Once they measured the right element they exposed a real bug: scrolling up while an agent streams was undone within a frame. Following used virtua's `scrollToIndex`, which re-aims at its target for 150 ms after every measurement, and the revealing row follows every frame. ## Changes - **`Transcript.tsx`:** following is a plain scroll to the bottom. Opening a transcript or rebuilding its fold repeats that scroll each frame until the height holds, and stops when the operator scrolls away. A scroll the transcript made itself does not clear the pin. - **`follow-the-tail.spec.ts`:** opens the running agent step with the longest transcript (a run at a review gate opens on the review), measures `[data-lines]` instead of the run rail, and checks the transcript opened at its bottom and that a scroll up left the tail. - **`fakeosfd.py`:** a `tail-demo` run whose transcript overflows and grows a line every quarter second. - **OpenSpec:** `transcript-follows-the-tail` is proposed and archived; `agent-transcript` gains the follow-the-tail requirement. ## Verification - Fast lane passes. - Full lane with `OSF_URL` at a `--status` fixture: 92/92 browser in 2 of 3 runs. The other run had one timeout in `delegation.spec.ts`'s subagents-panel spec with four workers; that spec passes 4/4 on its own, with and without this change. - Each follow-the-tail check fails on the old code, with following disabled, and without the own-scroll guard. Known gap: reverting only the per-frame follow path depends on timing and slips through. - Checked in a real browser with a mouse wheel: following, scrolling up while lines arrive, and scrolling back. The branch predates main's last three commits (#74 run bar); it merges cleanly. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The follow-the-tail @live specs timed out against the fixture backend, and once
they measured the transcript they showed why the operator could not read back
while an agent wrote: following used virtua's scrollToIndex, which re-aims at
its target for 150 ms after every measurement, and the revealing row follows
every frame. Wheeling up measured the rows coming into view and virtua put the
view back at the tail.

- Following is a plain scroll to the bottom. Landing on opening or a rebuilt
  fold repeats it each frame until the height holds, and stops when the pin
  clears. A scroll the transcript made itself does not clear the pin.
- follow-the-tail.spec.ts opens the running agent step with the longest
  transcript (a run at a review gate opens on the review), measures
  [data-lines] rather than the first scroller (the run rail), and checks the
  view opened at its bottom and that a scroll up left the tail.
- fakeosfd.py: a tail-demo run whose transcript overflows the view and grows
  a line every quarter second.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cmoriarty deleted branch claude/gifted-mestorf-47cad3 2026-09-27 10:33:21 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cmoriarty/braid!81
No description provided.