fix(cli): stabilize large tool output rendering#3586
Closed
chiga0 wants to merge 2 commits into
Closed
Conversation
45f516f to
39708ce
Compare
Collaborator
Author
|
Superseded by #3591, which consolidates the effective PR1-PR4 TUI flicker foundation changes onto the latest main as one reviewable PR. The new PR also documents what is fixed now and what remains for follow-up Closure-A/B/C work. |
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
This is PR2 in the TUI flicker/stability series and is intentionally stacked on #3584 (
fix/main-screen-flicker). After #3584 lands, this PR can be retargeted tomain.It addresses large string tool result output that currently enters Ink layout in full and is only clipped later by
MaxSizedBox. The fix now covers both explicit multi-line output and single-line output that visually wraps heavily, such as minified JSON, base64, or long logs.Changes
Text.\nline count.MaxSizedBox.Why This Is Separate From PR1
PR1 reduces main-screen redraw pressure and stream-token redraw frequency. This PR handles a separate class of flicker: large completed tool outputs that are too expensive before clipping. Keeping it separate makes the behavior easy to reproduce and verify with focused
ToolMessagetests.Verification
git diff --checkcd packages/cli && npx vitest run src/ui/components/messages/ToolMessage.test.tsxnpm run typecheck --workspace=packages/clinpm run lint --workspace=packages/cliEffect Comparison
Before screenshot/video:
After screenshot/video: