printer: enhance ephemeral message handover after stop() or pause()
Metadata
Current evaluation
Merged. Enhances the Printer class to clear the terminal line and reset the cursor instead of appending a newline on stop or pause, enabling ephemeral progress messages to seamlessly transfer between host and container processes.
Suggested action: —
No scores available.
Issue body
It is a very common pattern for craft tools to start the session
directly on a host machine, but launch another craft instance to
do the actual work inside LXD or Multipass.
In order for a seamless CLI experience (which looks identical
between a 'destructive build' on the host, LXD or Multipass),
we need support for progress messages (ephemeral=True) to seamlessly
cross the boundaries between the host and the container instance of
of the craft tool.
Please see examples.py #26 for an example.
Add support for _Printer to respect ephemeral messages when
stopping. On printer stop(), these messages are no longer terminated
with a newline, but instead the printer will clear and reset the
cursor to the start of the line.
This behaviour change will allow subsequent terminal writes by a
different process the ability to reuse a terminal line previously
used as ephemeral output.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Enhances the Printer class to clear the terminal line and reset the cursor instead of appending a newline on stop or pause, enabling ephemeral progress messages to seamlessly transfer between host and container processes. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Updated _Printer to clear and reset the cursor on stop() instead of appending a newline, enabling seamless ephemeral message handover between host and container processes. Test failures flagged by a maintainer were resolved prior to merge. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #125 When the Printer stops it needs to clean the last line if it was transient progress | craft-cli | open | Printer leaves transient progress text on screen when stopping or pausing; it should be overwritten by the next output. Open since 2022, no comments, but a related fix (PR #126) already enhanced ephemeral handover after pause/stop. |