Skip to content

ref(onboarding): Decouple SCM step components from OnboardingContext#112948

Draft
jaydgoss wants to merge 2 commits intomasterfrom
jaygoss/vdy-72-extract-shared-scm-components-from-onboardingcontext
Draft

ref(onboarding): Decouple SCM step components from OnboardingContext#112948
jaydgoss wants to merge 2 commits intomasterfrom
jaygoss/vdy-72-extract-shared-scm-components-from-onboardingcontext

Conversation

@jaydgoss
Copy link
Copy Markdown
Member

Summary

Extract useOnboardingContext() calls from ScmConnect, ScmPlatformFeatures, ScmProjectDetails, and ScmRepoSelector so they accept all shared state via props. Adapter wrappers in onboarding.tsx read from context and pass props to the decoupled components.

This enables reusing the SCM step components in the upcoming project creation flow, which will provide state from local wizard state instead of OnboardingContext.

Changes

  • ScmRepoSelector: New ScmRepoSelectorProps with onRepositoryChange + selectedRepository. clearDerivedState responsibility moved to adapter.
  • ScmConnect: New ScmConnectProps with integration + repository state + callbacks.
  • ScmPlatformFeatures: New ScmPlatformFeaturesProps with all platform/features state + callbacks.
  • ScmProjectDetails: New ScmProjectDetailsProps with onProjectCreated replacing setCreatedProjectSlug.
  • onboarding.tsx: Three adapter wrappers (ScmConnectAdapter, ScmPlatformFeaturesAdapter, ScmProjectDetailsAdapter) that read from context and pass props.
  • Tests: All 3 spec files updated to pass props directly instead of wrapping in OnboardingContextProvider.

Refs VDY-72

Extract useOnboardingContext() calls from ScmConnect, ScmPlatformFeatures,
ScmProjectDetails, and ScmRepoSelector so they accept all shared state
via props. Adapter wrappers in onboarding.tsx read from context and pass
props to the decoupled components.

This enables reusing the SCM step components in the upcoming project
creation flow, which will provide state from local wizard state instead
of OnboardingContext.

Refs VDY-72
@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 14, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 14, 2026
@sentry
Copy link
Copy Markdown
Contributor

sentry bot commented Apr 14, 2026

Sentry Snapshot Testing

Name Added Removed Modified Renamed Unchanged Status
sentry-frontend
sentry-frontend
0 0 0 0 204 ✅ Unchanged

Un-export OnboardingSessionState (no longer imported externally).
Add @public JSDoc tags to SCM prop interfaces so knip recognizes
them as intentionally exported for the project creation flow.
Fix renderComponent type in scmPlatformFeatures.spec.tsx.

ref(onboarding): Un-export SCM prop interfaces until needed

No external consumers yet. Re-export when the project creation
flow imports them.
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-72-extract-shared-scm-components-from-onboardingcontext branch from dad5e27 to 39ea7d4 Compare April 14, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant