From b315983898ddd5bd487e8e85828ed0e84c2726ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Fri, 12 Dec 2025 11:18:27 +0100 Subject: [PATCH] image/tree: Fix width calculation for untagged images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When calculating column widths for the tree view, untagged images weren't being properly accounted for in the width calculation. This caused layout issues when there were tagged images were shorter than the `` string. Signed-off-by: Paweł Gronowski --- cli/command/image/tree.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cli/command/image/tree.go b/cli/command/image/tree.go index 2a497e6e77..ea8dc1a6cd 100644 --- a/cli/command/image/tree.go +++ b/cli/command/image/tree.go @@ -547,7 +547,11 @@ func (h imgColumn) PrintR(clr aec.ANSI, s string) string { func widestFirstColumnValue(headers []imgColumn, images []topImage) int { width := len(headers[0].Title) for _, img := range images { - for _, name := range img.Names { + names := img.Names + if len(names) == 0 { + names = []string{untaggedName} + } + for _, name := range names { if len(name) > width { width = len(name) }