fix(tui): normalize content whitespace for consistent footer position
CI / test (pull_request) Successful in 2m43s
CI / lint (pull_request) Successful in 1m1s
CI / vulncheck (pull_request) Successful in 51s

Each tab returned different leading newlines (Sites/tables: 1,
Logs: 3, empty states: varies). TrimSpace content before layout
so JoinVertical controls all spacing. Remove leading \n from
footer since JoinVertical handles gaps.
This commit is contained in:
2026-06-04 16:03:57 -04:00
parent aae6e6e65e
commit d4a2e9dd53
+3 -2
View File
@@ -171,6 +171,7 @@ func (m Model) viewDashboard() string {
} }
} }
content = strings.TrimSpace(content)
footer := m.renderFooter(stats) footer := m.renderFooter(stats)
outerPad := lipgloss.NewStyle().Padding(1, 2) outerPad := lipgloss.NewStyle().Padding(1, 2)
@@ -285,9 +286,9 @@ func (m Model) renderFooter(stats dashboardStats) string {
} }
ver := subtleStyle.Render("v" + m.version) ver := subtleStyle.Render("v" + m.version)
footer := "\n" + statusLine + " " + subtleStyle.Render(keys) + " " + ver footer := statusLine + " " + subtleStyle.Render(keys) + " " + ver
if m.filterText != "" && m.currentTab == 0 { if m.filterText != "" && m.currentTab == 0 {
footer = "\n" + subtleStyle.Render(fmt.Sprintf("filter: %s", m.filterText)) + " " + statusLine + " " + subtleStyle.Render(keys) + " " + ver footer = subtleStyle.Render(fmt.Sprintf("filter: %s", m.filterText)) + " " + statusLine + " " + subtleStyle.Render(keys) + " " + ver
} }
return footer return footer
} }