diff --git a/packages/ui/src/components/sections/openchamber/NotificationSettings.tsx b/packages/ui/src/components/sections/openchamber/NotificationSettings.tsx index ee5fad69..0411fdbf 100644 --- a/packages/ui/src/components/sections/openchamber/NotificationSettings.tsx +++ b/packages/ui/src/components/sections/openchamber/NotificationSettings.tsx @@ -385,6 +385,31 @@ export const NotificationSettings: React.FC = () => { }; }; + const handleTestNotification = async () => { + const apis = getRegisteredRuntimeAPIs(); + if (!apis?.notifications) { + toast.error('Notifications API not available'); + return; + } + + try { + const success = await apis.notifications.notifyAgentCompletion({ + title: 'Test Notification', + body: 'This is a test notification from OpenChamber.', + tag: 'openchamber-test', + }); + + if (success) { + toast.success('Test notification sent successfully'); + } else { + toast.error('Failed to send test notification'); + } + } catch (error) { + console.error('Test notification failed:', error); + toast.error('Failed to send test notification'); + } + }; + const handleEnableBackgroundNotifications = async () => { if (!pushSupported) { toast.error('Push notifications not supported'); @@ -547,26 +572,39 @@ export const NotificationSettings: React.FC = () => { {nativeNotificationsEnabled && canShowNotifications && ( -