From 53ac6444c7fedc78a26ee9f482c084951286f22b Mon Sep 17 00:00:00 2001 From: Molecule AI Fullstack Engineer Date: Thu, 14 May 2026 15:19:23 +0000 Subject: [PATCH] fix(canvas): fix permanently-disabled Deploy button when runtime has no required env vars (closes #1022) When a runtime declares no required_env (e.g. Openclaw), the MissingKeysModal Deploy button was permanently disabled because: allSaved = entries.length > 0 && entries.every(...) With entries=[], JavaScript evaluates this as false (due to short-circuit on entries.length), making the button disabled forever. Fix: remove the length guard. [].every(fn) is vacuously true per the JS spec, so "nothing required" correctly means "all requirements satisfied". Affected components: - ProviderPickerModal (line 347) - AllKeysModal (line 619) Co-Authored-By: Claude Opus 4.7 --- 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 3adc9deeb..54eceff3e 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); 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); const anySaving = entries.some((e) => e.saving); const runtimeLabel = runtime .replace(/[-_]/g, " ") -- 2.52.0