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 }