mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 13:26:04 -06:00
fix(macos): show progress when retrying an existing AI connection (#129863)
This commit is contained in:
committed by
GitHub
parent
4e864dff21
commit
58bb40c99b
@@ -135,6 +135,8 @@ final class OnboardingAISetupModel {
|
||||
guard self.configuredGatewayBlocker == nil else { return }
|
||||
guard !self.waitingForPendingActivationDeadline else { return }
|
||||
if self.pendingActivationVerification {
|
||||
self.detectError = nil
|
||||
self.phase = .detecting
|
||||
Task { await self.verifyPendingConfiguredInference() }
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1675,6 +1675,19 @@ struct OnboardingAISetupTests {
|
||||
#expect(model.detectError?.detail == "expired login")
|
||||
#expect(outcome == .notConnected)
|
||||
#expect(isPending(defaults))
|
||||
|
||||
model.retryFromScratch()
|
||||
|
||||
#expect(model.phase == .detecting)
|
||||
#expect(model.detectError == nil)
|
||||
#expect(OnboardingController.shared.busyReason == "OpenClaw is testing your AI connection.")
|
||||
|
||||
await settleQueuedAISetupTasks()
|
||||
|
||||
#expect(model.phase == .ready)
|
||||
#expect(model.detectError?.detail == "expired login")
|
||||
#expect(OnboardingController.shared.busyReason == nil)
|
||||
#expect(await (harness.recorder.snapshot()).methods == ["openclaw.setup.verify", "openclaw.setup.verify"])
|
||||
}
|
||||
|
||||
@Test func `completed activation receipt survives verification transport failure`() async throws {
|
||||
@@ -1708,11 +1721,17 @@ struct OnboardingAISetupTests {
|
||||
#expect(!model.connected)
|
||||
#expect(pendingState(defaults) == .completed)
|
||||
|
||||
let retryOutcome = await model.verifyPendingConfiguredInference()
|
||||
let requests = await waitForAISetupRequests(recorder, count: 2)
|
||||
model.retryFromScratch()
|
||||
|
||||
#expect(model.phase == .detecting)
|
||||
#expect(model.detectError == nil)
|
||||
#expect(OnboardingController.shared.busyReason == "OpenClaw is testing your AI connection.")
|
||||
|
||||
let requests = await waitForAISetupRequests(recorder, count: 2)
|
||||
await settleQueuedAISetupTasks()
|
||||
|
||||
#expect(retryOutcome == .connected)
|
||||
#expect(model.connected)
|
||||
#expect(OnboardingController.shared.busyReason == nil)
|
||||
#expect(requests.methods == ["openclaw.setup.verify", "openclaw.setup.verify"])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user