MessageDispatcherSync gains an optional on_connect_changed(bool) callback, fired from the websocket client's background loop once the connection is actually live/lost, so the button only flips state on a real connection change rather than optimistically on click.