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 `