mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-16 19:49:56 +00:00
SwitchProfile now publishes the same profile-list-changed event that AddProfile/RemoveProfile already emit. The daemon emits no dedicated profile RPC event, and the React ProfileContext only refreshes on EventProfileChanged (unlike the tray, which also re-fetches on every status-string transition via loadProfiles). So a CLI-driven "netbird down; profile select X; netbird up" refreshed the tray (the down/up status flips trigger loadProfiles) but left the React profile dropdown stale, since the select path never surfaced an event. Publishing the marked INFO/SYSTEM event from SwitchProfile closes that gap: dispatchSystemEvent re-emits EventProfileChanged, which ProfileContext.refresh already subscribes to. No proto change.