Merge pull request #577 from EdouardVanbelle/feat/users-perfs-and-filter-dotfiles

feat: users prefs server side + filter dotfiles + filter shares by resource type
This commit is contained in:
Dionisio Pozo
2026-07-14 09:07:09 +02:00
committed by GitHub
43 changed files with 1873 additions and 94 deletions
+10
View File
@@ -12,6 +12,16 @@ export interface ProfilePatch {
family_name?: string;
preferred_locale?: string;
notify_on_share?: boolean;
/**
* Partial patch into the opaque UI preferences bag. Server does a
* SHALLOW merge — keys present here overwrite existing top-level
* keys; absent keys survive. Set a key to `null` to remove it
* (server runs `jsonb_strip_nulls` after the merge).
*
* Wire-side type is `Record<string, unknown>`; the typed view over
* this bag lives in `lib/stores/preferences.svelte.ts`.
*/
ui_preferences?: Record<string, unknown>;
}
export async function updateProfile(patch: ProfilePatch): Promise<User> {
+16
View File
@@ -172,6 +172,22 @@ export interface User {
email_verified_at?: string;
preferred_locale?: string;
notify_on_share: boolean;
/**
* Opaque UI preferences bag. Server-side JSONB column that persists
* pure UI toggles (hide-dotfiles, view mode, sidebar collapse, …)
* across devices. The server never inspects the contents — the SPA
* defines the keys (see `lib/stores/preferences.svelte.ts` for the
* typed view). Always an object on the wire (empty bag is `{}`,
* never `null` or missing).
*
* When PATCHing back to the server via
* `PATCH /api/auth/me/profile { ui_preferences: {...} }`, the
* server SHALLOW-merges — only the keys present in the patch are
* touched, so partial writes from one device don't clobber
* preferences set on another. Set a key to `null` in the patch to
* delete it from the bag.
*/
ui_preferences: Record<string, unknown>;
}
export interface AuthResponse {