mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-12 19:59:56 +00:00
Wails v3 alpha's submenu.Update() builds a fresh, detached NSMenu on darwin instead of mutating the one attached to the parent menu item at initial setup, so the visible Profiles entries stayed frozen on the empty snapshot captured when the tray was registered: clicks reached the new Go MenuItem objects (and the daemon SwitchProfile RPC ran), but the checkmark never moved and reopening the menu still showed the old selection. Cache the top-level menu and call tray.SetMenu(t.menu) after each loadProfiles refresh; macosSystemTray.setMenu clears and rebuilds the entire NSMenu tree against the cached pointer, which propagates submenu content changes to the visible menu. Also adds INFO logs around profile click / SwitchProfile RPC / list refresh so the active-profile flow is observable end-to-end.