fix(cli): gate synchronized terminal output#3588
Closed
chiga0 wants to merge 1 commit into
Closed
Conversation
edac442 to
b30bfa2
Compare
31e469e to
87665aa
Compare
87665aa to
6ab9d00
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 PR4 in the TUI flicker/stability series and is intentionally stacked on #3587 (
codex/pr3-narrow-shell-viewport). It should stay last in the stack because it touches terminal protocol behavior and stdout monkeypatch ordering.It adds a conservative DECSET 2026 synchronized-output wrapper for supported terminals so a burst of Ink frame writes can be bracketed by BSU/ESU. Unknown terminals, tmux, SSH, JetBrains, non-TTY output, and screen reader mode stay on the existing path by default.
Changes
synchronizedOutpututility with DECSET 2026 BSU/ESU frame bracketing.QWEN_CODE_DISABLE_SYNCHRONIZED_OUTPUT=1QWEN_CODE_SYNCHRONIZED_OUTPUT=0QWEN_CODE_FORCE_SYNCHRONIZED_OUTPUT=1QWEN_CODE_SYNCHRONIZED_OUTPUT=1terminalRedrawOptimizerand restore before it so the monkeypatch stack unwinds cleanly.Issue Class
Targets the PR4 issue class from the TUI plan:
Verification
After rebasing on the updated PR2/PR3 stack:
git diff --checkcd packages/cli && npx vitest run src/ui/hooks/useGeminiStream.test.tsx src/ui/components/messages/ToolMessage.test.tsx src/ui/utils/terminalRedrawOptimizer.test.ts src/ui/utils/synchronizedOutput.test.tscd packages/core && npx vitest run src/utils/terminalSerializer.test.ts src/services/shellExecutionService.test.tsnpm run typecheck --workspace=packages/clinpm run typecheck --workspace=packages/corenpm run lint --workspace=packages/clinpm run lint --workspace=packages/coreManual Matrix
Before merge, please manually verify:
Effect Comparison
Before screenshot/video:
After screenshot/video: