From e8656b09a7f32f6afe0d6bfa00ca159b8075188e Mon Sep 17 00:00:00 2001 From: Axodouble Date: Thu, 14 May 2026 06:56:34 +0000 Subject: [PATCH] Fixed state being truncated in cell --- internal/tui/styles.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/internal/tui/styles.go b/internal/tui/styles.go index f7f55c5..d9329c1 100644 --- a/internal/tui/styles.go +++ b/internal/tui/styles.go @@ -58,14 +58,18 @@ var ( stateUnknownStyle = lipgloss.NewStyle().Foreground(colorMuted) ) +// renderState returns a plain-text state label for use inside the +// bubbles table. The table truncates cells with runewidth.Truncate +// which counts the printable bytes of ANSI escape sequences toward +// column width, so a styled value gets chopped down to just "…". func renderState(s string) string { switch s { case "up": - return stateUpStyle.Render("● up") + return "● up" case "down": - return stateDownStyle.Render("● down") + return "● down" default: - return stateUnknownStyle.Render("○ unknown") + return "○ unknown" } }