You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Long VS Code transcripts still carried data and markup that the transcript renderer did not need. Patch-heavy histories sent full diff patches and encrypted OpenAI reasoning replay blobs across the VS Code extension-to-webview IPC bridge during transcript reconciliation. Completed historical labels also mounted shimmer layers even though they would never animate. Both costs accumulate as sessions grow.
The optimized paths are shared by the VS Code transcript surfaces, including the sidebar, editor tabs, and Agent Manager. Agent Manager exposed the largest historical sessions during profiling, but the improvement is not limited to Agent Manager.
What changes
Slim transcript snapshots and live updates immediately before the extension posts them to the webview. Keep the fields needed for transcript summaries and diagnostics, but omit summary.diffs[*].patch and metadata.openai.reasoningEncryptedContent from the display copy.
Render inactive historical TextShimmer labels as plain text until that component instance has actually been active. Once a live label has shimmered, keep its existing layered markup so the completion fade-out still works.
Preserve whitespace semantics for the plain inactive label path without reintroducing shimmer layers.
Behavior and data boundaries
There is no intended user-visible behavior change. Transcript history remains loaded, diff summary rows still show filenames and change counts, collapsed tools still expand, scrolling remains unchanged, active tool labels still shimmer while work is running, and completed live labels retain their fade-out.
The metadata slimming is extension-only and copy-on-write. The CLI backend remains the source of truth for session continuation, provider prompt caching, retry, fork, share, export, and cloud-agent storage. The webview never sends its slimmed transcript parts back into those flows. Opening a historical Changes view still fetches the full message from the backend, so line-level patches remain available when requested.
Profiled impact from this PR
Patch-heavy transcript reconcile payload: 12.20 MB -> 1.62 MB, an 87.4% reduction. This removes about 10.6 MB from the routine webview IPC path and makes that reconcile payload about 7.5x lighter.
Large static autonomous transcript: avoid 768 retained DOM nodes by rendering 256 inactive historical shimmer labels as plain text instead of three nested shimmer nodes each.
Warm activation median for that static autonomous transcript: 453 ms -> 441 ms, about 3% lower. Repeated post-change batches ranged from 434-443 ms, so the defensible improvement is 2-4% on top of fix(vscode): defer collapsed historical tool details #10810.
Representative shimmer-cleanup trace: layout work 483 ms -> 419 ms (13% lower) and style recalculation 419 ms -> 345 ms (18% lower).
The whitespace-preservation follow-up is performance-neutral: shimmer-only median 442.8 ms, whitespace-safe median 440.9 ms.
The larger visible switch improvement comes from this PR layered on #10810, which stopped collapsed historical edit-family and bash cards from eagerly mounting hidden details and consolidated timeline hover infrastructure.
Files Reviewed (2 files, incremental from ba9f686)
New in this increment:
packages/ui/src/components/text-shimmer.css — adds white-space: pre to the top-level [data-component="text-shimmer"] selector, aligning the container with the already-pre child [data-slot] rules so the plain inactive fallback text preserves whitespace correctly.
packages/kilo-vscode/tests/unit/textshimmer-no-timer.test.ts — adds a regression guard asserting the new white-space: pre rule is present in the CSS. The regex [^}]*white-space:\s*pre; correctly handles multi-line CSS blocks and the stripComments pass correctly strips the trailing kilocode_change comment before matching.
Carried from prior review (no changes):
All 14 files reviewed in the previous increment remain unchanged.
Notes
white-space: pre on container: Child [data-slot] elements already had white-space: pre. Adding it to the parent [data-component="text-shimmer"] ensures the plain-text fallback (rendered directly inside the container when shimmer() is false) is also treated as preformatted text. This is the correct fix for the whitespace-preservation follow-up described in the PR — performance-neutral per the profiling data.
Regression guard validity: stripComments removes /* kilocode_change - preserve inactive fallback whitespace */ before the regex runs, leaving white-space: pre; which the pattern matches. The [^}]* in the regex matches newlines in JS (it is any char except }), so multi-line blocks are handled correctly.
Reviewed by claude-4.6-sonnet-20260217 · 207,008 tokens
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
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.
Follow-up to #10810.
Long VS Code transcripts still carried data and markup that the transcript renderer did not need. Patch-heavy histories sent full diff patches and encrypted OpenAI reasoning replay blobs across the VS Code extension-to-webview IPC bridge during transcript reconciliation. Completed historical labels also mounted shimmer layers even though they would never animate. Both costs accumulate as sessions grow.
The optimized paths are shared by the VS Code transcript surfaces, including the sidebar, editor tabs, and Agent Manager. Agent Manager exposed the largest historical sessions during profiling, but the improvement is not limited to Agent Manager.
What changes
summary.diffs[*].patchandmetadata.openai.reasoningEncryptedContentfrom the display copy.TextShimmerlabels as plain text until that component instance has actually been active. Once a live label has shimmered, keep its existing layered markup so the completion fade-out still works.Behavior and data boundaries
There is no intended user-visible behavior change. Transcript history remains loaded, diff summary rows still show filenames and change counts, collapsed tools still expand, scrolling remains unchanged, active tool labels still shimmer while work is running, and completed live labels retain their fade-out.
The metadata slimming is extension-only and copy-on-write. The CLI backend remains the source of truth for session continuation, provider prompt caching, retry, fork, share, export, and cloud-agent storage. The webview never sends its slimmed transcript parts back into those flows. Opening a historical Changes view still fetches the full message from the backend, so line-level patches remain available when requested.
Profiled impact from this PR
12.20 MB -> 1.62 MB, an87.4%reduction. This removes about10.6 MBfrom the routine webview IPC path and makes that reconcile payload about7.5xlighter.768retained DOM nodes by rendering256inactive historical shimmer labels as plain text instead of three nested shimmer nodes each.453 ms -> 441 ms, about3%lower. Repeated post-change batches ranged from434-443 ms, so the defensible improvement is2-4%on top of fix(vscode): defer collapsed historical tool details #10810.483 ms -> 419 ms(13%lower) and style recalculation419 ms -> 345 ms(18%lower).442.8 ms, whitespace-safe median440.9 ms.Cumulative context with #10810
The larger visible switch improvement comes from this PR layered on #10810, which stopped collapsed historical edit-family and bash cards from eagerly mounting hidden details and consolidated timeline hover infrastructure.
619 ms -> 172 ms,72%lower (3.6xfaster).399-440 ms -> 159 ms,60-64%lower (2.5-2.8xfaster).13%, patch-heavy34%, bash-heavy37%, and mixed30%.