fix(core): preserve shell transcript across narrow wraps#3587
Closed
chiga0 wants to merge 3 commits into
Closed
Conversation
edac442 to
b30bfa2
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 PR3 in the TUI flicker/stability series and is intentionally stacked on #3586 (
codex/pr2-large-output-detail-stability). After the earlier PRs land, this PR can be retargeted down the stack.It addresses the narrow-terminal / tmux-pane shell class where xterm visual soft wraps and resize reflow can be mistaken for duplicated output. Final shell transcript text now unwraps xterm continuation rows using
line.isWrapped, and live shell rendering now suppresses updates whose only change is soft-wrap segmentation of the same logical content.Changes
serializeTerminalToText()for transcript-oriented xterm serialization.unwrapWrappedLinescomparison mode toserializeTerminalToObject()for live ANSI snapshots.JSON.stringifycomparison with semantic ANSI token comparison.showColor=falseshell path, so the default configuration is covered too.Issue Class
Targets the PR3 issue class from the TUI plan:
Verification
git diff --checkcd packages/core && npx vitest run src/utils/terminalSerializer.test.ts src/services/shellExecutionService.test.tsnpm run lint --workspace=packages/corenpm run typecheck --workspace=packages/corenpm run typecheck --workspace=packages/cliEffect Comparison
Before screenshot/video:
After screenshot/video: