mirror of
https://github.com/bitbaum/openclaw.git
synced 2026-12-05 19:18:15 +01:00
Fixes #128194. Local-mode onboarding has two rightful actors on the CLI page: the page's own install flow, which may open an install-target prompt on unreleased builds, and the connection-mode commit, which starts the gateway through ConnectionModeCoordinator the moment the user picks This Mac. When the gateway comes up on its own (dev-root builds, or an externally attached gateway), AI setup auto-connects and finish() runs — but close() was silently ineffective because AppKit ignores NSWindow.close() while a sheet is attached. The result, reproduced live with os_log instrumentation: a completed onboarding (dashboard open, onboardingSeen set) with a zombie onboarding window showing a dead CLI page and a stale channel-choice sheet. Two coupled fixes. OnboardingController.close() now ends any attached sheet before closing, so completion always tears the window down. And a running local gateway now resolves a pending install prompt directly: a new tested static (shouldResolveInstallPromptForRunningGateway) extends the existing gateway-status revise path to the choosingTarget phase, marking the step installed and dismissing the moot sheet; runCLIInstall returns quietly in that case instead of writing a cancellation over a resolved step. Genuine declines keep the cancelled status.