on main help sign in
fix(mcp): fix ui description, double spaces (#1210)

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

commit886bb7c7101ec637104d17b34dce8573e1daa5ee authorCarlos Alexandro Becker <caarlos0@users.noreply.github.com> dateThu 9 Oct 2025, 19:32 (1 year ago) parent2d05fe8
3 files changed+7−4
internal/tui/components/core/core.go+5−2 internal/tui/components/core/testdata/TestStatus/EmptyDescription.golden+1−1 internal/tui/components/mcp/mcp.go+1−1
internal/tui/components/core/core.go+5−2
@@ -110,14 +110,17 @@ func Status(opts StatusOpts, width int) string {
110110 extraContentWidth += 1
111111 }
112112 description = ansi.Truncate(description, width-lipgloss.Width(icon)-lipgloss.Width(title)-2-extraContentWidth, "…")
113+ description = t.S().Base.Foreground(descriptionColor).Render(description)
113114 }
114− description = t.S().Base.Foreground(descriptionColor).Render(description)
115115
116116 content := []string{}
117117 if icon != "" {
118118 content = append(content, icon)
119119 }
120− content = append(content, title, description)
120+ content = append(content, title)
121+ if description != "" {
122+ content = append(content, description)
123+ }
121124 if opts.ExtraContent != "" {
122125 content = append(content, opts.ExtraContent)
123126 }
internal/tui/components/core/testdata/TestStatus/EmptyDescription.golden+1−1
@@ -1 +1 @@
1−● Title Only 
1+● Title Only
internal/tui/components/mcp/mcp.go+1−1
@@ -55,7 +55,7 @@ func RenderMCPList(opts RenderOptions) []string {
5555
5656 // Determine icon and color based on state
5757 icon := t.ItemOfflineIcon
58− description := l.MCP.Command
58+ description := ""
5959 extraContent := ""
6060
6161 if state, exists := mcpStates[l.Name]; exists {