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
update right sidebars to use same width
ali-inkco595f849e9656
diff --git a/packages/app/src/builder-ui/constants.ts b/packages/app/src/builder-ui/constants.tsindex 69536589..cecfa899 100644--- a/packages/app/src/builder-ui/constants.ts+++ b/packages/app/src/builder-ui/constants.ts@@ -2,6 +2,8 @@export const BINARY_INPUT_TYPES = ['Image', 'Audio', 'Video', 'Binary'];+export const DEFAULT_RIGHT_SIDEBAR_WIDTH = '520px';+export const JSON_FIELD_CLASS = '_smythos_json_field';export enum LLM_PROVIDERS {diff --git a/packages/app/src/builder-ui/pages/builder/components-menu.ts b/packages/app/src/builder-ui/pages/builder/components-menu.tsindex 80107702..a5e87337 100644--- a/packages/app/src/builder-ui/pages/builder/components-menu.ts+++ b/packages/app/src/builder-ui/pages/builder/components-menu.ts@@ -984,13 +984,58 @@ function setupBuilderMenuDragDrop() {event.target.classList.add('pointer-events-none');}).on('resizemove', function (event) {- event.target.style.width = event.rect.width + 'px';+ const newWidth = event.rect.width + 'px';+ event.target.style.width = newWidth;++ // Apply the same width to all right sidebars in real-time+ const allRightSidebars = [+ document.querySelector('#right-sidebar'),+ document.querySelector('#embodiment-sidebar'),+ document.querySelector('#agent-settings-sidebar'),+ ];++ allRightSidebars.forEach((sidebar) => {+ if (sidebar && sidebar !== event.target) {+ (sidebar as HTMLElement).style.width = newWidth;+ }+ });++ // Dispatch resize event for Alpine.js to react to real-time changes+ window.dispatchEvent(+ new CustomEvent('rightSidebarResized', {+ detail: { width: newWidth },+ }),+ );}).on('resizeend', function (event) {document.body.classList.remove('select-none');event.target.classList.remove('no-transition');event.target.classList.remove('pointer-events-none');- localStorage.setItem(`${event.target.id}-width`, event.target.style.width);++ const finalWidth = event.target.style.width;++ // Save to common width key for all right sidebars+ localStorage.setItem('right-sidebar-common-width', finalWidth);++ // Apply the final width to all right sidebars+ const allRightSidebars = [+ document.querySelector('#right-sidebar'),+ document.querySelector('#embodiment-sidebar'),+ document.querySelector('#agent-settings-sidebar'),+ ];++ allRightSidebars.forEach((sidebar) => {+ if (sidebar) {+ (sidebar as HTMLElement).style.width = finalWidth;+ }+ });++ // Dispatch final resize event+ window.dispatchEvent(+ new CustomEvent('rightSidebarResized', {+ detail: { width: finalWidth },+ }),+ );});// temporary debug console height: move to a better placediff --git a/packages/app/views/pages/partials/studio/right-sidebar-agent-settings.ejs b/packages/app/views/pages/partials/studio/right-sidebar-agent-settings.ejsindex 6856e1c8..d3493c50 100644--- a/packages/app/views/pages/partials/studio/right-sidebar-agent-settings.ejs+++ b/packages/app/views/pages/partials/studio/right-sidebar-agent-settings.ejs@@ -46,12 +46,19 @@this.checkWidth();}});+ // Listen for resize events to update width in real-time+ window.addEventListener('rightSidebarResized', (event) => {+ this.width = event.detail.width;+ });},checkWidth() {- let storedWidth = localStorage.getItem('agent-settings-sidebar-width') || '420px';+ const DEFAULT_WIDTH = '520px';+ let storedWidth = localStorage.getItem('right-sidebar-common-width') || DEFAULT_WIDTH;++ // Validate width doesn't exceed half screenif (parseInt(storedWidth) > window.innerWidth / 2) {- storedWidth = '420px';- localStorage.setItem('agent-settings-sidebar-width', storedWidth);+ storedWidth = DEFAULT_WIDTH;+ localStorage.setItem('right-sidebar-common-width', storedWidth);}this.width = storedWidth;},diff --git a/packages/app/views/pages/partials/studio/right-sidebar-emb.ejs b/packages/app/views/pages/partials/studio/right-sidebar-emb.ejsindex b3121de8..34ffea13 100644--- a/packages/app/views/pages/partials/studio/right-sidebar-emb.ejs+++ b/packages/app/views/pages/partials/studio/right-sidebar-emb.ejs@@ -48,12 +48,19 @@this.checkWidth();}});+ // Listen for resize events to update width in real-time+ window.addEventListener('rightSidebarResized', (event) => {+ this.width = event.detail.width;+ });},checkWidth() {- let storedWidth = localStorage.getItem('embodiment-sidebar-width') || '520px';+ const DEFAULT_WIDTH = '520px';+ let storedWidth = localStorage.getItem('right-sidebar-common-width') || DEFAULT_WIDTH;++ // Validate width doesn't exceed half screenif (parseInt(storedWidth) > window.innerWidth / 2) {- storedWidth = '520px';- localStorage.setItem('embodiment-sidebar-width', storedWidth);+ storedWidth = DEFAULT_WIDTH;+ localStorage.setItem('right-sidebar-common-width', storedWidth);}this.width = storedWidth;},diff --git a/packages/app/views/pages/partials/studio/right-sidebar.ejs b/packages/app/views/pages/partials/studio/right-sidebar.ejsindex 30bef53a..6829ca09 100644--- a/packages/app/views/pages/partials/studio/right-sidebar.ejs+++ b/packages/app/views/pages/partials/studio/right-sidebar.ejs@@ -68,12 +68,19 @@this.checkWidth();}});+ // Listen for resize events to update width in real-time+ window.addEventListener('rightSidebarResized', (event) => {+ this.width = event.detail.width;+ });},checkWidth() {- let storedWidth = localStorage.getItem('right-sidebar-width') || '350px';+ const DEFAULT_WIDTH = '520px';+ let storedWidth = localStorage.getItem('right-sidebar-common-width') || DEFAULT_WIDTH;++ // Validate width doesn't exceed half screenif (parseInt(storedWidth) > window.innerWidth / 2) {- storedWidth = '350px';- localStorage.setItem('right-sidebar-width', storedWidth);+ storedWidth = DEFAULT_WIDTH;+ localStorage.setItem('right-sidebar-common-width', storedWidth);}this.width = storedWidth;},