From e089fab10e653d8f254acb56e60bd0c8018bd6e1 Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Tue, 4 Aug 2026 15:07:43 -0700 Subject: [PATCH] fix(web): surface failed command pre-type in the onboarding terminal A silently failed write left a blank prompt under copy telling the user to press Enter; the header now falls back to showing the command to run. Co-Authored-By: Claude Fable 5 --- .../src/components/onboarding/WelcomeWizard.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/onboarding/WelcomeWizard.tsx b/apps/web/src/components/onboarding/WelcomeWizard.tsx index 3c9769c96b..d202ab7e11 100644 --- a/apps/web/src/components/onboarding/WelcomeWizard.tsx +++ b/apps/web/src/components/onboarding/WelcomeWizard.tsx @@ -669,6 +669,7 @@ function AgentInstallTerminal({ const command = installed ? (AGENT_LOGIN_COMMANDS[driver] ?? "") : (AGENT_INSTALL_COMMANDS[driver] ?? ""); + const [preTypeFailed, setPreTypeFailed] = useState(false); useEffect(() => { if (preparedRef.current || cwd === null) return; @@ -685,10 +686,13 @@ function AgentInstallTerminal({ // Pre-type without the trailing carriage return; the user submits. // The terminal id is unique to this mount, so this session has never // been written to before. - await writeTerminal({ + const wrote = await writeTerminal({ environmentId, input: { threadId: AGENT_ONBOARDING_THREAD_ID, terminalId, data: command }, }); + // A silent failure would leave a blank prompt under copy that says + // "review the command" — fall back to telling the user what to type. + if (wrote._tag !== "Success") setPreTypeFailed(true); })(); }, [command, cwd, environmentId, openTerminal, terminalId, writeTerminal]); @@ -713,7 +717,14 @@ function AgentInstallTerminal({
- Review the command, then press Enter to run it. + {preTypeFailed ? ( + <> + Run {command} in this + terminal. + + ) : ( + "Review the command, then press Enter to run it." + )}