← Back to PRs

#15942: fix: Guard notifications on macOS with MainActor.run

by MisterGuy420 open 2026-02-14 02:55 View on GitHub →
stale size: S
## Summary Wrap NotificationManager and NotifyOverlayController calls in MainActor.run to fix Swift 6 strict concurrency build errors. These @MainActor types were being accessed from non-MainActor contexts (MacNodeRuntime actor), causing compilation failures when building the macOS app. ## Changes - **MacNodeRuntime.swift**: Wrapped all NotificationManager().send() and NotifyOverlayController.shared.present() calls in MainActor.run { } blocks in the handleSystemNotify method - **DebugActions.swift**: Wrapped NotificationManager().send() call in MainActor.run { } block in sendTestNotification method ## Testing The fix follows the same pattern used elsewhere in the codebase (e.g., InstancesStore.swift uses Task { @MainActor in }). Swift tests cannot be run in this environment (Linux), but the changes are minimal and follow established patterns. Fixes openclaw/openclaw#15911

Most Similar PRs