Skip to content

Paint the full retained transcript instead of a smaller window - #345

Merged
TheGreatAxios merged 1 commit into
release/tui-bugfixesfrom
cl-5553-transcript-history-past-500-rows-cannot-be-scrolled-to
Aug 7, 2026
Merged

Paint the full retained transcript instead of a smaller window#345
TheGreatAxios merged 1 commit into
release/tui-bugfixesfrom
cl-5553-transcript-history-past-500-rows-cannot-be-scrolled-to

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The stream log is already capped at a fixed number of retained rows with an absolute base index threaded through every touch point, so a second, smaller paint window on top of that cap was redundant — painting every retained row is what makes all of it reachable by scrolling
  • The paint tree rebuilds directly from the retained log (no separate windowing pass or collapse marker); appending a row adds one node and removes only what the retention trim evicted; replacing a row in place (the streaming-token path) still resolves to a single-node retext once eviction has started, since the row-children helper now excludes the eviction notice by node identity rather than array length
  • Evicted rows get a notice above the oldest retained one, updated in place, so the boundary reads as dropped rather than as the true start of history
  • Deleted the old windowing helpers and their dedicated test file — nothing calls them once the log itself is capped

Verification

  • bun run typecheck and bun run build clean
  • bun run test (the package's bun test ./src ./tests ./evals): 3946 pass / 0 fail across 303 files, two consecutive runs
  • src/tui-opentui/transcript-long-log-scroll.test.ts: scrolling to the top of a 650-row session reaches row 50 (oldest retained), not row 49 (evicted), with the "50 earlier rows dropped" notice present; appending past the cap evicts at most one painted node; the eviction notice retexts in place across repeated evictions; replaceStreamRowAt called once after eviction has started removes at most one painted node (was 601 before this fix — the eviction notice's presence made the row-children length check permanently look like a broken mapping, forcing a full rebuild on every streamed token past the cap)

Closes CL-5553

@linear-code

linear-code Bot commented Aug 7, 2026

Copy link
Copy Markdown

CL-5553

@TheGreatAxios
TheGreatAxios changed the base branch from main to release/tui-bugfixes August 7, 2026 04:20
@TheGreatAxios
TheGreatAxios force-pushed the cl-5553-transcript-history-past-500-rows-cannot-be-scrolled-to branch from f66b290 to 78d5d98 Compare August 7, 2026 05:17
The stream log is already capped at a fixed number of retained rows
with an absolute base index threaded through every touch point, so a
second, smaller paint window on top of that cap was redundant:
painting every retained row is what makes all of it reachable by
scrolling, and it composes with the retention cap instead of
duplicating it.

The paint tree now rebuilds directly from the retained log (no
separate windowing pass or collapse marker). Appending a row adds one
node and removes only what the retention trim actually evicted.
Replacing a row in place — the streaming-token path — still resolves
to a single-node retext once eviction has started; the row-children
helper now excludes the eviction notice by node identity rather than
by array length, so the notice's presence can never make that check
look like a broken mapping and force a full rebuild.

Evicted rows get a notice above the oldest retained one, updated in
place rather than rebuilt, so the boundary reads as dropped rather
than as the true start of history.

Deleted the old windowing helpers and their dedicated test file —
once the log itself is capped, nothing calls them.
@TheGreatAxios
TheGreatAxios force-pushed the cl-5553-transcript-history-past-500-rows-cannot-be-scrolled-to branch from 78d5d98 to 257eb95 Compare August 7, 2026 05:35
@TheGreatAxios TheGreatAxios changed the title Widen the transcript's painted window on scroll instead of always tailing Paint the full retained transcript instead of a smaller window Aug 7, 2026
@TheGreatAxios
TheGreatAxios merged commit 61ac3f9 into release/tui-bugfixes Aug 7, 2026
2 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-5553-transcript-history-past-500-rows-cannot-be-scrolled-to branch August 7, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant