Skip to content

fix: strip all ANSI escape sequences in terminal command output - #838

Closed
OmarAlaaeldein wants to merge 8736 commits into
CodebuffAI:mainfrom
OmarAlaaeldein:fix/sudo-ansi-escape-tui-corruption
Closed

fix: strip all ANSI escape sequences in terminal command output#838
OmarAlaaeldein wants to merge 8736 commits into
CodebuffAI:mainfrom
OmarAlaaeldein:fix/sudo-ansi-escape-tui-corruption

Conversation

@OmarAlaaeldein

@OmarAlaaeldein OmarAlaaeldein commented Jul 3, 2026

Copy link
Copy Markdown

This PR fixes TUI display and scroll corruption caused by VT/ANSI control sequences in captured terminal-command output.

  • Switches the bounded output buffer from stripColors to the existing stripAnsi utility, so cursor movement, alternate-screen, and other control sequences cannot reach the TUI.
  • Leaves child-process TERM and SUDO_PROMPT unchanged.
  • Preserves carriage returns rather than removing them unconditionally.
  • Adds regression coverage for cursor-control sequences.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:triaged Classified by the community triage bot pr:needs-work Right idea, not mergeable as written

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants