Skip to content

feat(onboarding): Add SCM messaging treatment route - #120992

Draft
jaydgoss wants to merge 3 commits into
feat/vdy-140-onboarding-session-semanticsfrom
feat/vdy-140-treatment-route-state
Draft

feat(onboarding): Add SCM messaging treatment route#120992
jaydgoss wants to merge 3 commits into
feat/vdy-140-onboarding-session-semanticsfrom
feat/vdy-140-treatment-route-state

Conversation

@jaydgoss

@jaydgoss jaydgoss commented Jul 31, 2026

Copy link
Copy Markdown
Member

TLDR

Adds the treatment-only fifth SCM onboarding step between platform/features and SDK setup, preserving the four-step control flow. Messaging destination state survives refresh and Back, and treatment entry creates no project.

Details

Stacked on #121022, which makes onboarding session exits explicit and is the prerequisite for persisting anything that must outlive a platform change; that in turn sits on #120981, which registers the distinct onboarding-scm-messaging-experiment key. The FlagPole config is getsentry/sentry-options-automator#9012, deliberately scoped to a single throwaway developer alias.

This layer establishes only the route and the session contract. It has no forward navigation on completion by design: VDY-141 owns shared project and alert-rule creation on final Continue or Set up later, VDY-143 owns inline destination configuration, and VDY-146 owns exposure and interaction analytics. A placeholder onComplete here would be deleted by VDY-141 and would strand users on a blank setup-docs, which renders off recentCreatedProject and bails when absent. Because treatment cannot complete yet, the flag must not widen beyond that alias until VDY-141 lands.

The onboarding host consumes the nested assignment without reporting exposure and selects separate control and treatment step descriptors from entry, sharing the Welcome and repository steps. ScmPlatformFeatures keeps the existing control creation boundary but only stages platform and feature choices for treatment before advancing to scm-messaging; deferProjectCreation also drops the teams/projects store gate, which only the auto-create path needs. Global Skip resets the onboarding session and exits without creating a project. Stepper gained role="progressbar" with aria-valuemax, making the four- versus five-step split both accessible and assertable.

OnboardingContextProvider persists a typed unconfigured, skipped, or completed messaging destination in the existing session value, as a discriminated union so a partially-filled destination is unrepresentable. Because #121022 made field setters local, SCM repository, platform, refresh, and Back paths all preserve organization-scoped messaging state.

The messaging route re-fetches the saved active integration and channel before treating a restored destination as valid. Cached values stay non-submittable while either query is fetching, and a missing integration resets the state to unconfigured with an explanation. An empty channel list is deliberately not treated as staleness: every provider helper in organization_integration_channels.py returns [] when its upstream API call fails, so results: [] cannot be distinguished from a deleted channel, and resetting on it would discard a valid destination during a transient Slack or Discord outage. Only a populated list that omits the saved channel counts as stale.

Coverage exercises the four- versus five-step split, deferred creation, session remount and Back behavior, global Skip, stale integration and channel IDs, the empty-list outage case, and a stale query cache — that last one asserts a restored destination is not shown as selected while revalidation is still in flight.

Refs VDY-140

@linear-code

linear-code Bot commented Jul 31, 2026

Copy link
Copy Markdown

VDY-140

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 31, 2026
jaydgoss added 3 commits July 31, 2026 17:03
Add the five-step treatment route, defer project creation, and persist a typed messaging destination in the onboarding session.

Refs VDY-140
Make selected-platform clearing non-destructive while keeping full legacy exits explicit. Require fresh integration and channel results before treating a restored destination as valid.

Refs VDY-140
Un-export useScmMessagingSetupValidation and ScmMessagingProviderKey; both
lacked a second consumer and failed knip. VDY-143 lifts the hook out when the
inline picker needs it.

Every provider helper in organization_integration_channels.py returns an empty
list when the upstream API call fails, so results: [] cannot be distinguished
from a deleted channel. Resetting on it discarded a valid destination during a
transient Slack or Discord outage. Only a populated list that omits the saved
channel now counts as stale.
@jaydgoss
jaydgoss force-pushed the feat/vdy-140-treatment-route-state branch from 35e346f to 9601f27 Compare July 31, 2026 22:14
@jaydgoss
jaydgoss changed the base branch from feat/vdy-140-scm-messaging-experiment-flag to feat/vdy-140-onboarding-session-semantics July 31, 2026 22:14
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