Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new plain-text progress rendering mode (--progress plain) intended for CI/piped output where ANSI cursor control isn’t supported, and wires it through the CLI into the TerminalProgress library.
Changes:
- Added
ProgressConfig.outputModewith.ansi(default) and.plainmodes. - Updated
ProgressBarrendering/terminal behavior to avoid ANSI cursor control in plain mode and emit newline-terminated lines. - Added CLI flag support (
plain) and tests for plain-modedraw()formatting.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/TerminalProgressTests/ProgressBarTests.swift | Adds tests for plain-mode config/draw behavior. |
| Sources/TerminalProgress/ProgressConfig.swift | Introduces outputMode and OutputMode enum (default .ansi). |
| Sources/TerminalProgress/ProgressBar.swift | Switches terminal behavior by output mode; adds plain-mode render throttling. |
| Sources/TerminalProgress/ProgressBar+Terminal.swift | Emits newline output for plain mode; avoids cursor reset in plain. |
| Sources/TerminalProgress/ProgressBar+State.swift | Adds lastPlainRenderTime state for throttling plain output. |
| Sources/Services/ContainerAPIService/Client/Flags.swift | Extends --progress option to accept plain. |
| Sources/ContainerCommands/** | Wires --progress plain into push/pull/run progress configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@jglogan hoping for a review! |
|
Thank you for the contribution! |
|
@dkovba Apologies, CI was failing, pushed another commit. Would you mind taking another look 👀 |
manojmahapatra
left a comment
There was a problem hiding this comment.
Suggestion: can we update/regenerate docs/command-reference.md in this PR so plain is discoverable in the repo docs?
|
@nrthakur Thanks for the contribution! |
|
I see that this is already merged. Minor update #1379 I think nice-to-have. |
Type of Change
Motivation and Context
Adds a
plainprogress output mode (--progress plain) that outputs newline-separated progress lines without ANSI escape sequences. This is useful for CI environments, piped output, and non-TTY contexts where ANSI cursor control is not supported. Unlike--progress ansi, plain mode works even when stderr is not a TTY.Related: #1365, #641, #808
Testing