From e0f189efe9fb5afb1541fcc312e8fd88a23210f0 Mon Sep 17 00:00:00 2001 From: Tyler Koenig Date: Thu, 4 Jun 2026 15:36:21 -0400 Subject: [PATCH] fix(tui): logs tab use viewport for scrollable content Logs were dumping all lines directly, pushing the dashboard footer off screen. Now uses logViewport with proper height accounting so footer stays visible and scrolling works. --- internal/tui/tab_logs.go | 3 ++- internal/tui/update.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/tui/tab_logs.go b/internal/tui/tab_logs.go index 415e77d..6dd439b 100644 --- a/internal/tui/tab_logs.go +++ b/internal/tui/tab_logs.go @@ -118,5 +118,6 @@ func (m Model) viewLogsTab() string { header += subtleStyle.Render(fmt.Sprintf(" (%d hidden)", total-shown)) } - return "\n" + header + "\n\n" + strings.Join(rendered, "\n") + m.logViewport.SetContent(strings.Join(rendered, "\n")) + return "\n" + header + "\n\n" + m.logViewport.View() } diff --git a/internal/tui/update.go b/internal/tui/update.go index 3527ded..72ad092 100644 --- a/internal/tui/update.go +++ b/internal/tui/update.go @@ -127,7 +127,7 @@ func (m *Model) handleResize(msg tea.WindowSizeMsg) (tea.Model, tea.Cmd) { m.maxTableRows = 1 } m.logViewport.Width = msg.Width - chromePadH - m.logViewport.Height = msg.Height - (chromePadV + chromeHeader + chromeGaps + chromeFooter) + m.logViewport.Height = msg.Height - (chromePadV + chromeHeader + chromeGaps + chromeFooter + 3) m.historyViewport.Width = msg.Width - chromePadH m.historyViewport.Height = msg.Height - 10 m.slaViewport.Width = msg.Width - chromePadH