Code change:
return this.viewDescriptorService.getViewContainersByLocation(this.location); } <del> private onDidPinnedViewContainersStorageValueChange(e: IProfileStorageValueChangeEvent): void { if (this.pinnedViewContainersValue !== this.getStoredPinnedViewContainersValue() /* This checks if current window changed the value or not */) { this._placeholderViewContainersValue = undefined; this._pinnedViewContainersValue = undefined; this._cachedViewContainers = undefined; </del> <ins> private updateCompositeBarItemsFromStorage(retainExisting: boolean): void { if (this.pinnedViewContainersValue === this.getStoredPinnedViewContainersValue()) { return; } </ins> <del> const newCompositeItems: ICompositeBarItem[] = []; const compositeItems = this.compositeBar.getCompositeBarItems(); </del> <ins> this._placeholderViewContainersValue = undefined; this._pinnedViewContainersValue = undefined; this._cachedViewContainers = undefined; </ins> <del> for (const cachedViewContainer of this.cachedViewContainers) { newCompositeItems.push({ id: cachedViewContainer.id, name: cachedViewContainer.name, order: cachedViewContainer.order, pinned: cachedViewContainer.pinned, visible: cachedViewContainer.visible && !!this.getViewContainer(cachedViewContainer.id), }); } </del> <ins> const newCompositeItems: ICompositeBarItem[] = []; const compositeItems = this.compositeBar.getCompositeBarItems(); </ins> <del> for (const viewContainer of this.getViewContainers()) { // Add missing view containers if (!newCompositeItems.some(({ id }) => id === viewContainer.id)) { const index = compositeItems.findIndex(({ id }) => id === viewContainer.id); if (index !== -1) { const compositeItem = compositeItems[index]; newCompositeItems.splice(index, 0, { id: viewContainer.id, name: typeof viewContainer.title === 'string' ? viewContainer.title : viewContainer.title.value, order: compositeItem.order, pinned: compositeItem.pinned, visible: compositeItem.visible, }); } else { newCompositeItems.push({ id: viewContainer.id, name: typeof viewContainer.title === 'string' ? viewContainer.title : viewContainer.title.value, order: viewContainer.order, pinned: true, visible: !this.shouldBeHidden(viewContainer), }); } </del> <ins> for (const cachedViewContainer of this.cachedViewContainers) { newCompositeItems.push({ id: cachedViewContainer.id, name: cachedViewContainer.name, order: cachedViewContainer.order, pinned: cachedViewContainer.pinned, visible: cachedViewContainer.visible && !!this.getViewContainer(cachedViewContainer.id), }); } for (const viewContainer of this.getViewContainers()) { // Add missing view containers if (!newCompositeItems.some(({ id }) => id === viewContainer.id)) { const index = compositeItems.findIndex(({ id }) => id === viewContainer.id); if (index !== -1) { const compositeItem = compositeItems[index]; newCompositeItems.splice(index, 0, { id: viewContainer.id, name: typeof viewContainer.title === 'string' ? viewContainer.title : viewContainer.title.value, order: compositeItem.order, pinned: compositeItem.pinned, visible: compositeItem.visible, }); } else { newCompositeItems.push({ id: viewContainer.id, name: typeof viewContainer.title === 'string' ? viewContainer.title : viewContainer.title.value, order: viewContainer.order, pinned: true, visible: !this.shouldBeHidden(viewContainer), }); </ins> } } <ins> } </ins> <del> this.compositeBar.setCompositeBarItems(newCompositeItems); </del> <ins> if (retainExisting) { for (const compositeItem of compositeItems) { const newCompositeItem = newCompositeItems.find(({ id }) => id === compositeItem.id); if (!newCompositeItem) { newCompositeItems.push(compositeItem); } } </ins> } <ins> this.compositeBar.setCompositeBarItems(newCompositeItems); </ins> } private saveCachedViewContainers(): void {

Related discussion:
text: have insiders with settings sync enabled add exploration build to the sync select replace local when prompted so that exploration because just like insiders over time insiders UI state gets ruined, e.g the side bar is populated with views I have carefully hidden and rearranged
This is caused due to the dependency between two states and . Values of both states changed together from outside Change event for first state is triggered. Updating to this change can cause view container changes like (registering or deregistering) This triggers internal change events to update pinned viewlets Updating pinned viewlets is updating the stored value for second state Bug is caused at the last step -pinned viewlets state is getting overriden without refreshing its in-memory state.
How would this be verified?
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
Since it cannot be reproduced easily, I would ask to verify this.
the steps are as easy as described in or the description of this issue. use settings sync onboard another machine :bug: view state of the main machine get's broken: views reappear, views are reordered etcpp
Can you please verify this? I believe this depends on some pre-existing state therefore not everyone can reproduce. This state is not trivial to set up. Since you have this state already, it might be easier for you to verify.