Skip to content

feat(onboarding): Wire ScmIntegrationConnect into single-view project creation#116582

Merged
jaydgoss merged 2 commits into
masterfrom
jaygoss/vdy-74-scm-connect-single-view
Jun 8, 2026
Merged

feat(onboarding): Wire ScmIntegrationConnect into single-view project creation#116582
jaydgoss merged 2 commits into
masterfrom
jaygoss/vdy-74-scm-connect-single-view

Conversation

@jaydgoss

@jaydgoss jaydgoss commented Jun 1, 2026

Copy link
Copy Markdown
Member

TL;DR

Replaces the placeholder section 1 in the SCM-first project creation view with ScmIntegrationConnect (the integration-and-repo connection core extracted in PR 3). analyticsFlow="project-creation" routes its events through project_creation.scm_* keys. The wizard provides its own "Continue without connecting a repo" button below the core for users who do not want to connect a repo; selecting a repo flips the reveal flag eagerly. Sections 2 and 3 remain placeholders pending VDY-75/76.


Stack

  • PR 1: Make decoupled SCM components flow-aware for analytics
  • PR 2: Scaffold SCM-first project creation as a single view
  • PR 3: Extract ScmIntegrationConnect from ScmConnect
  • PR 4 (this): Wire ScmIntegrationConnect into the single-view scaffold

Summary

  • Replaces the placeholder ConnectRepositorySection in scmCreateProject.tsx with <ScmIntegrationConnect analyticsFlow="project-creation" ... />. None of the onboarding chrome (intro heading, lock/revoke text, benefits grid, Continue button) renders here.
  • A small "Continue without connecting a repo" button sits below the core, shown only when no repo is selected. Clicking it fires project_creation.scm_connect_skip_clicked and flips repoStepCompleted.
  • handleRepositoryChange wraps the core's onRepositoryChange so a non-null repo selection eagerly flips the reveal flag.
  • WizardState gains selectedIntegration and selectedRepository so a refresh restores section 1 state.
  • handleClearDerivedState is a no-op until VDY-75/76 wire platform/features/project state.

Out of scope

  • Wiring <ScmPlatformFeatures /> and <ScmProjectDetails /> into sections 2 and 3. VDY-75/76 will pick those up.
  • has_integration analyticsParam on the skip event. The wizard does not call useScmProviders to derive effectiveIntegration; if signal demands it later, we can plumb that through.

Refs VDY-74

Test plan

  • pnpm typecheck clean
  • pnpm lint:js clean on touched files
  • With the experiment flag on, /projects/new/ renders ScmIntegrationConnect in section 1 (no big benefits grid, no onboarding header)
  • Selecting a repo reveals sections 2 and 3 together
  • Clicking "Continue without connecting a repo" reveals sections 2 and 3 with no repo selected and fires project_creation.scm_connect_skip_clicked
  • De-selecting a repo afterwards does not collapse sections 2 and 3
  • Refreshing the page restores integration, repo, and revealed-state (sessionStorage round-trip)
  • project_creation.scm_connect_step_viewed fires on page load

@linear-code

linear-code Bot commented Jun 1, 2026

Copy link
Copy Markdown

VDY-74

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 1, 2026
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

✅ no issues found

@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-extract-scm-integration-connect branch from 7f96854 to d4bb6f8 Compare June 1, 2026 16:41
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-scm-connect-single-view branch from 97a8c13 to d1c556a Compare June 1, 2026 16:42
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-extract-scm-integration-connect branch from d4bb6f8 to 199e2a7 Compare June 1, 2026 16:47
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-scm-connect-single-view branch from d1c556a to e985d01 Compare June 1, 2026 16:47
@jaydgoss jaydgoss marked this pull request as ready for review June 1, 2026 16:59
@jaydgoss jaydgoss requested a review from a team as a June 1, 2026 16:59
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-extract-scm-integration-connect branch from 199e2a7 to 88b03b6 Compare June 1, 2026 17:25
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-scm-connect-single-view branch from e985d01 to 75000e7 Compare June 1, 2026 17:27
Comment thread static/app/views/projectInstall/scmCreateProject.tsx Outdated
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-extract-scm-integration-connect branch from 88b03b6 to f649a6f Compare June 1, 2026 17:37
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-scm-connect-single-view branch from 75000e7 to 8604be7 Compare June 1, 2026 17:38
Comment thread static/app/views/projectInstall/scmCreateProject.tsx Outdated
Comment thread static/app/views/projectInstall/scmCreateProject.tsx
Comment thread static/app/views/projectInstall/scmCreateProject.tsx
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-extract-scm-integration-connect branch from f649a6f to 4c9f55e Compare June 1, 2026 19:18
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-scm-connect-single-view branch from 6b66ee3 to 2a70b62 Compare June 1, 2026 19:19
Comment thread static/app/views/projectInstall/scmCreateProject.tsx Outdated
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-scm-connect-single-view branch from 6030e55 to 418bb41 Compare June 2, 2026 16:26
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-extract-scm-integration-connect branch from e28c03f to b9d1529 Compare June 2, 2026 17:21
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-scm-connect-single-view branch from 418bb41 to a02c19d Compare June 2, 2026 17:21

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a02c19db2dd9c73d4975655b6a328f2bf401bc9b. Configure here.

<Button
variant="transparent"
analyticsEventKey="project_creation.scm_connect_skip_clicked"
analyticsEventName="Project Creation: SCM Connect Skip Clicked"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Analytics skip event not registered in event map

Medium Severity

The analyticsEventKey "project_creation.scm_connect_skip_clicked" used on the skip button is not registered in ProjectCreationEventParameters or projectCreationEventMap in projectCreationAnalyticsEvents.tsx. Every other project_creation.scm_* event is registered there, suggesting this one was missed. Without registration, the event may not be tracked correctly through the analytics pipeline.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a02c19db2dd9c73d4975655b6a328f2bf401bc9b. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key genuinely isn't registered, but this doesn't affect tracking. The skip button emits through the <Button analyticsEventKey/analyticsEventName> props, which route via useButtonTracking to rawTrackAnalyticsEvent with the explicit key and name. That path never consults projectCreationEventMap, so the event fires correctly at runtime regardless of registration.

The registered scm_* siblings (scm_connect_repo_selected, scm_connect_step_viewed) are a different mechanism: they go through trackAnalytics(), which requires registration for typing and to resolve the event name. The Button prop path is untyped and self-contained, so the "every other scm_* is registered" comparison doesn't apply here.

For reference, the onboarding flow this was extracted from uses the same untyped Button path with onboarding.scm_connect_skip_clicked, which is also unregistered. Mirroring that intentionally.

Marking non-blocking. May register both keys in a follow-up if we want the map to be a complete event catalog.

@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-extract-scm-integration-connect branch from b9d1529 to ee400b3 Compare June 2, 2026 18:06
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-74-scm-connect-single-view branch from a02c19d to 44c9903 Compare June 2, 2026 18:06
Base automatically changed from jaygoss/vdy-74-extract-scm-integration-connect to master June 2, 2026 19:37
jaydgoss added 2 commits June 2, 2026 14:38
… creation

Replaces the placeholder section 1 in the SCM-first project creation
view with ScmIntegrationConnect, the integration-and-repo connection
core extracted from ScmConnect in the previous PR. analyticsFlow is
passed as "project-creation" so the component's events route through
the project_creation.scm_* keys registered in VDY-77.

The onboarding chrome (intro heading, lock/revoke text, benefits grid,
Continue/Skip footer) does not render here. The wizard provides a
"Continue without connecting a repo" button below the core for users
who do not want to connect a repo; clicking it flips repoStepCompleted.
Selecting a repo flips the flag eagerly via handleRepositoryChange.

WizardState gains selectedIntegration and selectedRepository so a
refresh restores the section 1 state. handleClearDerivedState is a
no-op until VDY-75/76 wire platform/features/project state.

Refs VDY-74
handleRepositoryChange's comment documented an eager flip of
repoStepCompleted on non-null repo selection, but the code only updated
selectedRepository. With showAllSteps deriving from
"repoStepCompleted || selectedRepository", selecting then de-selecting
a repo collapsed sections 2 and 3, contradicting the "later state edits
do not collapse" invariant.

Restore the eager flip and simplify showAllSteps to repoStepCompleted
since the OR's second clause is now redundant.

Refs VDY-74
}, [setState]);
};

const handleIntegrationChange = useCallback(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this actually need to be a useCallback?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes in the sense that it is used as a dep of other useCallbacks

(integration: Integration | undefined) => {
setState(s => ({...s, selectedIntegration: integration}));
},
[setState]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the hook rules understand that setState has a consistent identity and you don't need to pass it as a dependency.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

results in eslint err

repoStepCompleted: repository ? true : s.repoStepCompleted,
}));
},
[setState]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

results in eslint err

@jaydgoss jaydgoss merged commit 5cb6cdf into master Jun 8, 2026
76 checks passed
@jaydgoss jaydgoss deleted the jaygoss/vdy-74-scm-connect-single-view branch June 8, 2026 16:56
jaydgoss added a commit that referenced this pull request Jun 8, 2026
…ures (#116624)

## TL;DR
Splits `ScmPlatformFeatures` into a reusable platform-and-features
selection core (`ScmPlatformFeaturesCore`) and the onboarding chrome
that wraps it. The core owns platform detection, feature metadata, the
manual-picker toggle, all selection/toggle handlers, and the
`step_viewed` / `platform_selected` / `feature_toggled` /
`change_platform_clicked` analytics. The wrapper keeps the page
headings, the Continue button, and the
auto-create-on-skip-project-details path. Behavior preserved (modulo a
small analyticsParam drop noted below); the existing 26 spec tests pass
unchanged.

This is the VDY-75 equivalent of PR 3's `ScmIntegrationConnect`
extraction. The future wiring PR will consume `ScmPlatformFeaturesCore`
from `scmCreateProject` for section 2 of the single-view wizard.

---

## Stack
- [PR 1](#116434):
`ScmAnalyticsFlow` + project_creation event registry
- [PR 2](#116577): Single-view
scaffold
- [PR 3](#116581): Extract
`ScmIntegrationConnect`
- [PR 4](#116582): Wire
`ScmIntegrationConnect`
- **PR 5 (this):** Extract `ScmPlatformFeaturesCore`
- PR 6 (next): Wire `ScmPlatformFeaturesCore` into section 2 (VDY-75
wiring)

## Summary
- New
`static/app/views/onboarding/components/scmPlatformFeaturesCore.tsx`
owns the platform-and-features selection slice (auto-detected cards or
manual picker + feature selection/info cards + the "unlimited volume"
promo card). Props: `analyticsFlow`, `selectedRepository`,
`selectedPlatform`, `selectedFeatures`, `onPlatformChange`,
`onFeaturesChange`, `onClearProjectDetailsForm`.
- New `static/app/views/onboarding/components/scmPlatformHelpers.tsx`
holds shared constants and helpers (`FEATURE_DISPLAY_ORDER`,
`getPlatformInfo`, `getPlatformName`, `platformOptions`,
`toSelectedSdk`, `shouldSuggestFramework`, `ResolvedPlatform`) so both
the wrapper and the core can import without a circular dependency.
- `ScmPlatformFeatures` (wrapper) now imports and renders
`<ScmPlatformFeaturesCore analyticsFlow="onboarding" .../>`. It still
calls `useScmPlatformDetection` to derive `currentPlatformKey` for
`handleContinue`'s auto-create path (React Query dedupes with the core's
call).
- The Continue button's `analyticsParams` drop the `source: 'detected' |
'manual'` field, since that lived in core-internal state and is already
captured by per-selection `scm_platform_selected` events.
- All 26 existing `scmPlatformFeatures.spec.tsx` tests pass unchanged;
broader onboarding specs (`onboarding.spec.tsx`,
`scmProjectDetails.spec.tsx`, `scmRepoSelector.spec.tsx`) also clean.

## Out of scope
- Wiring `ScmPlatformFeaturesCore` into `scmCreateProject`. PR 6 will
pick that up.

Refs VDY-75

## Test plan
- [x] \`pnpm typecheck\` clean
- [x] \`pnpm lint:js\` clean on touched files
- [x] \`pnpm test-ci scmPlatformFeatures.spec.tsx\` (26 tests, all pass)
- [x] \`pnpm test-ci onboarding.spec.tsx scmProjectDetails.spec.tsx
scmRepoSelector.spec.tsx\` (59 tests, all pass)
- [ ] In onboarding, the platform-features step renders identically:
detected cards when SCM connected and platforms detected, manual picker
otherwise, feature cards below, Continue footer
- [ ] Selecting an auto-detected card or picking from manual fires
\`onboarding.scm_platform_selected\` with the right \`source\`
- [ ] Toggling a feature fires
\`onboarding.scm_platform_feature_toggled\`
- [ ] Clicking Continue fires
\`onboarding.scm_platform_features_continue_clicked\` (without
\`source\` param, with \`platform\` and \`features\`)
jaydgoss added a commit that referenced this pull request Jun 8, 2026
…ct creation (#116626)

## TL;DR
Wires `ScmPlatformFeaturesCore` (extracted in PR 5) into section 2 of
the SCM-first project creation wizard. The placeholder
`PlatformFeaturesSection` is replaced by the real component, wrapped in
the same bordered-card chrome as section 1, with
`analyticsFlow="project-creation"` routing events through the
`project_creation.scm_*` keys. Section 3 stays as a placeholder pending
VDY-76.

---

## Stack
- [PR 1](#116434):
`ScmAnalyticsFlow` + project_creation event registry
- [PR 2](#116577): Single-view
scaffold
- [PR 3](#116581): Extract
`ScmIntegrationConnect`
- [PR 4](#116582): Wire
`ScmIntegrationConnect`
- [PR 5](#116624): Extract
`ScmPlatformFeaturesCore`
- **PR 6 (this):** Wire `ScmPlatformFeaturesCore` into section 2

## Summary
- Replaces the placeholder `PlatformFeaturesSection` with
`<ScmPlatformFeaturesCore analyticsFlow="project-creation" .../>`,
wrapped in a `MotionStack` with `border="primary" radius="md"
padding="lg"` to match section 1's card look. A "Platform & features"
heading and short description sit above the core.
- `WizardState` gains `selectedPlatform: OnboardingSelectedSDK |
undefined` and `selectedFeatures: ProductSolution[] | undefined` so a
refresh restores section 2's state through sessionStorage.
- `handlePlatformChange` and `handleFeaturesChange` propagate user
selections back into state.
- `handleClearDerivedState` now clears `selectedPlatform` and
`selectedFeatures` (in addition to its previous no-op) so changing the
repo resets section 2's derived state. The core's contract for repo
re-selection.
- `handleClearProjectDetailsForm` stays a no-op until VDY-76 wires up
project-details state.
- Section 3 (`ProjectDetailsSection`) is still a placeholder. VDY-76
will replace it.

## Out of scope
- Wiring `ScmProjectDetails` (or its future extracted core) into section
3. VDY-76 will pick that up.
- Per-section progressive disclosure between sections 2 and 3. Per the
design decision, both reveal together when `repoStepCompleted` flips.

Refs VDY-75

## Test plan
- [x] \`pnpm typecheck\` clean
- [x] \`pnpm lint:js\` clean on touched file
- [ ] With the experiment flag on, after completing section 1, section 2
renders \`ScmPlatformFeaturesCore\` inside the bordered card
- [ ] With a repo connected, auto-detected platform cards appear and
clicking one fires \`project_creation.scm_platform_selected\` with
\`source: 'detected'\`
- [ ] Without a repo (skip path), the manual picker shows and selecting
fires \`project_creation.scm_platform_selected\` with \`source:
'manual'\`
- [ ] Toggling a feature fires
\`project_creation.scm_platform_feature_toggled\`
- [ ] Changing the repo in section 1 clears \`selectedPlatform\` and
\`selectedFeatures\` (section 2 resets)
- [ ] \`project_creation.scm_platform_features_step_viewed\` fires when
section 2 mounts (i.e. after \`repoStepCompleted\` flips)
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.

2 participants