From 4e3add6e34009d728c3ffb5d4c4ddde70235c537 Mon Sep 17 00:00:00 2001 From: devops-engineer Date: Thu, 14 May 2026 14:14:39 +0000 Subject: [PATCH] fix(canvas): unblock deploy when runtime has no required env vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AllKeysModal and ProviderPickerModal guarded allSaved with entries.length > 0, so when a runtime (e.g. openclaw) declares no required_env and providers=[], the entries array is empty and allSaved=false — the Deploy button stayed disabled with no way to proceed. Fix: drop the length guard. [].every(fn) is vacuously true per the JS spec, so allSaved correctly reflects "nothing required, nothing missing" when the template needs no API keys. --- canvas/src/components/MissingKeysModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/canvas/src/components/MissingKeysModal.tsx b/canvas/src/components/MissingKeysModal.tsx index 3adc9dee..5475dfed 100644 --- a/canvas/src/components/MissingKeysModal.tsx +++ b/canvas/src/components/MissingKeysModal.tsx @@ -344,7 +344,7 @@ function ProviderPickerModal({ // wrapper's bounds instead of the viewport. if (typeof document === "undefined") return null; - const allSaved = entries.length > 0 && entries.every((e) => e.saved); + const allSaved = entries.every((e) => e.saved); // vacuously true for [] — no required keys means deploy is always ready const anySaving = entries.some((e) => e.saving); const runtimeLabel = runtime .replace(/[-_]/g, " ") @@ -616,7 +616,7 @@ function AllKeysModal({ if (!open) return null; if (typeof document === "undefined") return null; - const allSaved = entries.length > 0 && entries.every((e) => e.saved); + const allSaved = entries.every((e) => e.saved); // vacuously true for [] — no required keys means deploy is always ready const anySaving = entries.some((e) => e.saving); const runtimeLabel = runtime .replace(/[-_]/g, " ") -- 2.52.0