Skip to content

feat(onboarding): Explain the disabled Create CTA in the SCM wizard#117342

Open
jaydgoss wants to merge 2 commits into
masterfrom
jaygoss/scm-create-cta-tooltip
Open

feat(onboarding): Explain the disabled Create CTA in the SCM wizard#117342
jaydgoss wants to merge 2 commits into
masterfrom
jaygoss/scm-create-cta-tooltip

Conversation

@jaydgoss

@jaydgoss jaydgoss commented Jun 10, 2026

Copy link
Copy Markdown
Member

TLDR

Wraps the SCM wizard's page-level Create CTA in a tooltip naming what is still missing (platform, project name, or team), mirroring classic createProject's submit tooltip. Previously the button disabled silently.

Details

  • useScmProjectDetails now exposes missingFields, and canSubmit derives from them plus the existing transient blockers (stores loading, create in flight).
  • The wizard composes the message like classic getSubmitTooltipText: a summary when several fields are missing, otherwise the specific field. Transient blockers show no message.
  • The no-access member path is unaffected: the hidden team selector does not count as missing.

Stack

  • PR 1: Extract project-details form into a hook and core (merged)
  • PR 2: Keep getting-started rendered while back nav deletes (merged)
  • PR 3: Drive the project-details form from host state
  • PR 4: Wire into single-view project creation
  • PR 5: Commit the auto-detected platform to the host
  • PR 6 (this): Explain the disabled Create CTA in the SCM wizard

Refs VDY-76

@jaydgoss jaydgoss requested a review from a team as a code owner June 10, 2026 18:10
@linear-code

linear-code Bot commented Jun 10, 2026

Copy link
Copy Markdown

VDY-76

@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 b0e616f. Configure here.

Comment thread static/app/views/onboarding/components/useScmProjectDetails.ts Outdated
@jaydgoss jaydgoss force-pushed the jaygoss/scm-create-cta-tooltip branch from b0e616f to d903e65 Compare June 10, 2026 20:04
@jaydgoss jaydgoss force-pushed the jaygoss/scm-commit-detected-platform branch from e42667a to 2c1178d Compare June 10, 2026 20:04
@jaydgoss jaydgoss force-pushed the jaygoss/scm-commit-detected-platform branch from 2c1178d to d00ee76 Compare June 10, 2026 20:58
@jaydgoss jaydgoss force-pushed the jaygoss/scm-create-cta-tooltip branch from d903e65 to 258efcb Compare June 10, 2026 20:58
@jaydgoss jaydgoss force-pushed the jaygoss/scm-create-cta-tooltip branch from 258efcb to 1eb2b61 Compare June 10, 2026 20:59
@jaydgoss jaydgoss force-pushed the jaygoss/scm-commit-detected-platform branch from d00ee76 to 5f1bc6b Compare June 10, 2026 21:00
@jaydgoss jaydgoss force-pushed the jaygoss/scm-commit-detected-platform branch from 5f1bc6b to 06ba6e8 Compare June 10, 2026 21:09
@jaydgoss jaydgoss force-pushed the jaygoss/scm-create-cta-tooltip branch from 1eb2b61 to 253e3f5 Compare June 10, 2026 21:09
jaydgoss added a commit that referenced this pull request Jun 10, 2026
…d core (#117209)

## TLDR

Splits the SCM onboarding project-details step into a reusable
`useScmProjectDetails` hook plus a presentational
`ScmProjectDetailsCore`, so the SCM-first project-creation flow can
reuse it and place its own Create button. No behavior change; the
existing spec passes unchanged.

## Details

- `useScmProjectDetails` owns the form state, the create-project +
repo-link flow, the reuse ("nothing changed") short-circuit, and the
field/create analytics, routed by an `analyticsFlow` prop. It also
supports a no-access member path (`allowMemberWithoutTeam`), off by
default.
- `ScmProjectDetailsCore` is the presentational name / team /
alert-frequency form. It fires the `step_viewed` analytics when shown
and hides the team selector for no-access members. Keeping the submit
handler in the hook (rather than a render-prop) means each host renders
its own Create button wherever it wants, decoupled from where the fields
render.
- `ScmProjectDetails` (onboarding) is now a thin wrapper: the step
header plus the fixed footer with the Back and Create buttons.

This is the VDY-76 equivalent of the `ScmPlatformFeaturesCore`
extraction (#116624).

## Stack

- **PR 1 (this):** Extract project-details form into a hook and core
- [PR 2](#117325): Keep
getting-started rendered while back nav deletes
- [PR 3](#117333): Drive the
project-details form from host state
- [PR 4](#117213): Wire into
single-view project creation
- [PR 5](#117341): Commit the
auto-detected platform to the host
- [PR 6](#117342): Explain the
disabled Create CTA in the SCM wizard

Refs VDY-76
@jaydgoss jaydgoss force-pushed the jaygoss/scm-commit-detected-platform branch from 06ba6e8 to b8d040a Compare June 10, 2026 21:22
@jaydgoss jaydgoss force-pushed the jaygoss/scm-create-cta-tooltip branch from 253e3f5 to 2a5813d Compare June 10, 2026 21:22
jaydgoss added a commit that referenced this pull request Jun 11, 2026
…#117325)

## TLDR

Keeps the getting-started page rendered when its project disappears from
the projects store mid-session, reserving the not-found redirect for
projects that were never found. This stops the back nav's project
deletion from bouncing to the create-project page without the referrer
and project query params.

## Details

- The back nav from getting-started (`PlatformDocHeader.handleGoBack`)
deletes inactive projects before navigating to the create-project page
tagged with `?referrer=getting-started&project=<id>`. The deletion order
is deliberate: downstream flows rely on the projects store being updated
before they mount (see the equivalent comment in onboarding's
`useBackActions`).
- The DELETE updates the store while getting-started is still mounted,
so its project-not-found fallback fired first and redirected to the
create-project page bare, racing the tagged replace navigation. Classic
project creation tolerates this reactively (see the delayed route
replace regression test in `createProject.spec.tsx`), but the params
still arrive a full request roundtrip late, and the single-view flow in
PR 3 restores a saved wizard session from them, which made the race
visible as a flash of reset state.
- Getting-started now latches the last project found for the current
slug and keeps rendering it if it vanishes from the store, so the only
navigation away is the back nav's own tagged replace. A project deleted
from another tab now leaves the docs page in place instead of bouncing
immediately, which seems less surprising.

## Stack

- [PR 1](#117209): Extract
project-details form into a hook and core (merged)
- **PR 2 (this):** Keep getting-started rendered while back nav deletes
- [PR 3](#117333): Drive the
project-details form from host state
- [PR 4](#117213): Wire into
single-view project creation
- [PR 5](#117341): Commit the
auto-detected platform to the host
- [PR 6](#117342): Explain the
disabled Create CTA in the SCM wizard

Refs VDY-76
@jaydgoss jaydgoss force-pushed the jaygoss/scm-commit-detected-platform branch from b8d040a to 7cf099c Compare June 11, 2026 16:33
@jaydgoss jaydgoss force-pushed the jaygoss/scm-create-cta-tooltip branch from 2a5813d to a9e2871 Compare June 11, 2026 16:33
jaydgoss added a commit that referenced this pull request Jun 11, 2026
)

## TLDR

Makes the SCM project-details hook fully host-driven: the form state
lives with the caller (`projectDetailsForm` plus
`onProjectDetailsFormChange`, where absent fields derive their
defaults), and completion is reported through a single `onComplete`
carrying the created project and the submitted form. Prepares the hook
for the single-view project-creation host, which keeps it mounted across
platform changes and needs clears to actually reach the fields.

## Details

- Previously the hook seeded internal `useState` once at mount from the
host's saved form, an artifact of the step component it was extracted
from, which remounts on every onboarding navigation. A host that stays
mounted (the single-view wizard) could clear its form without the live
fields noticing.
- Controlled now: absent fields fall back to derived defaults
(platform-based name, first admin team, default alert config), so a
cleared form re-derives by construction. Covered by a new regression
test.
- The unchanged-return reuse check compares against the form captured at
mount (a restored session's saved values), since the live prop can no
longer be its own baseline.
- The three completion callbacks (`onProjectCreated`, completion-time
`onProjectDetailsFormChange`, `onComplete`) collapse into one
`onComplete({project, projectDetailsForm})`. On a successful submit they
always fired together, so no host could observe a meaningful
intermediate state. The reuse path now reports the reused project and
form, which match what the host already has.
- The onboarding step holds the live form in local state seeded from the
context, which keeps the context to submitted values only: a step
remount cannot adopt unsubmitted edits as the reuse baseline, and
abandoned edits are discarded on navigation, matching the step's
previous behavior and classic createProject. The completion payload
still flows to the existing context setters, so observable onboarding
behavior is unchanged.

## Stack

- [PR 1](#117209): Extract
project-details form into a hook and core (merged)
- [PR 2](#117325): Keep
getting-started rendered while back nav deletes (merged)
- **PR 3 (this):** Drive the project-details form from host state
- [PR 4](#117213): Wire into
single-view project creation
- [PR 5](#117341): Commit the
auto-detected platform to the host
- [PR 6](#117342): Explain the
disabled Create CTA in the SCM wizard

Refs VDY-76
@jaydgoss jaydgoss force-pushed the jaygoss/scm-commit-detected-platform branch from 7cf099c to fc8e6f1 Compare June 11, 2026 18:15
@jaydgoss jaydgoss force-pushed the jaygoss/scm-create-cta-tooltip branch from a9e2871 to 7541937 Compare June 11, 2026 18:15
@jaydgoss jaydgoss force-pushed the jaygoss/scm-commit-detected-platform branch from fc8e6f1 to 7b6d155 Compare June 12, 2026 15:51
@jaydgoss jaydgoss force-pushed the jaygoss/scm-create-cta-tooltip branch from 7541937 to e307be0 Compare June 12, 2026 15:51
jaydgoss added a commit that referenced this pull request Jun 12, 2026
… creation (#117213)

## TLDR

Wires the SCM project-details form into the single-view project-creation
flow: a Project details section plus an always-present, page-level
Create CTA that creates the project and navigates to its getting-started
page. Includes parity with classic project creation for members with no
admin team. Messaging-integration alerts are deferred to VDY-50.

## Details

- Drives the Project details section with `useScmProjectDetails` and the
presentational `ScmProjectDetailsCore`.
- The Create CTA is a page-level footer, available regardless of which
steps are currently revealed (disabled until a platform and details are
ready), alongside `ProjectCreationErrorAlert`.
- Adds `projectDetailsForm` to the wizard state and clears it when the
platform or repository changes (resolving the two standing TODOs).
- On success, navigates to the created project's getting-started page
via `makeProjectsPathname`.
- In-progress wizard state is in-memory, so a fresh visit or reload
starts clean. A completed session is snapshotted to session storage when
the project is created and restored when returning from its
getting-started page, with the return condition computed reactively from
the `referrer`/`project` query params (mirroring classic `createProject`
autofill) since the back nav can deliver them after mount.
- On a restored return, clicking Create with nothing changed reuses the
existing project instead of creating a duplicate; any edit abandons it
and creates a new one, matching legacy onboarding.
- `allowMemberWithoutTeam`: when the viewer has no admin team and can't
create one, the team selector is hidden and the project is created with
no team (backend assigns one), matching classic `createProject`. Off in
onboarding.

## Stack

- [PR 1](#117209): Extract
project-details form into a hook and core (merged)
- [PR 2](#117325): Keep
getting-started rendered while back nav deletes (merged)
- [PR 3](#117333): Drive the
project-details form from host state
- **PR 4 (this):** Wire into single-view project creation
- [PR 5](#117341): Commit the
auto-detected platform to the host
- [PR 6](#117342): Explain the
disabled Create CTA in the SCM wizard

Refs VDY-76
@jaydgoss jaydgoss force-pushed the jaygoss/scm-commit-detected-platform branch from 7b6d155 to e3e49d2 Compare June 12, 2026 17:46
@jaydgoss jaydgoss force-pushed the jaygoss/scm-create-cta-tooltip branch from e307be0 to 637f60f Compare June 12, 2026 17:46
@jaydgoss jaydgoss marked this pull request as ready for review June 12, 2026 17:59
jaydgoss added a commit that referenced this pull request Jun 15, 2026
## TLDR

The single-view SCM project creation wizard revealed the Platform &
features and Project details sections only after the repo step was
completed. This shows all sections up front so the whole form is visible
immediately, and removes the progressive-disclosure state that drove the
reveal.

## Details

Previously `repoStepCompleted` gated sections 2 and 3, flipping true
when a repo was selected or the user clicked "Continue without
connecting a repo". With everything visible at once that scaffolding is
no longer needed, so this removes the `repoStepCompleted` wizard state
and its initial value, the `showAllSteps` and `showContinueWithoutRepo`
derived flags, the `completeRepoStep` handler and the "Continue without
connecting a repo" button, and the now-unused `Fragment` and
`MotionFlex`.

Connecting a repo stays optional. The page-level Create CTA still
validates platform, name, and team, so submission behavior is unchanged.

Tests now assert all sections render on a fresh visit, and verify the
persisted-session restore by field value rather than by section
visibility.

## Notes

This branches from master and is independent of the open stack PRs
#117341 and #117342, which also touch `scmCreateProject.tsx`. Whichever
lands first, the other will need a rebase to resolve overlap in the CTA
and section regions.

One cosmetic follow-up left out of scope: the first section's heading
still reads "Create a new project" (duplicating the page title) above
the repo-connect step, which is a little odd now that all steps show
together.

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
@jaydgoss jaydgoss force-pushed the jaygoss/scm-commit-detected-platform branch from e3e49d2 to 5eadafc Compare June 15, 2026 21:23
@jaydgoss jaydgoss force-pushed the jaygoss/scm-create-cta-tooltip branch from f298e77 to c06661d Compare June 15, 2026 21:32
@jaydgoss jaydgoss requested a review from a team June 16, 2026 18:58
jaydgoss added a commit that referenced this pull request Jun 18, 2026
## TLDR

Commits the auto-detected platform to the host in the platform-features
core instead of only deriving it for display. In the single-view
project-creation flow there is no Continue boundary to commit it later,
so accepting the detected platform left the wizard without a platform:
the project name never defaulted and the Create CTA stayed disabled.

## Details

- The core rendered `selectedPlatform?.key ?? detectedPlatformKey` but
only called `onPlatformChange` on explicit picks. The onboarding step
compensates with a fallback commit in its Continue handler; the
single-view flow has no equivalent, so detection-only sessions never
populated `selectedPlatform`.
- The commit now happens in the same once-per-repo effect that fires the
`scm_platform_selected` analytics, with the same guards: skipped when
the user already picked, re-armed on repo change. It does not call
`onClearProjectDetailsForm`, so a restored form is not cleared.
- The onboarding step's fallback commit becomes a no-op and stays as
belt and braces.

## Stack

- [PR 1](#117209): Extract
project-details form into a hook and core (merged)
- [PR 2](#117325): Keep
getting-started rendered while back nav deletes (merged)
- [PR 3](#117333): Drive the
project-details form from host state
- [PR 4](#117213): Wire into
single-view project creation
- **PR 5 (this):** Commit the auto-detected platform to the host
- [PR 6](#117342): Explain the
disabled Create CTA in the SCM wizard

Refs VDY-76
Base automatically changed from jaygoss/scm-commit-detected-platform to master June 18, 2026 17:28
jaydgoss added 2 commits June 18, 2026 12:30
The page-level Create button disabled silently when required fields
were missing. Expose the missing fields from useScmProjectDetails and
wrap the CTA in a tooltip naming the missing field, or a summary when
several are missing, mirroring classic createProject's submit tooltip.
Transient blockers like loading stores or an in-flight create show no
message.
The disabled Create CTA tooltip could read "Please select a team" while
teams were still loading, because teamSlugResolved is empty until
firstAdminTeam resolves. That contradicts the intent that transient
blockers (stores loading, create in flight) surface no message.

Add !isLoadingTeams to the missingFields.team check so the team isn't
reported missing during loading. canSubmit already gates on
!isLoadingTeams independently, so submission behavior is unchanged.
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