feat(tui): inline detail panel, titled borders, panel focus #146

Merged
lerko merged 10 commits from feat/inline-detail into main 2026-06-21 16:44:01 +00:00
3 changed files with 7 additions and 4 deletions
Showing only changes of commit 5720fabdbc - Show all commits
+4 -1
View File
@@ -52,7 +52,7 @@ func (m Model) renderCompactLogLine(line string, maxW int) string {
return " " + tag + " " + msg
}
func (m Model) viewLogsSidebar(width int) string {
func (m Model) viewLogsSidebar(width, maxLines int) string {
logs := m.engine.GetLogs()
if len(logs) == 0 {
return m.st.subtleStyle.Render(" No logs yet")
@@ -69,6 +69,9 @@ func (m Model) viewLogsSidebar(width int) string {
continue
}
lines = append(lines, m.renderCompactLogLine(line, width))
if maxLines > 0 && len(lines) >= maxLines {
break
}
}
return "\n" + sidebarStyle.Render(strings.Join(lines, "\n"))
+1 -1
View File
@@ -160,7 +160,7 @@ func (m Model) viewDashboard() string {
m.contentWidth = leftW
monitors := m.viewSitesTab()
left := lipgloss.NewStyle().Width(leftW).Render(monitors)
sidebar := m.viewLogsSidebar(rightW)
sidebar := m.viewLogsSidebar(rightW, m.maxTableRows+chromeTable)
right := lipgloss.NewStyle().Width(rightW).Render(sidebar)
top := lipgloss.JoinHorizontal(lipgloss.Top, left, right)
if m.detailOpen {
+2 -2
View File
@@ -18,8 +18,8 @@ func (m Model) viewDetailInline(width int) string {
var b strings.Builder
title := m.st.dangerStyle.Render("▶ " + site.Name)
b.WriteString(title + "\n")
title := m.st.titleStyle.Render(site.Name)
b.WriteString(" " + title + "\n")
divW := width - 4
if divW < 20 {