Skip to content

fix: Fix settings sync between multiple browsers

Issue: Settings sync bug when synchronizing between di... (#320)

What does this MR do?

Before the Web IDE starts, it removes all the Settings Sync data from the Web Browser's local storage. This ensures that the Single Sort of Truth for all the user's installed extensions and preferences is the data stored in the backend using the Settings Sync REST API. This change fixes a bug that happens because the Settings Sync REST API can only store a single snapshot of a given setting type. Under these circumstances, when a web browser contains local storage data that hasn't been synced with the server, VSCode will prioritize the local data over the data coming from the backend.

Demo

syncing_between_web_browsers_1080p.mov

How to reproduce in your local environment

  1. Open the Web IDE example app in Chrome and in Firefox but don't start the Web IDE.
  2. Start the Web IDE in Chrome, and install an extension or change a setting.
  3. In firefox, start the Web IDE. You will see that your changes in Chrome are reflected in Firefox.
  4. Reload the Chrome window.
  5. In Firefox, install another extension or change a setting.
  6. Start the Web IDE in chrome again. The changes in Firefox should be reflected in Chrome.
Edited by Enrique Alcántara

Merge request reports