From 9e2a1b63243a015032d40c96387c3b7f4e31be42 Mon Sep 17 00:00:00 2001 From: Alessandro <155005371+3clyp50@users.noreply.github.com> Date: Sat, 18 Jul 2026 13:32:52 +0200 Subject: [PATCH] Revert "Prevent WebUI extension loading stalls" This reverts commit bf2046ff8704b4f70065226b96059795ae257fe7. --- tests/test_webui_loader_static.py | 19 ------------------- webui/js/AGENTS.md | 2 -- webui/js/components.js | 7 ++++++- webui/js/extensions.js | 29 ++++++++--------------------- 4 files changed, 14 insertions(+), 43 deletions(-) delete mode 100644 tests/test_webui_loader_static.py diff --git a/tests/test_webui_loader_static.py b/tests/test_webui_loader_static.py deleted file mode 100644 index bc193a195..000000000 --- a/tests/test_webui_loader_static.py +++ /dev/null @@ -1,19 +0,0 @@ -from pathlib import Path - - -PROJECT_ROOT = Path(__file__).resolve().parents[1] - - -def test_extension_discovery_requests_are_serialized() -> None: - source = (PROJECT_ROOT / "webui/js/extensions.js").read_text(encoding="utf-8") - - assert "let extensionRequestQueue = Promise.resolve();" in source - assert "extensionRequestQueue = request.catch(() => {});" in source - assert source.count("await requestExtensionPaths(") == 2 - - -def test_component_placeholder_is_removed_after_failure() -> None: - source = (PROJECT_ROOT / "webui/js/components.js").read_text(encoding="utf-8") - finally_block = source.rsplit("} finally {", maxsplit=1)[1] - - assert "targetElement.querySelector(':scope > .loading')?.remove();" in finally_block diff --git a/webui/js/AGENTS.md b/webui/js/AGENTS.md index e27ebc246..ac6490801 100644 --- a/webui/js/AGENTS.md +++ b/webui/js/AGENTS.md @@ -37,10 +37,8 @@ - `scrollModal(id)` scrolls inside the top modal's `.modal-scroll`. - Keep extension loader cache keys and extension point names stable for plugins. - HTML extension loading turns discovered HTML files into `` tags; JavaScript extensions must export a default function. -- Serialize frontend extension-discovery API requests so a page with many extension points cannot exhaust embedded Chromium request resources. - `` loading must process component `style`, `script`, and stylesheet-link assets only once, even when a component keeps its scoped `