This describes the mechanism used to sync preferences across devices/surfaces.
It it currently leveraged by the builder to sync the list of search libraries across devices (if you defined your search libraries on remix-dev, you will get the same list on the desktop, etc…)
"name": "john", "address.mailing.city": "san francisco"{
"name": "john",
"address.mailing.city": "san francisco",
}
the prefs for a user are assembled as a combination of 3 prefs (assembled in this exact order):
system prefs (defined as constants at compile time). This simply has a the default remix_labs catalog.
{
"builder.search.libs": "# the main remix library\\nhttps://agt.remixlabs.com/ws/remix_labs",
"builder.plugins.show_system_plugins": true
}
default prefs (defined as a record for the workspace). An administrator can change this (dynamically).
user prefs (define as a record for a given user). A user can change his own prefs (dynamically)
Each pref takes precedences over the previous value. This means that if the default prefs redefine a value defined in the system prefs, the value from the default prefs is returned. And the same goes for the user prefs.
The builder leverages synced prefs by using 2 fields:
builder.search.libs (string) catalog list used by L1/L2 search. It is stored as a single string, with one catalog entry per line.builder.plugins.show_system_plugins (boolean): if true, the system plugins are shown in the builder (L0/L1/L2)builder.remote_sources:list of {host, ws, db, name} shown as remote sources in the builder (the name is optional).If you want to change the default catalogs for all users in the org, simply set builder.search.libs in the default prefs (with the agent set_default_prefs). Each user will get these by default instead of the system one. And a given user might also want to override this and define its own builder.search.libs.
Interacting with the prefs is done via agents of the _rmx_prefs app, deployed in the main workspace of a user (the workpace of the user org)