From 8abe7d9eb774f957115aa73e89c212c11178396e Mon Sep 17 00:00:00 2001 From: kami Date: Sun, 28 Jun 2026 20:42:38 +0400 Subject: [PATCH] fix(tui): collapse multiline tool summaries so action rows don't stripe file_read on a directory/file returns newline-bearing summaries; clip kept the newlines, so the action row rendered multi-line with a background-filled stripe and the listing leaking underneath. Flatten the summary to one line first. --- apps/tui-go/internal/app/server.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/tui-go/internal/app/server.go b/apps/tui-go/internal/app/server.go index d05f5215..4625ef5f 100644 --- a/apps/tui-go/internal/app/server.go +++ b/apps/tui-go/internal/app/server.go @@ -451,7 +451,10 @@ func countSuffix(added, removed int) string { // actionToolText joins a tool label with a short, clipped result summary. func actionToolText(label, summary string) string { - s := strings.TrimSpace(summary) + // Collapse to a single line first: tool summaries (dir listings, file heads) + // often carry newlines, and a multi-line action row paints a background stripe + // per line with the raw content leaking underneath. + s := strings.Join(strings.Fields(summary), " ") if s == "" { return label }