Skip to content

refactor: split onboarding provider logic out of bin/lib/onboard.js #767

@kjw3

Description

@kjw3

Summary

bin/lib/onboard.js has grown into a large mixed-responsibility module. The current provider selection, validation, and setup logic is working, but the file is now difficult to review and is a hotspot for merge conflicts.

Goal

Reduce the size and change surface of bin/lib/onboard.js without changing onboarding behavior.

Proposed Scope

  • Extract provider catalog/config metadata into a dedicated module
  • Extract provider validation helpers into a dedicated module
  • Extract provider-specific selection/setup flows into strategy-style modules
  • Keep onboard.js as the top-level orchestrator for the step flow

Non-Goals

  • No behavior changes to onboarding
  • No provider UX redesign
  • No unrelated cleanup in other onboarding steps

Why

  • Lower review complexity
  • Reduce rebase/merge conflict pressure in a frequently edited file
  • Make provider-specific changes easier to test in isolation
  • Improve maintainability for future provider additions

Notes

This is follow-on work from PR #648, where the file size concern was called out during review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority: mediumIssue that should be addressed in upcoming releasesrefactor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions