From 28fb6c8889920eb770e31340a73484e67b53aecb Mon Sep 17 00:00:00 2001 From: Tyler Koenig Date: Sun, 21 Jun 2026 19:10:18 -0400 Subject: [PATCH] feat(tui): alert failure badge on Settings tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Settings tab warn count now includes failed alert channels — alerts where the last send failed (LastSendOK=false, LastSendAt not zero). Shows as a red badge number alongside offline node count. Surfaces broken alert channels without navigating to Settings. --- internal/tui/view_dashboard.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/tui/view_dashboard.go b/internal/tui/view_dashboard.go index 197c1be..c54ece7 100644 --- a/internal/tui/view_dashboard.go +++ b/internal/tui/view_dashboard.go @@ -233,6 +233,12 @@ type tabEntry struct { func (m Model) renderTabBar(stats dashboardStats) string { settingsCount := len(m.alerts) + len(m.nodes) settingsWarn := stats.offlineNodes + for _, a := range m.alerts { + h := m.engine.GetAlertHealth(a.ID) + if !h.LastSendOK && !h.LastSendAt.IsZero() { + settingsWarn++ + } + } if m.isAdmin { settingsCount += len(m.users) }