We have tried to keep updating preferences fully encapsulated inside of Compass. However, recent features and projects from the Atlas side have made it more apparent that we need a standard way of updating Compass' preferences while on the web.
Currently we only set preferences once, initially, when the CompassWeb component is loaded. See the prop here:
In the recent growth indexes project, we need to pass two booleans which come from mms. We don't want to wait for these preferences to load from the Atlas side and prevent Compass web from rendering, so we want to start them as false and then update them once we load them. See pr https://github.com/mongodb-js/compass/pull/6901
Ideally, and keeping in the pattern of how we've been doing things, we would fetch these preferences from Compass itself and then update them from inside Compass. However, then we start to duplicate a lot of the logic in mms' client code base and have to possibly maintain two clientside methods of fetching these preferences.
The outcome of this ticket is a standard way for updating Compass' preferences from mms, or a standard way of fetching them from Compass so that we don't need to pass them from mms, (and documenting it).
This includes a bit of investigation as we need to decide which is the best way forward in how we handle things like growth experiment booleans in Compass.
See https://github.com/mongodb-js/compass/pull/6901 from the tech design https://docs.google.com/document/d/1wf5x58vRqfTr_5xmhgM1j01VlIkvjnvQRiiyIo57L6Q/edit?tab=t.0#heading=h.my8l8kwcujpo for more context on a place that would use something like this.