diff --git a/web/src/components/user/UserProvider.tsx b/web/src/components/user/UserProvider.tsx index 6b3cb5cb8ba..99520f54c75 100644 --- a/web/src/components/user/UserProvider.tsx +++ b/web/src/components/user/UserProvider.tsx @@ -67,7 +67,13 @@ export function UserProvider({ }); setUpToDateUser((prevUser) => { if (prevUser) { - return { ...prevUser, auto_scroll: autoScroll }; + return { + ...prevUser, + preferences: { + ...prevUser.preferences, + auto_scroll: autoScroll, + }, + }; } return prevUser; }); diff --git a/web/src/lib/types.ts b/web/src/lib/types.ts index e145b289899..07ee977317e 100644 --- a/web/src/lib/types.ts +++ b/web/src/lib/types.ts @@ -9,7 +9,7 @@ interface UserPreferences { hidden_assistants: number[]; default_model: string | null; recent_assistants: number[]; - auto_scroll: boolean; + auto_scroll: boolean | null; } export enum UserStatus {