Cap the transcript's retained row history at 600 - #338
Merged
TheGreatAxios merged 1 commit intoAug 7, 2026
Conversation
…ugh its indices The Ink cutover deleted use-stream.ts's MAX_RETAINED_BLOCKS=600 cap without porting it, so shell.streamLog grows without bound over a long session. LONG_LOG_WINDOW only limits the paint tree, not the backing array. Cap streamLog (and the parent snapshot held during subagent observe) at 600 rows, evicting from the front. Every index the bridge holds across calls — tool-call rows, the open streaming row, the retry boundary, row-toggle closures — is absolute (streamLogBase + local position), so a trim only has to bump the base rather than rewrite stored indices.
TheGreatAxios
added a commit
that referenced
this pull request
Aug 7, 2026
…ot a smaller window PR #338 already caps shell.streamLog at MAX_RETAINED_STREAM_ROWS (600) and threads an absolute streamLogBase through every touch point, so the paint tree no longer needs a second, smaller window on top of that cap — painting every retained row is what makes all of it reachable by scrolling, and it composes with the retention machinery instead of duplicating it. Drop the LONG_LOG_WINDOW/collapse-marker path from shell.ts: repaintTranscriptWindow now paints shell.streamLog directly, paintAppendStreamRow adds one node per append and removes only what trimRetainedLog actually evicted, and replaceStreamRowAt's cheap single-node retext no longer has a windowing condition gating it off past 500 rows.
This was referenced Aug 7, 2026
TheGreatAxios
deleted the
cl-5551-transcript-rows-are-retained-forever-the-600-block-cap-was
branch
August 7, 2026 06:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
shell.streamLog(and the parent snapshot held during subagent observe) evicts its oldest rows once it exceeds 600, instead of growing for the life of the process.streamLogBase) through every index the bridge and shell hold across calls — tool-call rows, the open streaming row, the retry rollback boundary, row-expand closures — so a trim only bumps the base instead of invalidating stored positions.undefined, not a write to whatever row now occupies that array slot.Verification
bun run typecheck,bun run build, andbun testall pass.src/tui-opentui/wave6.test.tspush a session past the cap and assertshell.streamLog.lengthstays at 600 whilestreamRowCountkeeps reporting the true absolute total, and thatreplaceStreamRowAt/streamRowAtstay correct (or safely no-op) once the row they were pointed at has been evicted.Closes CL-5551