mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #23259] [CLOSED] fix: use sessionStorage for showControls to prevent cross-tab state leakage #27108
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23259
Author: @karthik-idikuda
Created: 3/31/2026
Status: ❌ Closed
Base:
main← Head:fix/cross-tab-showcontrols-state-leak📝 Commits (1)
49532b8fix: use sessionStorage for showControls to prevent cross-tab state leakage📊 Changes
1 file changed (+5 additions, -2 deletions)
View changed files
📝
src/routes/(app)/+layout.svelte(+5 -2)📄 Description
Problem
Opening an Artifacts preview in one browser tab automatically expands the Advanced Settings/Controls panel on the Home page in another tab, without user action.
Root Cause
In
src/routes/(app)/+layout.svelte, theshowControlsstore state is persisted vialocalStorage:Since
localStorageis shared across all tabs of the same origin:showControls.set(true)-> subscription writeslocalStorage.showControls = 'true'onMountreadslocalStorage.showControls === 'true'-> controls panel auto-expandsFix
Switch from
localStoragetosessionStoragefor persistingshowControls.sessionStorageis isolated per browser tab/session, so each tab maintains its own independent controls panel state. This preserves the within-tab persistence (controls stay open across SPA navigation within the same tab) while eliminating cross-tab leakage.Note:
chatControlsSize(the panel width) intentionally remains inlocalStorageso the user's preferred panel width is preserved globally.Fixes #23232
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.