mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-16 07:33:46 -06:00
76cb418b6f
* fix(macos): let onboarding replace an auto-connected AI The AI page auto-tests the best detected candidate and connects without asking, then hides every alternative route. Add 'Choose a different AI' to the connected banner: a re-detect pass with auto-activation suppressed that ends at the picker (candidates, provider sign-in, API keys). Also disable the manual key Connect button while another test runs (submitManualKey silently dropped the tap), and isolate a test that read the machine's real resume store. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(macos): surface real daemon errors past the Node banner Gateway daemon failures summarized as 'Node.js v26.5.1' because the summary takes the last non-empty line and Node fatal errors end with a version banner. Drop trailing banner lines and prefer the last error-shaped line above them; all other output keeps its last line. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(macos): hand onboarding off to the dashboard custodian Native onboarding now ends once inference verifies: welcome, connection, install (when needed), AI setup. Finish opens the dashboard at /custodian?onboarding=1, where the custodian onboarding owns memory import, channels, app recommendations, and the hatch (browser-first per the onboarding redesign). The native memory-import and permissions pages leave the first-run flow; 'Set up later' keeps the native ready page. The native navigation bridge gains a validated optional search field so the handoff can request onboarding chrome; the URL fallback carries the query alongside the token fragment. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * refactor(macos): delete the unreachable native memory-import module The dashboard handoff removed the memory-import page from every flow, leaving the module reachable only from tests. CI's dead-code scan rightly flagged the first orphans; remove the whole path (model, page, mascot wiring, tests) instead of trimming symbol by symbol. The dashboard's own memory-import surface owns the feature. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Peter Steinberger <steipete@mac-studio-sf2.local> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
74 lines
2.5 KiB
Swift
74 lines
2.5 KiB
Swift
import OpenClawDiscovery
|
|
import SwiftUI
|
|
|
|
#if DEBUG
|
|
@MainActor
|
|
extension OnboardingView {
|
|
static func exerciseForTesting() {
|
|
let state = AppState(preview: true)
|
|
let discovery = GatewayDiscoveryModel(localDisplayName: InstanceIdentity.displayName)
|
|
discovery.statusText = "Searching..."
|
|
let gateway = GatewayDiscoveryModel.DiscoveredGateway(
|
|
displayName: "Test Gateway",
|
|
lanHost: "gateway.local",
|
|
tailnetDns: "gateway.ts.net",
|
|
sshPort: 2222,
|
|
gatewayPort: 18789,
|
|
cliPath: "/usr/local/bin/openclaw",
|
|
stableID: "gateway-1",
|
|
debugID: "gateway-1",
|
|
isLocal: false)
|
|
discovery.gateways = [gateway]
|
|
|
|
let view = OnboardingView(
|
|
state: state,
|
|
permissionMonitor: PermissionMonitor.shared,
|
|
discoveryModel: discovery)
|
|
view.localGatewayProbe = LocalGatewayProbe(
|
|
port: GatewayEnvironment.gatewayPort(),
|
|
pid: 123,
|
|
command: "openclaw-gateway",
|
|
expected: true)
|
|
view.showAdvancedConnection = true
|
|
view.preferredGatewayID = gateway.stableID
|
|
view.cliInstalled = true
|
|
view.cliInstallLocation = "/usr/local/bin/openclaw"
|
|
view.cliStatus = "Installed"
|
|
view.state.connectionMode = .local
|
|
let contentHeight = view.contentHeight(for: OnboardingView.windowHeight)
|
|
_ = view.welcomePage()
|
|
_ = view.connectionPage()
|
|
_ = view.aiSetupPage(contentHeight: contentHeight)
|
|
_ = view.permissionsPage()
|
|
_ = view.cliPage()
|
|
_ = view.readyPage()
|
|
|
|
view.selectLocalGateway()
|
|
view.selectRemoteGateway(gateway)
|
|
view.selectUnconfiguredGateway()
|
|
|
|
view.state.connectionMode = .remote
|
|
_ = view.connectionPage()
|
|
|
|
view.state.connectionMode = .unconfigured
|
|
_ = view.connectionPage()
|
|
|
|
view.currentPage = 0
|
|
view.handleNext()
|
|
view.handleBack()
|
|
|
|
_ = view.onboardingPage { Text("Test") }
|
|
_ = view.onboardingCard { Text("Card") }
|
|
_ = view.featureRow(title: "Feature", subtitle: "Subtitle", systemImage: "sparkles")
|
|
_ = view.featureActionRow(
|
|
title: "Action",
|
|
subtitle: "Action subtitle",
|
|
systemImage: "gearshape",
|
|
buttonTitle: "Action",
|
|
action: {})
|
|
_ = view.gatewaySubtitle(for: gateway)
|
|
_ = view.isSelectedGateway(gateway)
|
|
}
|
|
}
|
|
#endif
|