feat(admin): operator-wide notification health panel

Surface the webhook + email cards on the notifications settings page, and
add an operator-wide delivery-health view the per-self diagnostic could
not give. A single groupBy(channel, result) over the trailing 24h of
push_attempts lets the operator answer "are anyone's pushes failing?"
across all users without DB shell, and a count of auto-disabled channels
(enabled=false with an automated disabledReason) flags a flapping upstream
that silently disabled a channel after five failures. The aggregate is
anonymous — it counts channel x result, never names a user. Admin-only by
construction (cookie auth, never Bearer); the window is clamped 1..168h.
The panel rides the existing admin Reminders section.
This commit is contained in:
Marc-André Bombeck committed 2026-06-15 00:46:21 +02:00
1 parent 909c2aa99e
commit 17dd10c3b9
5 files changed
+380 -3

No files matched your search

+3
View File
@@ -63,6 +63,9 @@ export const adminKeys = {
adminSettings: () => ["admin", "settings"] as const,
adminStatus: () => ["admin", "status"] as const,
/** v1.17.1 — operator-wide notification delivery-health panel. */
adminNotificationHealth: (hours: number) =>
["admin", "notification-health", hours] as const,
adminUsers: () => ["admin", "users"] as const,
adminTokens: () => ["admin", "tokens"] as const,
adminAuditLog: (filter: unknown) => ["admin", "audit-log", filter] as const,