From 68d9b510ccfb4537c4b2bd27f033ff7b0334242e Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Wed, 9 Sep 2026 15:35:21 +0200 Subject: [PATCH] fix(display): reset the screen after degraded out-of-operation lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Nicolas De Loof --- cmd/display/tty.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/display/tty.go b/cmd/display/tty.go index c86693075..83ee17bb2 100644 --- a/cmd/display/tty.go +++ b/cmd/display/tty.go @@ -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() } }