setState needs to handle a dict with a blank 'value' field as an empty state, as that's what get_value_data returns for use in the telepath adapter, and what getState (used for block duplication) returns.
Without this, a newly-added block shows the buttons from the 'chosen' state:
setState needs to handle a dict with a blank 'value' field as an empty state, as that's what get_value_data returns for use in the telepath adapter, and what getState (used for block duplication) returns.
Without this, a newly-added block shows the buttons from the 'chosen' state: