Skip to content

fix(printer): handle multiline permanent progress correctly#445

Open
gcomneno wants to merge 1 commit intocanonical:mainfrom
gcomneno:contrib/issue-371-multiline-progress-overwrite-clean
Open

fix(printer): handle multiline permanent progress correctly#445
gcomneno wants to merge 1 commit intocanonical:mainfrom
gcomneno:contrib/issue-371-multiline-progress-overwrite-clean

Conversation

@gcomneno
Copy link
Copy Markdown
Contributor

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant