diff --git a/web/src/pages/ConfigEditor.tsx b/web/src/pages/ConfigEditor.tsx
index 01d76303d..8d828cee2 100644
--- a/web/src/pages/ConfigEditor.tsx
+++ b/web/src/pages/ConfigEditor.tsx
@@ -209,13 +209,24 @@ function ConfigEditor() {
};
}, [hasChanges, t]);
+ useEffect(() => {
+ if (editorRef.current) {
+ // Small delay to ensure DOM has updated
+ const timeoutId = setTimeout(() => {
+ editorRef.current?.layout();
+ }, 0);
+
+ return () => clearTimeout(timeoutId);
+ }
+ }, [error]);
+
if (!config) {
return