fix(cli): ASCII box/separator chars in CI + respect NO_COLOR in output-renderer#4455
Open
PeterPonyu wants to merge 2 commits into
Open
fix(cli): ASCII box/separator chars in CI + respect NO_COLOR in output-renderer#4455PeterPonyu wants to merge 2 commits into
PeterPonyu wants to merge 2 commits into
Conversation
… output-renderer Terminal emulators in CI (GitHub Actions and generic CI) do not render box-drawing Unicode characters reliably, producing mojibake in logs. format-verbose.ts and install-validators.ts now detect CI/GITHUB_ACTIONS at module load time and substitute ASCII equivalents (-, |, +) for the Unicode line/box chars. output-renderer.ts: colorizeWithProfileColor now skips truecolor ANSI escape sequences when NO_COLOR, CI, GITHUB_ACTIONS, or TERM=dumb is set, preventing raw \e[38;2;... codes from leaking into non-color terminals. output-renderer.test.ts (new): verifies that NO_COLOR suppresses truecolor escapes from renderAgentHeader. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Scope-isolated replacement for #4310 (closed: 25-commit mixed-scope branch — content overlapped with #4002 / #4003 / #4305).
Two commits, six files, addresses two CLI rendering issues in CI/non-color environments.
Changes
fix(cli): substitute ASCII box chars in CI — `format-verbose.ts` and `install-validators.ts` detect `CI` / `GITHUB_ACTIONS` at module load and emit `-`, `|`, `+` instead of Unicode box-drawing chars that produce mojibake in CI log viewers.Files
Verification
```
bun run typecheck # clean
bun test src/cli/doctor/formatter.test.ts src/cli/install-validators.test.ts src/cli/run/output-renderer.test.ts
15 pass, 0 fail, 36 expect() calls
```
Why split
#4310 accidentally bundled 25 commits from a feature-stacking branch (roles-models == #4002, TUI export == #4305, agent-handoff XML escape == follow-up to #4003) plus these CLI fixes. Closing #4310 in favor of this scoped subset; the other scopes already have their own PRs.
Summary by cubic
Use ASCII box/separator characters in CI and skip truecolor ANSI when color is disabled, fixing garbled CI logs and raw escape codes in non-color environments.
format-verbose.tsandinstall-validators.tsnow use ASCII- | +whenCIorGITHUB_ACTIONSis set.output-renderer.tsstops emitting truecolor escapes whenNO_COLOR,CI,GITHUB_ACTIONS, orTERM=dumbis set.NO_COLORhandling; minor import cleanup inoutput-renderer.ts.Written for commit 2647f76. Summary will update on new commits. Review in cubic