fix(display): reset the screen after degraded out-of-operation lines

A plain line printed outside any operation lands below the tracked
block, so the block is no longer directly above the cursor. Reset the
screen so the next operation repaints a fresh block instead of moving
the cursor over rows that shifted — the same reason unsuspend resets
after buildkit output.

Suggested-by: Guillaume Lours <705411+glours@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2026-09-09 15:35:21 +02:00 • committed by Guillaume Lours
parent 1a3bb4f6f5
commit 68d9b510cc

View file

@ -191,8 +191,12 @@ func (w *termWriter) handle(e api.Resource) {
w.tree.apply(e, w.now())
if w.operation == "" {
// outside any operation: degrade to one plain line per event
// outside any operation: degrade to one plain line per event. This
// prints outside the tracked block, so the next repaint must not
// assume the block is still directly above the cursor (same reason
// unsuspend resets after buildkit output).
_, _ = fmt.Fprintf(w.out, "%s %s %s\n", e.ID, eventColor(e.Status, SuccessColor)(e.Text), e.Details)
w.scr.reset()
}
}