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
+2 -2
View File
@@ -85,7 +85,7 @@ func renderLogLine(line string) string {
func (m Model) viewLogsTab() string {
content := m.logViewport.View()
if strings.TrimSpace(content) == "" || content == "Waiting for logs..." {
return "\n No log entries yet. Logs appear as monitors run checks."
return m.emptyState("No log entries yet.", "Logs appear as monitors run checks")
}
lines := strings.Split(content, "\n")
@@ -112,7 +112,7 @@ func (m Model) viewLogsTab() string {
}
header := subtleStyle.Render(fmt.Sprintf(
" %d entries [↑/↓] Scroll [PgUp/PgDn] Page [f] Filter: %s", shown, filterLabel))
" %d entries Filter: %s", shown, filterLabel))
if m.logFilterImportant && shown < total {
header += subtleStyle.Render(fmt.Sprintf(" (%d hidden)", total-shown))