Skip to content

refactor(onboarding): Use shared HostManager in OnboardingView#106

Merged
iret77 merged 1 commit into
mainfrom
fix/onboarding-hostmanager-singleton
Apr 27, 2026
Merged

refactor(onboarding): Use shared HostManager in OnboardingView#106
iret77 merged 1 commit into
mainfrom
fix/onboarding-hostmanager-singleton

Conversation

@iret77

@iret77 iret77 commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Summary

This PR fixes Issue #43 by refactoring the OnboardingView to use the shared, singleton HostManager instance.

Problem:
The OnboardingView was creating its own @StateObject instance of HostManager. This led to a separate, inconsistent state from the main application, which uses a shared HostManager instance provided to the environment.

Solution:

  1. The OnboardingView has been modified to receive the HostManager as an @EnvironmentObject.
  2. The call site in ClawsyApp.swift that presents the onboarding sheet now correctly injects the shared hostManager instance using the .environmentObject() modifier.

This ensures that the onboarding process and the main app operate on the exact same state, preventing bugs related to host management and selection.

@iret77 iret77 merged commit 84b5ea3 into main Apr 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant