From b7c808296592e66c0fd33fbdb81d85193a6b2bd4 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Mon, 31 Aug 2026 03:38:31 +0200 Subject: [PATCH] fix: only fall back to the admin terminal display default when unset The backend treated any value other than 'inline' or 'sidebar' as unset and fell back to the admin default, while the frontend (src/routes/+layout.svelte) does a plain equality check against 'inline'. Nothing validates UserSettings.ui, so a stored value like 'Inline' or true rendered inline on the backend-managed tool path and sidebar in the browser for the same user. Falling back only on None matches the frontend for every storable value and keeps the fallback for the absent key, which strip_default_interface_settings creates whenever the user's value equals the admin default. --- backend/open_webui/utils/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/utils/middleware.py b/backend/open_webui/utils/middleware.py index 183cf2cfd4..28542de721 100644 --- a/backend/open_webui/utils/middleware.py +++ b/backend/open_webui/utils/middleware.py @@ -303,7 +303,7 @@ async def is_terminal_file_display_inline(user: UserModel) -> bool: ui_settings = user.settings.ui if isinstance(user.settings, UserSettings) else None value = (ui_settings or {}).get('terminalFileDisplay') - if value not in ('inline', 'sidebar'): + if value is None: default_interface_settings = await Config.get('ui.default_interface_settings') if isinstance(default_interface_settings, dict): value = default_interface_settings.get('terminalFileDisplay')