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.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
fix inspect width and remove logs
ali-inkcoaf82f162bad1
diff --git a/packages/app/views/pages/builder.ejs b/packages/app/views/pages/builder.ejsindex 37658604..1dba33ec 100644--- a/packages/app/views/pages/builder.ejs+++ b/packages/app/views/pages/builder.ejs@@ -319,6 +319,7 @@ include('partials/studio/feedback-modal') -%>/*** @function updateBottomControlsLayout* @description Adjusts the width and position of the bottom controls container.+ * The container is positioned to have equal spacing from both the left sidebar and right sidebar.* @param {number} workspaceWidth - The current width of the workspace.* @param {number} rightSidebarWidth - The current width of the right sidebar.* @param {number} leftSidebarWidth - The current width of the left sidebar.@@ -332,18 +333,22 @@ include('partials/studio/feedback-modal') -%>isRightSidebarOpen,isLeftSidebarOpen,) => {- const bottomContainerWidth =- workspaceWidth -- (isRightSidebarOpen ? rightSidebarWidth : 0) -- (isLeftSidebarOpen ? leftSidebarWidth : 0) -- (isLeftSidebarOpen ? GAP_WIDTH : 0);+ // Use viewport width to calculate the full available space+ const viewportWidth = window.innerWidth;++ // Calculate the left edge position: navigation bar + left sidebar (if open) + gap (if left sidebar open)+ const leftPosition = SIDEBAR_NAVIGATION_WIDTH + (isLeftSidebarOpen ? leftSidebarWidth + GAP_WIDTH : 0);++ // Calculate the right edge position: viewport width minus right sidebar (if open) and its right offset+ // The right sidebar container is positioned with right-4 (16px from right edge)+ const RIGHT_SIDEBAR_OFFSET = 16; // right-4 class = 1rem = 16px+ const rightEdge = viewportWidth - (isRightSidebarOpen ? rightSidebarWidth + RIGHT_SIDEBAR_OFFSET : 0);++ // Calculate the container width: space between left position and right edge+ const bottomContainerWidth = rightEdge - leftPosition;bottomControls.style.setProperty('width', `${bottomContainerWidth}px`, 'important');- bottomControls.style.setProperty(- 'left',- `${SIDEBAR_NAVIGATION_WIDTH + (isLeftSidebarOpen ? leftSidebarWidth + GAP_WIDTH : 0)}px`,- 'important',- );+ bottomControls.style.setProperty('left', `${leftPosition}px`, 'important');bottomControls.style.setProperty('display',bottomContainerWidth < MIN_CANVAS_WIDTH ? 'none' : 'flex',@@ -418,6 +423,12 @@ include('partials/studio/feedback-modal') -%>// Calls updateLayout once on load to set the initial layout.updateLayout();+ // --- Window Resize Listener ---+ // Ensures layout updates when viewport width changes, since ResizeObserver may not catch all viewport changes+ window.addEventListener('resize', () => {+ updateLayout();+ });+// Add cleanup on page unloadwindow.addEventListener('beforeunload', () => {layoutObserver?.disconnect();diff --git a/packages/app/views/pages/partials/studio/left-sidebar.ejs b/packages/app/views/pages/partials/studio/left-sidebar.ejsindex 6c9fb763..bdd0b58a 100644--- a/packages/app/views/pages/partials/studio/left-sidebar.ejs+++ b/packages/app/views/pages/partials/studio/left-sidebar.ejs@@ -475,7 +475,7 @@<divx-show="isSidebarOpen"id="left-sidebar-container"- class="inset-y-0 -top-5 md:top-4 md:bottom-4 left-[6px] md:left-[80px] p-3 px-0 flex-shrink-0 rounded-lg w-[100vw] md:w-[calc(100%-4rem)] absolute"+ class="inset-y-0 -top-5 md:top-4 md:bottom-4 left-[6px] md:left-[80px] p-3 px-0 flex-shrink-0 rounded-lg absolute"><divaria-label="Main"@@ -665,18 +665,15 @@// === SINGLE SOURCE OF TRUTH: Apply width to DOM ===const applyWidth = (width) => {- console.log('[applyWidth] Applying width:', width);this.$nextTick(() => {const leftSidebar = document.querySelector('#left-sidebar');const contentContainer = document.querySelector('#left-sidebar-content-sections');if (leftSidebar && width) {leftSidebar.style.setProperty('width', width, 'important');- console.log('[applyWidth] Set #left-sidebar width to:', width);}if (contentContainer && width) {contentContainer.style.width = width;- console.log('[applyWidth] Set content container width to:', width);}});};@@ -752,10 +749,8 @@// Watch for tab changes when sidebar is already openthis.$watch('currentSidebarTab', (newTab, oldTab) => {- console.log('[currentSidebarTab watcher] Changed from', oldTab, 'to', newTab);// Apply width when switching tabs (sidebar stays open)if (this.isSidebarOpen && this.sidebarWidth) {- console.log('[currentSidebarTab watcher] Reapplying width on tab change');applyWidth(this.sidebarWidth);}});