Summary
--color off has no effect on the interactive TUI. A run under a real terminal with the flag set still emitted 48 SGR colour sequences.
Reproduce
hookdeck listen 3030 <source> --color off # under a controlling pty
Count the \x1b[ SGR sequences in the captured output: 48 with the flag set.
The flag only reaches the non-TTY renderer, where it works correctly (0 SGR sequences).
Why it matters
--color off exists for terminals that render poorly, for accessibility, and for captured output. Silently ignoring it in the mode that produces the most colour is the case where it matters most.
Note it is ignored in a different direction from #403: there, --color off fails to suppress OSC-8 hyperlinks in non-TTY output; here, it fails to suppress SGR colour in TTY output. Same flag, two unrelated gaps, so they are filed separately.
Suggested fix
Thread the colour setting into the interactive renderer, or have it select the plain renderer when colour is disabled.
Testing
Unit on the renderer: assert no SGR sequences are produced when colour is disabled, independent of whether the writer is a terminal.
Related
Filed by Claude on Phil's behalf, from release-candidate testing.
Summary
--color offhas no effect on the interactive TUI. A run under a real terminal with the flag set still emitted 48 SGR colour sequences.Reproduce
Count the
\x1b[SGR sequences in the captured output: 48 with the flag set.The flag only reaches the non-TTY renderer, where it works correctly (0 SGR sequences).
Why it matters
--color offexists for terminals that render poorly, for accessibility, and for captured output. Silently ignoring it in the mode that produces the most colour is the case where it matters most.Note it is ignored in a different direction from #403: there,
--color offfails to suppress OSC-8 hyperlinks in non-TTY output; here, it fails to suppress SGR colour in TTY output. Same flag, two unrelated gaps, so they are filed separately.Suggested fix
Thread the colour setting into the interactive renderer, or have it select the plain renderer when colour is disabled.
Testing
Unit on the renderer: assert no SGR sequences are produced when colour is disabled, independent of whether the writer is a terminal.
Related
--color offFiled by Claude on Phil's behalf, from release-candidate testing.