fix(printer): handle multiline permanent progress correctly
Metadata
Current evaluation
Merged PR #445 in commit 690c523, fixing multiline permanent progress to clear every terminal line and log multiline text as separate timestamped lines.
Resolution: closed resolved
Reason: The approved PR passed CI and was merged as commit 690c523, adding line-by-line clearing and logging for multiline permanent progress.
Evaluated by: mr-cal-bot
No scores available.
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 |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #445 in commit 690c523, fixing multiline permanent progress to clear every terminal line and log multiline text as separate timestamped lines. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #445 via commit 690c523, fixing permanent multiline progress so each terminal line is fully cleared and multiline text is logged as separate timestamped lines. | |
| stealth/space-bunny-alpha | — | closed stale | PR #445 fixed multiline progress rendering and logging and was approved, but closed unmerged after 155 days; no resolving commit appears in repository history. | |
| stealth/space-bunny-alpha |
Impact:
45
Quick Win:
20
Complexity:
25
Confidence:
82
Actionability:
58
|
keep open | Fixes multiline permanent progress so each rendered line clears prior transient text, and logs multiline messages as timestamped lines. Approved; broad test jobs remain pending. | |
| qwen/qwen3.6-35b-a3b |
Impact:
55
Quick Win:
37
Complexity:
20
Confidence:
85
Actionability:
85
|
needs review | Fixes multiline permanent progress leaving residual text from previous temporary progress messages. Approved by 1 reviewer, all CI checks passing. | |
| qwen/qwen3.6-35b-a3b |
Impact:
50
Quick Win:
40
Staleness:
10
Complexity:
20
Confidence:
85
|
needs review | Fixes multiline permanent progress leaving residual text from previous temporary progress messages. Approved by 1 reviewer, all CI checks passing. | |
| qwen/qwen3.6-35b-a3b |
Impact:
50
Quick Win:
38
Staleness:
45
Complexity:
25
Confidence:
75
|
needs review | Fixes multiline permanent progress messages leaving residual text from previous temporary progress lines. PR has passing CI, no reviewers yet, and addresses issue #371. | |
| qwen/qwen3.6-35b-a3b |
Impact:
40
Quick Win:
30
Staleness:
15
Complexity:
25
Confidence:
75
|
needs review | Fixes multiline permanent progress not correctly overwriting temporary progress messages in the terminal printer. | |
| qwen/qwen3.8-27b |
Impact:
45
Quick Win:
25
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. |
Update history
| Date | Change |
|---|---|
| updated | |
| closed | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated |
Related work
-
Likely Fixed By:
canonical/craft-cli#371
(confidence 99%)
Reported the same residual-text bug when permanent multiline progress replaced temporary progress; its fix was merged in PR #445.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #371 Multi-line permanent progress doesn't overwrite temporary progress | craft-cli | open | Bug in craft_cli printer: a permanent multi-line progress message did not fully overwrite a longer previous temporary progress line, leaving residual text ("bar foo foo"). Fixed by merged PR #445. | |
| #125 When the Printer stops it needs to clean the last line if it was transient progress | craft-cli | open | Reporter (maintainer facundobatista) asked the Printer to clear the transient progress line when stopping or pausing. Implemented in PR #126 (commit 9f9df27, merged as 2cbced2); issue left open. |