Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Sources/ClawsyMac/ClawsyApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,12 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
existing.makeKeyAndOrderFront(nil)
return
}

guard let hostManager = self.hostManager else {
os_log("Onboarding skipped: hostManager not initialized", log: OSLog.default, type: .error)
return
}

let window = NSWindow(
contentRect: NSRect(x: 0, y: 0, width: 460, height: 540),
styleMask: [.titled, .closable], backing: .buffered, defer: false)
Expand All @@ -763,6 +769,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
onboardingCompleted: onboardingBinding,
onImportSetupCode: { [weak self] code in self?.handleSetupCode(code) ?? false }
)
.environmentObject(hostManager)

window.contentView = NSHostingView(rootView: view)
window.makeKeyAndOrderFront(nil)
NSApp.activate(ignoringOtherApps: true)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ClawsyMac/Onboarding/OnboardingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct OnboardingView: View {

@State private var currentPage: OnboardingPage = .welcome
@ObservedObject private var permissionMonitor = PermissionMonitor.shared
@StateObject private var hostManager = HostManager()
@EnvironmentObject private var hostManager: HostManager

// Connection fields
@State private var setupCode = ""
Expand Down
Loading