diff options
Diffstat (limited to 'modules/core/terminal.js')
| -rw-r--r-- | modules/core/terminal.js | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/modules/core/terminal.js b/modules/core/terminal.js index ca6bb61..6bc23b4 100644 --- a/modules/core/terminal.js +++ b/modules/core/terminal.js @@ -1382,6 +1382,7 @@ this._safeRegister('SmartContextModule', 'smart context'); this._safeRegister('SimpleGUIModule', 'simple GUI builder'); this._safeRegister('DebugSupervisorModule', 'debug supervisor'); + this._safeRegister('UIShellModule', 'UI shell'); // v4.5.47: Critical ext modules promoted to boot path this._safeRegister('EditorModule', 'editor'); this._safeRegister('ShellModule', 'shell'); @@ -1430,6 +1431,7 @@ BusyBoxModule: typeof BusyBoxModule !== 'undefined' ? BusyBoxModule : undefined, SmartContextModule: typeof SmartContextModule !== 'undefined' ? SmartContextModule : undefined, DebugSupervisorModule: typeof DebugSupervisorModule !== 'undefined' ? DebugSupervisorModule : undefined, + UIShellModule: typeof UIShellModule !== 'undefined' ? UIShellModule : undefined, BillingModule: typeof BillingModule !== 'undefined' ? BillingModule : undefined, }; const cls = registry[className]; @@ -1519,7 +1521,24 @@ const pkg = index.packages[key]; if (pkg) { const url = pkg.url + (pkg.url.includes('?') ? '&v=' : '?v=') + cacheVer; - await this.moduleManager.loadModuleFromURL(url); + // One bad module must not abort the rest: this loop is serial and used to + // return on the first 404/503/parse error, silently skipping every key + // after it (measured 2026-11-07: a 503 on an earlier key meant the six + // ui-* modes at the end never loaded). + try { + await this.moduleManager.loadModuleFromURL(url); + } catch (e) { + // A 503 here is nginx `limit_req zone=webx11` (60r/m, burst 50): the + // bucket is per-IP, so a boot with many modules drains it and every + // later module is refused. Back off and retry instead of losing the + // module — measured 2026-11-07, six ui-* files 503'd every load. + try { + await new Promise(r => setTimeout(r, 700)); + await this.moduleManager.loadModuleFromURL(url); + } catch (e2) { + console.warn(`[Ext] ${key} failed to load: ${e2.message}`); + } + } } } } |