Repository navigation
perf(webui): bounded transcript DOM for long sessions - #329
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
odek | d910baa | Commit Preview URL Branch Preview URL |
Oct 17 2026, 08:20 PM |
The transcript grew without bound in long sessions: the 80-item cap only counted top-level rows, so one turn's stream (hundreds of tool steps, each with an eagerly rendered result view) was never trimmed, and opening a large session rendered every message before pruning. - js/transcript.js: a 300-row budget that counts rows inside turn streams, never trims live work, defers while the operator reads up (600-row ceiling, scroll position held) and shows a top-of-transcript note. - Session load renders the newest ~150-row window; "Show earlier" renders the previous window in place. Trimmed history rows return to the backlog as whole messages; rows trimmed from a live turn come back via a session reload once the turn ends. - Tool result views render on first expand. - Older answers are measured for folding once instead of on every reply. - Reasoning blocks keep their newest 400 lines; sub-agent chip logs 200. - The Activity list repaints once per frame and tracks its byte total. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes for the transcript budget: - Scroll correction measured a surviving row instead of the height delta. Chrome and Firefox scroll anchoring had already compensated, so Show earlier while scrolled mid-transcript jumped by the inserted height. - While reading up, the ceiling trim removes only rows wholly above the view (never splitting a loaded message); 1,200 rows is the hard bound. - Steps settled by a cancelled or interrupted turn are no longer treated as running, so the budget can trim them. - Steps re-rendered by Show earlier keep their Inspect result action. - The marker text is a polite live region, written only when it changes; focus moves into the transcript when the last window removes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- History from a session that fit one window stays recoverable after the budget trims it (the backlog is kept even when nothing was hidden). - Show earlier holds the first row on screen when the older half of a split turn joins its stream (the stream's own top does not move; Safari has no scroll anchoring to hide this). - Activity items recorded at load are rebound to steps Show earlier renders, so "Show in conversation" reaches them. - Several results on one unopened step all render on expand. - A bubble measured at zero height (hidden pane) is measured again. - System-initiated user records use no window budget and never open a window. - The in-view search while reading up is a binary search. - Reload from the trim marker opens at the top of its window. - hasClass/nodeHolds live in utils.js; message and reasoning-note markup each have one builder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- An interrupted turn clears the live flag on its reasoning row, so the budget can trim it. - Folds are re-measured after a layout change (window or inspector width, reading size, density), debounced. - Identical results within one turn rebind to distinct Activity items. - The earlier-turns count skips system-initiated records. - Session load collects only the newest results the Activity panel can hold, walking back from the window: load cost no longer grows with the session's tool history. - A reader parked where nothing above the view can go costs no layout reads until they scroll. - The trim loop stops once a message boundary is reached. - Reload re-renders the transcript only (no session_switch, queue pause, plan or Activity reset) and rebinds the existing Activity items. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jkyberneees
force-pushed
the
perf/webui-long-sessions
branch
from
October 17, 2026 20:19
6ece589 to
d910baa
Compare
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.
What
Long WebUI sessions no longer slow down as the transcript grows.
The old 80-item cap only counted top-level rows. One turn's stream, holding hundreds of tool steps and each step's eagerly built result view, was never trimmed. Opening a large session also rendered every message before pruning.
js/transcript.js, new)Measured (headless Chromium,
odek serve, synthetic session)mainBrowser checks:
Tests
cmd/odek/ui/js/transcript.test.js(32 tests). Every regression test was RED on the code before its fix; the one exception is a live-work invariant that already held.go test ./cmd/odekWebUI tests pass, including the JS↔CSS class contract.render.jsworkspace.jsutils.jssessions.jstranscript.js/code-reviewhigh,/code-reviewmedium). Every confirmed finding is fixed in commits 2–4, each with a regression test..tb-bodywas alreadydisplay:none, so this is unchanged.🤖 Generated with Claude Code