Summary
ConsoleUi.ShouldUseInteractiveConsole (ConsoleUi.cs:64-68) determines whether to render a spinner / progress bar based on Console.IsOutputRedirected alone. This misses several common cases: TERM=dumb (legitimately a TTY but supports no escape sequences), TERM unset (some embedded shells), running under tmux/screen with TERM=screen (escape behavior differs), and CI environments that allocate a TTY but pipe stdout through a logging shim. The result: spinner artifacts littering CI logs, broken in dumb-terminal environments, no graceful degradation.
Where
src/CodeIndex/Cli/ConsoleUi.cs:64-68 (interactive-console detection)
src/CodeIndex/Cli/ConsoleUi.cs:191-222 (spinner render)
Suggested approach
(1) Extend ShouldUseInteractiveConsole to also return false when TERM=dumb, TERM is empty/null on Unix, or CI=true env var is set (common convention adopted by GitHub Actions, GitLab, CircleCI). (2) Allow an explicit --progress=auto|always|never override (and CDIDX_PROGRESS=... env var). (3) Document the heuristic under "TTY detection" in the README. (4) Add unit tests that drive ShouldUseInteractiveConsole with various env permutations. (5) Cross-link with #1523 (NO_COLOR honor — same family of TTY-aware behavior) and the just-filed #1805 (--quiet) — they should compose: --quiet implies no spinner regardless of TTY.
Summary
ConsoleUi.ShouldUseInteractiveConsole(ConsoleUi.cs:64-68) determines whether to render a spinner / progress bar based onConsole.IsOutputRedirectedalone. This misses several common cases:TERM=dumb(legitimately a TTY but supports no escape sequences),TERMunset (some embedded shells), running under tmux/screen withTERM=screen(escape behavior differs), and CI environments that allocate a TTY but pipe stdout through a logging shim. The result: spinner artifacts littering CI logs, broken in dumb-terminal environments, no graceful degradation.Where
src/CodeIndex/Cli/ConsoleUi.cs:64-68(interactive-console detection)src/CodeIndex/Cli/ConsoleUi.cs:191-222(spinner render)Suggested approach
(1) Extend
ShouldUseInteractiveConsoleto also return false whenTERM=dumb,TERMis empty/null on Unix, orCI=trueenv var is set (common convention adopted by GitHub Actions, GitLab, CircleCI). (2) Allow an explicit--progress=auto|always|neveroverride (andCDIDX_PROGRESS=...env var). (3) Document the heuristic under "TTY detection" in the README. (4) Add unit tests that driveShouldUseInteractiveConsolewith various env permutations. (5) Cross-link with #1523 (NO_COLOR honor — same family of TTY-aware behavior) and the just-filed #1805 (--quiet) — they should compose:--quietimplies no spinner regardless of TTY.