fix(onboarding): Sync SCM context with product toggles on setup-docs#113763
Merged
fix(onboarding): Sync SCM context with product toggles on setup-docs#113763
Conversation
SCM onboarding preselects products in scmPlatformFeatures and passes them to setup-docs via URL query. ProductSelection on setup-docs still renders and writes toggles back to the URL, but not to the onboarding context. Going back to scmPlatformFeatures then read stale selectedFeatures and re-expanded deselected products on continue. Thread an optional onProductsChange callback through SdkDocumentation and OnboardingLayout so setupDocs can wire setSelectedFeatures in when the SCM experiment is active. Legacy onboarding passes undefined and is unchanged.
The callback read too similarly to the sibling onProductSelectionChange it composes with. Sync makes the "mirror state elsewhere" role explicit versus Change as "react to a toggle".
51a4be1 to
03fed2a
Compare
evanpurkhiser
approved these changes
Apr 23, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Product toggles on the setup-docs step don't sync back into
OnboardingContext, so SCM back-navigation shows stale selections and re-expands deselected products on Continue.This PR wires a callback from
ProductSelectionthroughSdkDocumentationandOnboardingLayoutintosetSelectedFeatures, keeping the context aligned with URL state when the SCM experiment is active.Background
SCM onboarding preselects products in
scmPlatformFeaturesand forwards them to setup-docs via URL query.ProductSelectionon the setup-docs step still renders and writes toggles back to the URL, but not toOnboardingContext. Back-navigation then reads staleselectedFeatures, shows previously-deselected items as checked, and re-expands them on Continue.The fix
Thread an optional
onProductSelectionSynccallback throughSdkDocumentationandOnboardingLayoutsosetupDocscan wiresetSelectedFeaturesin when the SCM experiment is active. The callback is composed with the existingdoc.onProductSelectionChangehandler so both fire on every toggle. Legacy onboarding passesundefinedand is unchanged.Not addressed
Toggles on setup-docs do not fire
onboarding.scm_platform_feature_toggled. The legacyProductSelectionhas no analytics on toggle at all, so there is no parallel event to emit; that would need a new handler if funnel coverage on this edge becomes important.