Skip to content

Commit e20a329

Browse files
authored
fix(macos): install CLI automatically during remote onboarding (#126723)
1 parent d40cbfe commit e20a329

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎apps/macos/Sources/OpenClaw/OnboardingView+Monitoring.swift‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ extension OnboardingView {
3131
}
3232
guard Self.shouldAutoInstallCLI(
3333
onCLIPage: pageIndex == cliPageIndex,
34-
isLocal: state.connectionMode == .local,
3534
visible: onboardingVisible,
3635
statusKnown: cliStatusKnown,
3736
executableReady: cliExecutableReady,
@@ -43,14 +42,13 @@ extension OnboardingView {
4342

4443
static func shouldAutoInstallCLI(
4544
onCLIPage: Bool,
46-
isLocal: Bool,
4745
visible: Bool,
4846
statusKnown: Bool,
4947
executableReady: Bool,
5048
installed: Bool,
5149
installing: Bool) -> Bool
5250
{
53-
onCLIPage && isLocal && visible && statusKnown && !executableReady && !installed && !installing
51+
onCLIPage && visible && statusKnown && !executableReady && !installed && !installing
5452
}
5553

5654
func startExistingCLIActivationIfNeeded() {

‎apps/macos/Tests/OpenClawIPCTests/OnboardingViewSmokeTests.swift‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ struct OnboardingViewSmokeTests {
145145
requiresCLIInstall: true)
146146

147147
#expect(order.contains(2))
148+
#expect(OnboardingView.shouldAutoInstallCLI(
149+
onCLIPage: order.contains(2),
150+
visible: true,
151+
statusKnown: true,
152+
executableReady: false,
153+
installed: false,
154+
installing: false))
148155
#expect(!OnboardingView.shouldActivateLocalGateway(afterCLIInstallFor: .remote))
149156
#expect(OnboardingView.shouldActivateLocalGateway(afterCLIInstallFor: .local))
150157
}
@@ -185,31 +192,27 @@ struct OnboardingViewSmokeTests {
185192
@Test func `automatic CLI setup waits for the initial status probe`() {
186193
#expect(!OnboardingView.shouldAutoInstallCLI(
187194
onCLIPage: true,
188-
isLocal: true,
189195
visible: true,
190196
statusKnown: false,
191197
executableReady: false,
192198
installed: false,
193199
installing: false))
194200
#expect(OnboardingView.shouldAutoInstallCLI(
195201
onCLIPage: true,
196-
isLocal: true,
197202
visible: true,
198203
statusKnown: true,
199204
executableReady: false,
200205
installed: false,
201206
installing: false))
202207
#expect(!OnboardingView.shouldAutoInstallCLI(
203208
onCLIPage: true,
204-
isLocal: true,
205209
visible: false,
206210
statusKnown: true,
207211
executableReady: false,
208212
installed: false,
209213
installing: false))
210214
#expect(!OnboardingView.shouldAutoInstallCLI(
211215
onCLIPage: true,
212-
isLocal: true,
213216
visible: true,
214217
statusKnown: true,
215218
executableReady: true,

0 commit comments

Comments
 (0)