refactor(tui): consistent chrome across all views
CI / test (pull_request) Successful in 2m42s
CI / lint (pull_request) Successful in 56s
CI / vulncheck (pull_request) Successful in 41s

- Extract divider() and emptyState() helpers to format.go
- All empty states now use bordered box with accent color
- Detail and alert detail panels get header/section dividers
- SLA label width 14→16 to match detail/alert panels
- Logs key hints moved from content to dashboard footer
- History/SLA panels use shared divider helper
This commit is contained in:
2026-06-04 15:08:29 -04:00
parent 60592ef810
commit bcb2678a20
11 changed files with 60 additions and 48 deletions
+5 -3
View File
@@ -30,7 +30,8 @@ func (m Model) viewDetailPanel() string {
if breadcrumb == "" {
breadcrumb = subtleStyle.Render(" Sites > ") + titleStyle.Render(site.Name)
}
b.WriteString(breadcrumb + "\n\n")
b.WriteString(breadcrumb + "\n")
b.WriteString(m.divider() + "\n")
row := func(label, value string) {
fmt.Fprintf(&b, " %-16s %s\n", subtleStyle.Render(label), value)
@@ -200,7 +201,7 @@ func (m Model) viewDetailPanel() string {
b.WriteString(" " + subtleStyle.Render("[h] History") + "\n")
}
b.WriteString("\n")
b.WriteString(m.divider() + "\n")
const sparkWidth = 40
if site.Type == "push" {
b.WriteString(" " + heartbeatSparkline(hist.Statuses, sparkWidth))
@@ -242,7 +243,8 @@ func (m Model) viewDetailPanel() string {
}
}
b.WriteString("\n\n")
b.WriteString("\n")
b.WriteString(m.divider() + "\n")
b.WriteString(subtleStyle.Render(" [i/Esc] Back [e] Edit [h] History [s] SLA [q] Quit"))
return lipgloss.NewStyle().Padding(1, 2).Render(b.String())