Skip to content

[Task]: Defer provider and model setup work until active onboarding steps #19673

Description

@DeJeune

Task Type

Refactor

Context

The onboarding welcome step statically imports the complete provider and model settings flows in src/renderer/windows/main/onboarding/OnboardingPage.tsx. It also subscribes to provider/model/default-model data before those later steps are active. This violates the bundle-conditional, bundle-dynamic-imports, and rerender-defer-reads rules from the renderer React audit guidance.

The first-run welcome screen therefore pays the parse and subscription cost of later onboarding steps, increasing its critical-path work.

Definition of Done

  • Load the provider and model setup UI only when the corresponding onboarding step is active.
  • Keep provider/model data reads out of the welcome step while preserving CherryIn login behavior.
  • Preserve all current onboarding transitions and validation behavior.
  • Add or update focused tests for step activation where behavior changes.

References

  • Code: src/renderer/windows/main/onboarding/OnboardingPage.tsx
  • Rules: bundle-conditional, bundle-dynamic-imports, rerender-defer-reads

Additional Notes

Prefer extracting lazy step components over adding conditional branches around the existing top-level hooks.


This task is not reserved for the core team. Community contributions are welcome — if you would like to pick it up, leave a comment before you start so we can avoid duplicated work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Dev TeamOpened by a Cherry Studio team memberinternal-teamInternal team request, initiative, or implementation task

    Type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions