feat(progress): add ProgressOutput::Quiet variant#80
Conversation
Greptile SummaryAdds Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["output() called"] --> B["Read OUTPUT mutex copy"]
B --> C{stored == Quiet?}
C -- Yes --> D["return Quiet\nenv vars cannot override"]
C -- No --> E{CLX_TEXT_MODE=1?}
E -- Yes --> F["return Text"]
E -- No --> G["return stored"]
H["update() called"] --> I{is_disabled OR STOPPING\nOR output==Quiet?}
I -- Yes --> J["return early"]
I -- No --> K{output==Text?}
K -- Yes --> L["render_text_mode()"]
K -- No --> M["notify() triggers start()"]
M --> N{started OR disabled\nOR Text OR Quiet\nOR stopping?}
N -- Yes --> O["return, no thread spawned"]
N -- No --> P["spawn background refresh thread"]
R["refresh_once() called"] --> S{is_disabled OR output==Quiet?}
S -- Yes --> T["return Ok immediately"]
S -- No --> U["render + write frame to terminal"]
Reviews (6): Last reviewed commit: "feat(progress): add ProgressOutput::Quie..." | Re-trigger Greptile |
There was a problem hiding this comment.
Code Review
This pull request introduces a new Quiet output mode to the progress system, allowing for the suppression of all progress-related output. The changes include adding the Quiet variant to the ProgressOutput enum and updating the job rendering, line printing, and state management logic to return early when this mode is active. A review comment suggests combining the early return conditions in src/progress/job.rs into a single statement to improve code readability.
9aeac4e to
129eaef
Compare
129eaef to
facd2ef
Compare
facd2ef to
551e1c4
Compare
Addressed. I don't know if a major version bump is mandated here. jdx/hk#782 uses this. If this approach is ok, I will follow up with a similar approach for mise. |
…gress output Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
551e1c4 to
36781c5
Compare
Summary
ProgressOutput::Quietvariant to suppress all progress output (spinners, status lines, text-mode updates)update(),println(),refresh_once()when QuietThis enables consumers like hk and mise to fully suppress progress output for
--quiet/--silentflags, rather thanfalling back to
ProgressOutput::Textwhich still prints text-mode status lines.Test plan
cargo test— all 7 tests passcargo clippy -D warnings— cleancargo fmt --check— cleanhk install --quietandhk check --quietproduce no progress output🤖 Generated with Claude Code