fix(vscode): prevent transcript handoff flicker - #14044
Merged
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
…-tool-flicker-after-reasoning
marius-kilocode
enabled auto-merge
September 14, 2026 06:58
eshurakov
approved these changes
Sep 14, 2026
This was referenced Sep 14, 2026
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 Problem This Solves
The VS Code transcript can flicker briefly when a reasoning block is followed by parallel bash tools and the agent starts its next step. The visible symptom is a short jump down and back up around the second shell card.
Why This Change Was Made
The transcript intentionally keeps the growing assistant suffix outside Virtua. When a new assistant message starts, the previous assistant row moves from the direct tail into Virtua. Virtua initially assigns a new row its
itemSizeestimate of 260px, while the real row in this scenario is about 546px tall.The sequence was:
scrollTopto the shorter layout.ResizeObservermeasured the real row and expanded the layout.The fix measures newly handed-off virtual rows in a microtask and re-pins before the next paint. It only runs when the virtual row list grows at the end within the same session, so session changes, prepending older messages, and user-paused scrolling are not treated as handoffs.
The repository already patches Virtua 0.49.1 with a synchronous
VirtualizerHandle.measure()API, but that patch previously changed onlylib/solid/index.jsx. The VS Code webview esbuild configuration resolves the package's default Solid entry,lib/solid/index.js, rather than thesolidconditional JSX entry. Therefore the method existed in the TypeScript declaration and JSX source but was missing from the runtime entry used by the webview. This PR mirrors the existing patch in the compiled entry so the runtime API used by the fix exists where it is bundled.Updating Virtua did not remove the need for this change. The current latest release still exposes no
measure()method in the compiled Solid handle, and the existing 0.49.1 patch remains the fork's source of the synchronous measurement behavior.User Impact
The transcript remains pinned to the bottom without a one-frame vertical twitch when the next reasoning step begins after tool calls. User-paused scrolling remains unchanged.
Evidence
scrollTopchanging from139to127whilescrollHeightwas already725, then recovering to216.5on the next frame.bun run typecheckpassed inpackages/kilo-vscode.bun run lintpassed inpackages/kilo-vscode.bun run test:unitpassed, 5,528 tests across 418 files.