← Back to issue list

fix(printer): handle multiline permanent progress correctly

View original Github issue

Metadata

Project
craft-cli
Number
#445
Type
pull request
State
open
Author
gcomneno
Labels
Created
Updated
Closed

Current evaluation

Fixes multiline permanent progress rendering in the printer so each terminal line is fully cleared and multiline messages log as separate timestamped lines. Pending review (0 reviewers); CI mostly green.

Suggested action: needs review

Reason: The fix is still relevant: current craft_cli/printer.py still writes the log as a single f"{timestamp_str} {message.text}\n" string and _write_line_terminal only truncates multiline text to the last line, with no line-by-line clearing, and the test multiline_permanent_progress_overwrites_temporary_progress does not exist in the tree. It has 0 reviewers and no maintainer acknowledgement (only the author's CI note), so it needs a maintainer review rather than closure.

Impact: 45 Quick Win: 24.75 Staleness: 60 Complexity: 45 Confidence: 75

Issue body

## Summary Handle multiline permanent progress updates correctly when replacing a previous temporary progress message. Previously, a permanent multiline progress message could leave leftover text from the previous temporary progress line on the terminal, and multiline progress text was also logged as a single string containing embedded newlines. This change formats terminal multiline progress output line-by-line so each rendered line is fully cleared, and logs multiline message text as separate timestamped lines. ## Testing ```bash pytest -q tests/integration/test_messages_integration.py -k "multiline_permanent_progress_overwrites_temporary_progress" -rs -vv pytest -q tests/unit/test_printer.py -k "_log or writelineterminal" -rs ruff check craft_cli/printer.py tests/integration/test_messages_integration.py tests/unit/test_printer.py ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 45
Quick Win: 24.75
Staleness: 60
Complexity: 45
Confidence: 75
needs review Fixes multiline permanent progress rendering in the printer so each terminal line is fully cleared and multiline messages log as separate timestamped lines. Pending review (0 reviewers); CI mostly green.
qwen/qwen3.6-35b-a3b
Staleness: 55
Complexity: 15
Confidence: 85
needs review Fixes terminal rendering issues with multiline permanent progress messages by clearing lines individually and logging them separately. Awaiting maintainer review after author addressed unrelated CI failures.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 15
Confidence: 85
needs review Fixes terminal printer to correctly handle multiline permanent progress updates, clearing leftover text and logging lines separately. Tests pass; awaiting maintainer review.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 25
Confidence: 85
needs review Fixes multiline permanent progress output to prevent leftover terminal text and properly format each line. All relevant tests pass, with CI failures noted as unrelated. Awaiting review and merge.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#371 Multi-line permanent progress doesn't overwrite temporary progress craft-cli open craft-cli bug: a permanent multi-line progress message only clears the first line of a previous temporary progress, leaving residual text. A maintainer diagnosed the printer path and opened fix PR #445 (open, pending review); bug still present in main.
74%
#270 fix: correctly print multi-line errors craft-cli merged Merged fix for multi-line error printing. The change splits error strings to print each line individually, preventing leftover characters from previous progress messages. Approved by two reviewers, passed CI, and resolves #263.
71%