← Back to issue list

fix(messages): reset terminal style after open_stream

View original Github issue

Metadata

Project
craft-cli
Number
#444
Type
pull request
State
open
Author
gcomneno
Labels
Created
2026-04-23 03:40:03+00:00
Updated
2026-05-24 17:54:10+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

## Summary Reset terminal style after `open_stream()` closes. If output written through `open_stream()` includes ANSI control sequences that alter terminal styling, that styling could affect subsequent output because no reset sequence was emitted when the stream context manager exited. This change adds a terminal-style reset on stream close through the printer layer, and includes focused unit and integration coverage. ## Testing ```bash pytest -q tests/unit/test_messages_stream_cm.py -rs pytest -q tests/integration/test_messages_integration.py -k "third_party_output_brief_terminal or open_stream_no_text" -rs ruff check craft_cli/messages.py craft_cli/printer.py tests/unit/test_messages_stream_cm.py tests/integration/test_messages_integration.py ```

Evaluation history

No evaluation history available.