Skip to content

SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.

set default width for left sidebar

ali-inkco33746e887897
diff --git a/packages/app/views/pages/partials/studio/left-sidebar.ejs b/packages/app/views/pages/partials/studio/left-sidebar.ejs
index 2bc3c71d..9b23099d 100644
--- a/packages/app/views/pages/partials/studio/left-sidebar.ejs
+++ b/packages/app/views/pages/partials/studio/left-sidebar.ejs
@@ -560,6 +560,11 @@
const urlParams = new URLSearchParams(window.location.search);
const isChatPresent = urlParams.has('chat');
+ const getLeftSidebarWidth = () => {
+ const leftSidebarWidth = localStorage.getItem('left-sidebar-width') || '400px';
+ return leftSidebarWidth;
+ };
+
Alpine.data('sidebarState', () => ({
previousTab: localStorage.getItem('previousTab') || null,
sidebarWidth: null, // Will be loaded from localStorage in init()
@@ -684,7 +689,7 @@
};
// Load saved width on init
- const savedWidth = localStorage.getItem('left-sidebar-width');
+ const savedWidth = getLeftSidebarWidth();
if (savedWidth) {
this.sidebarWidth = savedWidth;
if (this.isSidebarOpen) {
@@ -732,7 +737,7 @@
applyWidth(this.sidebarWidth);
} else {
// No custom width, check localStorage
- const savedWidth = localStorage.getItem('left-sidebar-width');
+ const savedWidth = getLeftSidebarWidth();
console.log('[isSidebarOpen watcher] Checking localStorage:', savedWidth);
if (savedWidth) {
this.sidebarWidth = savedWidth;