chart module: re-pin to the canonical revision that adds the definition layer

Same byte-identical module as the panel; the dashboard's own port to the shared
definitions is the next commit. check-page-js.sh's DOM stub now supports
setAttribute/insertAdjacentHTML, which the shared metric-button builder needs.
This commit is contained in:
inference-admin committed 2026-11-13 20:55:52 +00:00
1 parent 8c469c1242
commit c5d4677ec3
3 files changed
+176 -8

No files matched your search

+14 -6
View File
@@ -62,12 +62,20 @@ if [ -n "$HARNESS" ]; then
// Minimal browser stubs, loaded BEFORE the page JS: these pages call
// load()/loadModels() at the end of the script, which need document + fetch.
const els = {};
const mkEl = (id) => ({
id, style: {}, textContent: "", innerHTML: "", className: "",
offsetWidth: 120, offsetHeight: 48,
getAttribute: () => null,
appendChild: () => {},
});
const mkEl = (id) => {
const el = {
id, style: {}, textContent: "", innerHTML: "", className: "",
offsetWidth: 120, offsetHeight: 48,
getAttribute: () => null,
setAttribute: () => {},
appendChild: () => {},
};
// The pages build some markup by inserting HTML into a container
// (buildMetricButtons inserts the SHARED metric list), so the stub has to
// support it or the harness cannot exercise that path at all.
el.insertAdjacentHTML = (pos, html) => { el.innerHTML += html; };
return el;
};
globalThis.document = {
getElementById: (id) => (els[id] = els[id] || mkEl(id)),
querySelectorAll: () => [],
+1 -1
View File
@@ -21,7 +21,7 @@ import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
CANONICAL_SHA256 = "a029fd40189acc38b8b218921c56e24e0208c8c8e0ab550a320bbd57449f5fed"
CANONICAL_SHA256 = "233c39faa7b40a9827fefd21aeb5505fdfa770833de2decebc8fe8bbbaee1903"
SPLICE = 'PAGE_HTML = PAGE_HTML.replace("/*@@CHART_MODULE@@*/", CHART_MODULE_JS)'
failures = []