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.
This commit is contained in:
@@ -118,5 +118,6 @@ func (m Model) viewLogsTab() string {
|
|||||||
header += subtleStyle.Render(fmt.Sprintf(" (%d hidden)", total-shown))
|
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()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ func (m *Model) handleResize(msg tea.WindowSizeMsg) (tea.Model, tea.Cmd) {
|
|||||||
m.maxTableRows = 1
|
m.maxTableRows = 1
|
||||||
}
|
}
|
||||||
m.logViewport.Width = msg.Width - chromePadH
|
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.Width = msg.Width - chromePadH
|
||||||
m.historyViewport.Height = msg.Height - 10
|
m.historyViewport.Height = msg.Height - 10
|
||||||
m.slaViewport.Width = msg.Width - chromePadH
|
m.slaViewport.Width = msg.Width - chromePadH
|
||||||
|
|||||||
Reference in New Issue
Block a user