mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-16 19:49:56 +00:00
The daemon emits no dedicated profile-changed RPC event, and a profile add/remove doesn't move the connection status, so the UI's SubscribeStatus path never fired for CLI-driven `netbird profile add|remove` (and the tray's iconChanged guard would swallow it anyway). The tray menu and the React profile list stayed stale until the next status-string transition. AddProfile/RemoveProfile now publish a marked INFO/SYSTEM event over SubscribeEvents (metadata kind=profile-list-changed, empty userMessage so it stays silent). The UI's dispatchSystemEvent recognises the marker and re-emits the existing EventProfileChanged, which the tray's loadProfiles and React's ProfileContext.refresh already subscribe to — so both surfaces refresh from a single signal that originates in the shared daemon handler (covering both CLI and UI-initiated removals). No proto change. Also drop a stray, build-breaking `app.Updater` line in main.go.