Merge branch 'dev'
CI/CD / deploy (push) Failing after 2m14s Details

This commit is contained in:
Jeff Emmett 2026-04-10 17:34:08 -04:00
commit eb6ea4e500
3 changed files with 20 additions and 50 deletions

View File

@ -418,25 +418,17 @@ export class FolkBlender extends FolkShape {
this.#renderResult();
}
// Health check with retry (container may still be starting)
const checkHealth = (attempt = 0) => {
fetch("/api/blender-gen/health").then(r => r.json()).then((h: any) => {
if (!h.available && this.#generateBtn) {
if (attempt < 2) { setTimeout(() => checkHealth(attempt + 1), 3000); return; }
// Health check — only disable if real error (sidecar starts on demand)
fetch("/api/blender-gen/health").then(r => r.json()).then((h: any) => {
if (this.#generateBtn) {
if (!h.available && h.issues?.length) {
this.#generateBtn.disabled = true;
this.#generateBtn.title = (h.issues || []).join(", ") || "Blender service unavailable";
} else if (h.warnings?.length && this.#generateBtn) {
this.#generateBtn.title = h.issues.join(", ");
} else if (h.warnings?.length) {
this.#generateBtn.title = h.warnings.join(", ");
}
}).catch(() => {
if (attempt < 2) { setTimeout(() => checkHealth(attempt + 1), 3000); return; }
if (this.#generateBtn) {
this.#generateBtn.disabled = true;
this.#generateBtn.title = "Cannot reach Blender health endpoint";
}
});
};
checkHealth();
}
}).catch(() => {});
return root;
}

View File

@ -311,23 +311,12 @@ export class FolkFreeCAD extends FolkShape {
this.#renderResult();
}
// Health check with retry (container may still be starting)
const checkHealth = (attempt = 0) => {
fetch("/api/freecad/health").then(r => r.json()).then((h: any) => {
if (!h.available && this.#generateBtn) {
if (attempt < 2) { setTimeout(() => checkHealth(attempt + 1), 3000); return; }
this.#generateBtn.disabled = true;
this.#generateBtn.title = h.error || "FreeCAD MCP server unavailable";
}
}).catch(() => {
if (attempt < 2) { setTimeout(() => checkHealth(attempt + 1), 3000); return; }
if (this.#generateBtn) {
this.#generateBtn.disabled = true;
this.#generateBtn.title = "Cannot reach FreeCAD health endpoint";
}
});
};
checkHealth();
// Health check — only disable if endpoint unreachable (sidecar starts on demand)
fetch("/api/freecad/health").then(r => r.json()).then((h: any) => {
if (this.#generateBtn && h.available === false && h.status && !h.status.includes("on demand")) {
this.#generateBtn.title = h.error || h.status || "FreeCAD MCP server unavailable";
}
}).catch(() => {});
return root;
}

View File

@ -397,23 +397,12 @@ export class FolkKiCAD extends FolkShape {
this.#showExports();
}
// Health check with retry (container may still be starting)
const checkHealth = (attempt = 0) => {
fetch("/api/kicad/health").then(r => r.json()).then((h: any) => {
if (!h.available && this.#generateBtn) {
if (attempt < 2) { setTimeout(() => checkHealth(attempt + 1), 3000); return; }
this.#generateBtn.disabled = true;
this.#generateBtn.title = h.error || "KiCAD MCP server unavailable";
}
}).catch(() => {
if (attempt < 2) { setTimeout(() => checkHealth(attempt + 1), 3000); return; }
if (this.#generateBtn) {
this.#generateBtn.disabled = true;
this.#generateBtn.title = "Cannot reach KiCAD health endpoint";
}
});
};
checkHealth();
// Health check — only disable if endpoint unreachable (sidecar starts on demand)
fetch("/api/kicad/health").then(r => r.json()).then((h: any) => {
if (this.#generateBtn && h.available === false && h.status && !h.status.includes("on demand")) {
this.#generateBtn.title = h.error || h.status || "KiCAD MCP server unavailable";
}
}).catch(() => {});
return root;
}