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:
2026-06-21 20:52:43 +02:00
parent 85552d8b25
commit ed322c9ec2
4 changed files with 43 additions and 7 deletions
+8 -1
View File
@@ -65,7 +65,14 @@ async function doRegister() {
await runRefresh("register", { folder, files });
}
app.registerExtension({
// Skip the refresh buttons entirely when Tenaciousload is disabled.
let _tlEnabled = true;
try {
const r = await api.fetchApi("/tenaciousload/status");
if (r.ok) _tlEnabled = (await r.json()).enabled !== false;
} catch (e) { /* assume enabled */ }
if (_tlEnabled) app.registerExtension({
name: "Tenaciousload.Refresh",
commands: [
{