From 2a0c414a1c95392e9f95605280bbaa94e777c160 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 13 Jun 2026 22:43:15 +0000 Subject: [PATCH] Fix: wrap load_modules() in try/catch so a bad module constructor never kills GUI init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this, any constructor throw in any module stops load_modules() mid-loop and render_main_gui() (which builds the menu) never runs — resulting in a blank page with no menu. The failing module is now logged to the browser console instead of silently aborting startup. https://claude.ai/code/session_01WVDg7amsy1TTtxvpku7bcM --- frontend/src/js/core/base-gui.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/js/core/base-gui.js b/frontend/src/js/core/base-gui.js index aae7e05..ad11caf 100644 --- a/frontend/src/js/core/base-gui.js +++ b/frontend/src/js/core/base-gui.js @@ -82,8 +82,12 @@ class Base_gui_class { modules_context.keys().forEach(function (key) { if (key.indexOf('Base' + '/') < 0) { var moduleKey = key.replace('./', '').replace('.js', ''); - var classObj = modules_context(key); - _this.modules[moduleKey] = new classObj.default(); + try { + var classObj = modules_context(key); + _this.modules[moduleKey] = new classObj.default(); + } catch (e) { + console.error('[load_modules] Failed to load ' + key + ':', e); + } } }); }