@@ -133,13 +133,16 @@ func (m Model) renderListView() string {
133133 components = append (components , m .styles .TableFocused .Render (m .table .View ()))
134134 }
135135
136- // Add the help text
136+ // Add the help text - constrained to table width
137137 theme := GetCurrentTheme ()
138138 mutedStyle := lipgloss .NewStyle ().Foreground (lipgloss .Color (theme .Muted ))
139139
140+ // Calculate table width from current columns
141+ tableWidth := m .getTableWidth ()
142+
140143 var helpParts []string
141144 if ! m .searchMode {
142- helpParts = append (helpParts , mutedStyle .Render (" ↑/↓: navigate • Enter: connect • a: add • c: themes • ctrl+s: search focus " ))
145+ helpParts = append (helpParts , mutedStyle .Render ("↑/↓: navigate • Enter: connect • a: add • c: themes • ctrl+s: search focus " ))
143146 if m .appConfig != nil && m .appConfig .StartInSearchMode {
144147 onStyle := lipgloss .NewStyle ().Foreground (lipgloss .Color (theme .Primary )).Bold (true )
145148 helpParts = append (helpParts , onStyle .Render ("[on]" ))
@@ -148,7 +151,7 @@ func (m Model) renderListView() string {
148151 }
149152 helpParts = append (helpParts , mutedStyle .Render (" • h: help • q: quit" ))
150153 } else {
151- helpParts = append (helpParts , mutedStyle .Render (" Type to filter • Enter: validate • Tab: switch • ctrl+s: search focus " ))
154+ helpParts = append (helpParts , mutedStyle .Render ("Type to filter • Enter: validate • Tab: switch • ctrl+s: search focus " ))
152155 if m .appConfig != nil && m .appConfig .StartInSearchMode {
153156 onStyle := lipgloss .NewStyle ().Foreground (lipgloss .Color (theme .Primary )).Bold (true )
154157 helpParts = append (helpParts , onStyle .Render ("[on]" ))
@@ -157,7 +160,10 @@ func (m Model) renderListView() string {
157160 }
158161 helpParts = append (helpParts , mutedStyle .Render (" • Esc: exit" ))
159162 }
160- components = append (components , strings .Join (helpParts , "" ))
163+
164+ // Constrain help text to table width using lipgloss
165+ helpStyle := lipgloss .NewStyle ().Width (tableWidth ).Align (lipgloss .Center )
166+ components = append (components , helpStyle .Render (strings .Join (helpParts , "" )))
161167
162168 // Join all components vertically with center alignment
163169 mainView := lipgloss .Place (
0 commit comments