From 2e489cdc1aa4a74a4cf933440bf6bfc15b42ce0d Mon Sep 17 00:00:00 2001 From: Tyler Koenig Date: Thu, 28 May 2026 15:04:38 -0400 Subject: [PATCH] fix(tui): apply Width/MaxWidth to header row cells too Header row was returning bare tableHeaderStyle with no width constraints, letting lipgloss table-level Width() inflate the # column. --- internal/tui/table_helpers.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/tui/table_helpers.go b/internal/tui/table_helpers.go index 86a3a16..ed5397e 100644 --- a/internal/tui/table_helpers.go +++ b/internal/tui/table_helpers.go @@ -41,7 +41,11 @@ func (m Model) renderTable(headers []string, items int, buildRows func(start, en Rows(rows...). StyleFunc(func(row, col int) lipgloss.Style { if row == table.HeaderRow { - return tableHeaderStyle + h := tableHeaderStyle + if col < len(colWidths) && colWidths[col] > 0 { + h = h.Width(colWidths[col]).MaxWidth(colWidths[col]) + } + return h } isSelected := row == selectedVisual if styleOverride != nil {