diff --git a/Sources/UI/ContentView.swift b/Sources/UI/ContentView.swift index 24420af..5e76b6f 100644 --- a/Sources/UI/ContentView.swift +++ b/Sources/UI/ContentView.swift @@ -87,9 +87,25 @@ public struct ContentView: View { } Section("Intelligence") { - Label("Alerts & Notifications", systemImage: "bell.badge") - .tag("Alerts") - .badge(store.alertEngine.activeAlerts.isEmpty ? nil : Text("\(store.alertEngine.activeAlerts.count)")) + // Custom row instead of .badge() — a badge applied after .tag + // detaches the tag from the list row and makes it unselectable. + Label { + HStack { + Text("Alerts & Notifications") + Spacer() + if !store.alertEngine.activeAlerts.isEmpty { + Text("\(store.alertEngine.activeAlerts.count)") + .font(.caption2.weight(.semibold)) + .padding(.horizontal, 6) + .padding(.vertical, 2) + .background(Color.red.opacity(0.85), in: Capsule()) + .foregroundStyle(.white) + } + } + } icon: { + Image(systemName: "bell.badge") + } + .tag("Alerts") } } .listStyle(.sidebar)