← Back to issue list

Multi-line permanent progress doesn't overwrite temporary progress

View original Github issue

Metadata

Project
craft-cli
Number
#371
Type
issue
State
open
Author
jonathan-conder
Labels
—
Created
Updated
Closed
—

Current evaluation

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.

Suggested action: close resolved

Reason: PR #445 was merged as commit 690c523 ("fix(printer): handle multiline permanent progress correctly"), which is present in craft_cli/printer.py at the current HEAD. The new helper _format_term_lines() splits text on newlines and formats each rendered line with _fill_line() so every line is fully cleared, and the regression test test_multiline_permanent_progress_overwrites_temporary_progress in tests/integration/test_messages_integration.py reproduces exactly the reported sequence ("foo foo foo" then permanent "bar\nbar") and asserts each line is emitted separately in both terminal and log output.

Evaluated by: mr-cal-bot

Impact: 28 Quick Win: 19 Complexity: 25 Confidence: 96 Actionability: 90

Issue body

### Bug Description I assumed it was possible to pass multi-line strings to `emit.progress`. At least, craft-application does it. However, the first line doesn't overwrite the existing progress line if it was longer. ### To Reproduce ```python from craft_cli import EmitterMode, emit emit.init(EmitterMode.BRIEF, appname="testcraft", greeting="Greeting") emit.progress("foo foo foo") emit.progress("bar\nbar", permanent=True) ``` Expected output: ``` bar bar ``` Actual output: ``` bar foo foo bar ``` ### part yaml ```shell ``` ### Relevant log output ```shell 2025-08-11 15:02:50.183 Greeting 2025-08-11 15:02:50.183 foo foo foo 2025-08-11 15:02:50.183 bar bar ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 28
Quick Win: 19
Complexity: 25
Confidence: 96
Actionability: 90
close resolved 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.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 17
Complexity: 30
Confidence: 85
Actionability: 80
keep open Multiline permanent progress messages leave residual text from previous temporary progress. A fix PR (#445) is open but not yet merged.
qwen/qwen3.8-27b
Impact: 30
Quick Win: 16
Staleness: 50
Complexity: 45
Confidence: 85
Support Request: 0
keep 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.
qwen/qwen3.6-35b-a3b
Staleness: 15
Complexity: 40
Confidence: 95
Support Request: 5
keep open Bug in craft-cli where permanent multi-line progress messages fail to fully overwrite longer temporary progress lines, leaving residual text. Currently has an open PR (#445) addressing the fix.
qwen3.6-35b-a3b-mtp-q6
Staleness: 25
Complexity: 40
Confidence: 90
Support Request: 5
keep open Bug where permanent multi-line progress messages fail to fully overwrite previous temporary progress text in the terminal. A maintainer has analyzed the issue and opened a PR to fix the terminal output path.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/craft-cli#445 (confidence 97%)

    Merged PR, reported by the issue's own reporter (@gcomneno) in the last comment and merged as commit 690c523

Related issues

Issue Project State Summary Similarity
#445 fix(printer): handle multiline permanent progress correctly craft-cli merged Merged PR #445 in commit 690c523, fixing multiline permanent progress to clear every terminal line and log multiline text as separate timestamped lines.
76%