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
+4 -7
View File
@@ -153,16 +153,13 @@ func (m Model) viewHistoryPanel() string {
header += " " + subtleStyle.Render("[q] Back")
b.WriteString(header + "\n")
divWidth := m.termWidth - chromePadH - 4
if divWidth < 40 {
divWidth = 40
}
b.WriteString(" " + subtleStyle.Render(strings.Repeat("─", divWidth)) + "\n")
divWidth := m.dividerWidth()
b.WriteString(m.divider() + "\n")
sparkline := stateChangeSparkline(m.historyChanges, divWidth)
if sparkline != "" {
b.WriteString(" " + sparkline + "\n")
b.WriteString(" " + subtleStyle.Render(strings.Repeat("─", divWidth)) + "\n")
b.WriteString(m.divider() + "\n")
}
fmt.Fprintf(&b, " %-18s %-17s %-12s %s\n",
@@ -177,7 +174,7 @@ func (m Model) viewHistoryPanel() string {
b.WriteString(m.historyViewport.View())
}
b.WriteString("\n " + subtleStyle.Render(strings.Repeat("─", divWidth)) + "\n")
b.WriteString("\n" + m.divider() + "\n")
stats := computeHistoryStats(m.historyChanges)
parts := []string{fmt.Sprintf("%d events", stats.totalEvents)}