#15942: fix: Guard notifications on macOS with MainActor.run
stale
size: S
Cluster:
macOS Notification and Menu Fixes
## 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
#9926: fix(macos): guard UNUserNotificationCenter when no bundle identifier
by webcpu · 2026-02-05
65.3%
#15909: Guard notifications on macOS; fix focus issue and build fixes
by jasonkneen · 2026-02-14
62.7%
#19828: feat: reply notifications for macOS and web UI
by fal3 · 2026-02-18
62.3%
#14666: fix(macos): align minimum Node.js version with runtime guard (22.12.0)
by sumleo · 2026-02-12
59.4%
#5656: fix(macos): prevent crash on launch when no microphone available
by sfo2001 · 2026-01-31
58.9%
#17386: fix: Site shows MacOS 14+ but only works on 15+
by MisterGuy420 · 2026-02-15
57.7%
#3424: Use structured concurrency instead of Task.detached in GatewayDisco...
by abhijeet117 · 2026-01-28
57.6%
#18235: macOS: prevent Voice Wake crash when no input device is available
by agisilaos · 2026-02-16
56.6%
#23636: iOS: normalize watch quick actions and fix test signing
by mbelinky · 2026-02-22
55.9%
#18112: fix(daemon): gateway install on macOS ignores fnm/nvm node (#18090)
by yinghaosang · 2026-02-16
55.2%