feat: disabled mode (TENACIOUSLOAD_DISABLED=1) — no-op but keep the loading bar
A one-flag kill-switch: when set, the pack installs no middleware, registers no refresh routes, computes no fingerprint and exposes no graph node — ComfyUI runs exactly as if it weren't installed. Only the read-only /tenaciousload/status route stays so the loading-screen overlay still shows (a generic 'Loading node definitions…' bar, since there's no build to track). The refresh menu buttons hide themselves when status reports enabled:false. Useful for A/B testing or as a safety kill-switch. Requires a restart (the middleware is installed at startup). Unit-tested both modes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -71,12 +71,19 @@ async function tick() {
|
||||
: `first build / refresh · ${fmt(st.elapsed || 0)}`;
|
||||
bar.classList.add("indet");
|
||||
bar.style.width = "35%";
|
||||
} else {
|
||||
} else if (st && st.cached) {
|
||||
// known fast path: serving the cached object_info
|
||||
msg.textContent = "Loading node definitions…";
|
||||
sub.textContent = st && st.cached ? `from cache · ${mb(st.gz_bytes || st.cache_bytes || 0)} gzipped` : "";
|
||||
sub.textContent = `from cache · ${mb(st.gz_bytes || st.cache_bytes || 0)} gzipped`;
|
||||
bar.classList.remove("indet");
|
||||
bar.style.left = "0";
|
||||
bar.style.width = "90%";
|
||||
} else {
|
||||
// disabled, or server busy/frozen building natively — show "working"
|
||||
msg.textContent = "Loading node definitions…";
|
||||
sub.textContent = "";
|
||||
bar.classList.add("indet");
|
||||
bar.style.width = "35%";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user