diag: text gate build marker in console (confirm loaded JS)

Loading a workflow does not re-fetch extension JS, and aiohttp serves
web/*.js with only Last-Modified (no no-store), so an open tab can keep
running a cached old text_gate.js. Log a build tag on setup so we can
tell from the devtools console whether the persistence/weighting build
is actually loaded.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 11:07:58 +02:00
parent d6d2c98a58
commit 3ee14819b7
+7
View File
@@ -255,11 +255,18 @@ function setupTextGateNode(node) {
syncWidgetWidth(node);
}
// Build marker — lets you confirm the browser loaded THIS build (not a cached
// old copy). If the editor comes back empty after reload but you don't see this
// line in the devtools console, your tab is running stale JS: hard-refresh
// (Ctrl/Cmd+Shift+R).
const BUILD = "2026-07-03 persist+weight";
app.registerExtension({
name: "datasete.gates.textgate",
// one global socket listener: route the server's pause event to the node
setup() {
console.info(`[datasete.textgate] loaded build ${BUILD}`);
api.addEventListener("datasete-textgate-show", (e) => {
const d = e.detail || {};
const node = app.graph?.getNodeById?.(parseInt(d.id, 10));