feat(tui): stable detail panel with scroll, pinned footer, and 60/40 split #165

Merged
lerko merged 6 commits from fix/sla-sidebar-height into main 2026-07-01 01:27:52 +00:00
Showing only changes of commit 04cf12f52b - Show all commits
+8 -15
View File
@@ -210,34 +210,27 @@ func (m Model) detailTypeLine(site models.Site) []string {
return parts
}
func (m Model) detailKeys() string {
return m.st.subtleStyle.Render("[e] Edit [h] History [s] SLA [Esc] Back")
}
func (m Model) detailFooter(width int) string {
label := m.st.subtleStyle
var lines []string
dot := m.st.subtleStyle.Render(" · ")
var parts []string
switch m.detailMode {
case detailSLA:
var keys []string
for i, p := range slaPeriods {
k := fmt.Sprintf("[%s] %s", p.key, p.label)
if i == m.slaPeriodIdx {
keys = append(keys, m.st.titleStyle.Render(k))
parts = append(parts, m.st.titleStyle.Render(p.key)+" "+m.st.titleStyle.Render(p.label))
} else {
keys = append(keys, label.Render(k))
parts = append(parts, m.hotkey(p.key, p.label))
}
}
keys = append(keys, label.Render("[Esc] Back"))
lines = append(lines, " "+strings.Join(keys, " "))
parts = append(parts, m.hotkey("Esc", "Back"))
case detailHistory:
lines = append(lines, " "+label.Render("[Esc] Back"))
parts = append(parts, m.hotkey("Esc", "Back"))
default:
lines = append(lines, " "+m.detailKeys())
parts = append(parts, m.hotkey("e", "Edit"), m.hotkey("h", "History"), m.hotkey("s", "SLA"), m.hotkey("Esc", "Back"))
}
content := strings.Join(lines, "\n")
content := " " + strings.Join(parts, dot)
return lipgloss.NewStyle().Width(width).MaxWidth(width).Render(content)
}