User Preferences
Theme, accent and density follow you to every browser: they are saved on the server with your profile. The browser keeps a local copy so the page opens in the right theme without a flash, but at login the server values win.
What Is Saved Where
Each change you make in Tweaks (or with the theme toggle in the top bar and the command palette) is applied immediately and also saved on the server with PATCH /api/v1/auth/profile/, sending only the changed key. If the save fails the change stays in this browser and no error is shown.
- Saved on the server: theme (light, dark or system), accent (default, teal, amber, crimson, mono) and density (compact, default, comfy)
- Saved on the server by the Cruscotto page: cruscotto_layout, the order and visibility of its tiles
- Only in this browser: dashboard style and the expanded or collapsed sidebar
- Read-only: avatar_url, set from the identity provider when you sign in with single sign-on
At Login the Server Wins
The browser keeps the last values in local storage (iai:prefs), which the page reads before it is painted. When your profile is loaded, at login or when the app opens, the theme, accent and density saved on the server replace the local ones and are written to iai:prefs. A server theme of system follows the color scheme of the operating system. Missing or unknown values leave the local value unchanged. This happens once per user each time the app is loaded: the periodic refresh of the profile does not override a change you just made.
Validation
The preferences field of the profile accepts only the known keys, each with a checked type and value. A request that breaks a rule is rejected with 400 and changes nothing.
- Unknown keys are rejected with an error that names them; a value that is not an object (list, string, null) is rejected
- theme, accent and density must be one of the listed values; null or another type is rejected
- cruscotto_layout must be {"tiles": [{"key", "visible"}]} with every tile key exactly once and visible a boolean
- avatar_url is ignored when sent: the stored value is kept
- Writes are merged with PATCH and PUT alike: the keys you send replace only themselves, the other saved preferences stay. Keys left over from older versions are dropped at the first write and are never returned