Currently all controls or selectors we have in the page bar are implemented in the PagebarView and the logic used to update them are mainly in the PageEditorSubApp class. Due to this, the code used to update the pageeditor or any components related when e.g. browsing inside the iframe is a real mess. Just looking at the different location related methods in the PageEditorSubApp class reflects this a bit.
Everytime we add another component to the page bar, like we did for the variant selector in personalization it makes it even harder.