fix: notifications orchestrator and add a notification when first enabled

This commit is contained in:
simosmik
2026-03-03 16:28:12 +00:00
parent d032a37c01
commit 6be7045f17
3 changed files with 35 additions and 1 deletions

View File

@@ -96,6 +96,7 @@ function Settings({ isOpen, onClose, projects = [], initialTab = 'agents' }: Set
const handleEnablePush = async () => {
await pushSubscribe();
// Server sets webPush: true in preferences on subscribe; sync local state
setNotificationPreferences({
...notificationPreferences,
channels: { ...notificationPreferences.channels, webPush: true },
@@ -104,6 +105,7 @@ function Settings({ isOpen, onClose, projects = [], initialTab = 'agents' }: Set
const handleDisablePush = async () => {
await pushUnsubscribe();
// Server sets webPush: false in preferences on unsubscribe; sync local state
setNotificationPreferences({
...notificationPreferences,
channels: { ...notificationPreferences.channels, webPush: false },