Skip to content
This repository was archived by the owner on Oct 7, 2026. It is now read-only.

Commit 878252a

Browse files
authored
fix: provision sandbox before user pastes in the API key (#35)
1 parent f715bd4 commit 878252a

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎brev/welcome-ui/app.js‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@
161161

162162
/**
163163
* Five-state CTA button:
164-
* 1. API empty + tasks running -> "Waiting for API key…" (disabled)
165-
* 2. API valid + tasks running -> "Provisioning Sandbox…" (disabled, spinner)
166-
* 3. API empty + tasks complete -> "Waiting for API key…" (disabled)
164+
* 1. !installTriggered -> "Waiting for API key…" (disabled)
165+
* 2. installTriggered + !sandboxReady -> "Provisioning Sandbox…" (disabled, spinner)
166+
* 3. sandbox ready + !key valid -> "Waiting for API key…" (disabled)
167167
* 4. API valid + sandbox ready + !key -> "Configuring API key…" (disabled, spinner)
168168
* 5. API valid + sandbox ready + key -> "Open OpenShell" (enabled)
169169
*/
@@ -213,7 +213,7 @@
213213
btnSpinner.hidden = true;
214214
btnSpinner.style.display = "none";
215215
btnLaunchLabel.textContent = "Update API key to retry";
216-
} else if (!sandboxReady && keyValid) {
216+
} else if (!sandboxReady && installTriggered) {
217217
btnLaunch.disabled = true;
218218
btnLaunch.classList.remove("btn--ready");
219219
btnSpinner.hidden = false;
@@ -260,6 +260,7 @@
260260
setLogIcon(logGatewayIcon, null);
261261
logReady.hidden = true;
262262
updateButtonState();
263+
setSandboxChecklistCreating();
263264

264265
try {
265266
const res = await fetch("/api/install-openclaw", {
@@ -430,6 +431,7 @@
430431
}
431432
apiKeyInput.focus();
432433
updateButtonState();
434+
if (!installTriggered && !installFailed) triggerInstall();
433435
});
434436

435437
cardOther.addEventListener("click", () => {

0 commit comments

Comments
 (0)