diff --git a/crates/wizard-gui/wizard-ui/src/agents/DesktopInstall.tsx b/crates/wizard-gui/wizard-ui/src/agents/DesktopInstall.tsx index c0fcfcc..84161ca 100644 --- a/crates/wizard-gui/wizard-ui/src/agents/DesktopInstall.tsx +++ b/crates/wizard-gui/wizard-ui/src/agents/DesktopInstall.tsx @@ -87,10 +87,12 @@ export function useDesktopInstall(desktop: DesktopApp) { return () => { stopped = true; }; }, [desktop]); - const busy = state?.status === "checking" || state?.status === "downloading" || state?.status === "installing"; + // Checks also run in the background and do not mean the user chose this app. + const inProgress = state?.status === "downloading" || state?.status === "installing"; + const busy = state?.status === "checking" || inProgress; // Hidden until the state loads, so that an unsupported application never flashes. const hidden = state === undefined ? error === undefined : state.status === "unsupported"; - return { desktop, state, error, busy, hidden }; + return { desktop, state, error, busy, inProgress, hidden }; } export function DesktopInstall({ observation, signedIn, disabled, installed }: { diff --git a/crates/wizard-gui/wizard-ui/src/onboarding/AgentSelection.tsx b/crates/wizard-gui/wizard-ui/src/onboarding/AgentSelection.tsx index 320fd42..f317596 100644 --- a/crates/wizard-gui/wizard-ui/src/onboarding/AgentSelection.tsx +++ b/crates/wizard-gui/wizard-ui/src/onboarding/AgentSelection.tsx @@ -25,9 +25,8 @@ export function AgentSelection({ mode, agents, signedIn, selected, onSelect, onC const claude = useDesktopInstall("claude"); const chatgpt = useDesktopInstall("chatgpt"); const [focusedDesktop, setFocusedDesktop] = useState(); - const resumedDesktop = [claude, chatgpt].find(({ state, busy }) => busy - || state?.status === "failed" - || (state?.status === "available" && state.saved))?.desktop; + // Cached downloads and old failures leave both choices visible on reopening. + const resumedDesktop = [claude, chatgpt].find(({ inProgress }) => inProgress)?.desktop; const activeDesktop = focusedDesktop ?? resumedDesktop; const activeInstaller = activeDesktop === "claude" ? claude : activeDesktop === "chatgpt" ? chatgpt : undefined; const confirming = activeInstaller?.state?.status === "ready_to_install"; @@ -68,7 +67,7 @@ export function AgentSelection({ mode, agents, signedIn, selected, onSelect, onC ? claudeState?.status === "found" ? claudeState.data.version : null : codexState?.status === "found" && codexState.data.desktop.status === "found" ? codexState.data.desktop.data.version : null; return