From 6587019d263374ee5707d258f5d8eec7e73c690d Mon Sep 17 00:00:00 2001 From: Guilhem Date: Mon, 6 Jul 2026 20:43:04 +0200 Subject: [PATCH] fix: critical alerts modal mute toggles no longer close popover or fail to save (#9969) * fix: mute toggles in critical alerts modal no longer close popover or fail to save Co-Authored-By: Claude Opus 4.8 (1M context) * fix: mark popover content root as dropdown-portal so padding clicks don't close modal Co-Authored-By: Claude Opus 4.8 (1M context) * fix: derive no-channels warning from mute state so it survives modal reopen Co-Authored-By: Claude Opus 4.8 (1M context) --------- Co-authored-by: Claude Opus 4.8 (1M context) --- .../sidebar/CriticalAlertModal.svelte | 62 +++++++++---------- .../sidebar/CriticalAlertModalInner.svelte | 14 ++++- 2 files changed, 40 insertions(+), 36 deletions(-) diff --git a/frontend/src/lib/components/sidebar/CriticalAlertModal.svelte b/frontend/src/lib/components/sidebar/CriticalAlertModal.svelte index f8418b048a..4a41c65a31 100644 --- a/frontend/src/lib/components/sidebar/CriticalAlertModal.svelte +++ b/frontend/src/lib/components/sidebar/CriticalAlertModal.svelte @@ -1,6 +1,4 @@ @@ -197,10 +186,14 @@ {#snippet headerRight()} {#if $superadmin || $userStore?.is_admin} + {#snippet trigger()}
@@ -246,8 +239,8 @@ {#if $superadmin} {#snippet trigger()}
@@ -304,6 +297,7 @@ 0 } + // Load the channel state on mount so the "no channels" warning doesn't depend on + // there being unacknowledged alerts to trigger a refresh (muting auto-acks them). + onMount(() => { + if ($superadmin) checkCriticalAlertChannels() + }) + async function acknowledgeAlert(id: number) { await acknowledgeCriticalAlert({ id }) getAlerts(false) @@ -133,7 +143,7 @@ - {#if !hasCriticalAlertChannels && $superadmin} + {#if $superadmin && isMuted && !hasCriticalAlertChannels}
Go to the