Skip to content

fix(onboarding): Harden SCM project creation against duplicates#113111

Draft
jaydgoss wants to merge 1 commit intojaygoss/ref-onboarding-context-persist-form-statefrom
jaygoss/fix-scm-onboarding-project-gaps
Draft

fix(onboarding): Harden SCM project creation against duplicates#113111
jaydgoss wants to merge 1 commit intojaygoss/ref-onboarding-context-persist-form-statefrom
jaygoss/fix-scm-onboarding-project-gaps

Conversation

@jaydgoss
Copy link
Copy Markdown
Member

@jaydgoss jaydgoss commented Apr 15, 2026

Handle the case where a user navigates back from setup-docs after the project
has already received events (so it was not deleted by useBackActions). Uses
persisted form state from the onboarding context for the read side, and a
simple existence check via the projects store as a safety net.

  • Platform changed: abandon old project, create new (matching legacy behavior)
  • No changes: reuse existing project as-is
  • Name/team changed: update existing project in place via PUT

Also guard the Create button against teams and projects still loading so the
existence check cannot be bypassed by a race.

PR stack:

  • PR 1: Context refactor -- persist form state
  • PR 2 (this): Gap fixes for SCM project creation
  • PR 3: VDY-82 feature flag gating

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 15, 2026
@jaydgoss jaydgoss force-pushed the jaygoss/fix-scm-onboarding-project-gaps branch from 397f062 to d3a87b1 Compare April 15, 2026 20:44
@jaydgoss jaydgoss force-pushed the jaygoss/fix-scm-onboarding-project-gaps branch from d3a87b1 to a4e6b6a Compare April 15, 2026 20:48
@jaydgoss jaydgoss force-pushed the jaygoss/fix-scm-onboarding-project-gaps branch from a4e6b6a to 444985a Compare April 15, 2026 21:18
@jaydgoss jaydgoss force-pushed the jaygoss/fix-scm-onboarding-project-gaps branch from 444985a to 5b45390 Compare April 15, 2026 21:21
@jaydgoss jaydgoss force-pushed the jaygoss/fix-scm-onboarding-project-gaps branch from c67bae3 to d453e09 Compare April 15, 2026 22:41
@jaydgoss jaydgoss changed the base branch from master to jaygoss/ref-onboarding-context-persist-form-state April 15, 2026 22:41
@jaydgoss jaydgoss force-pushed the jaygoss/fix-scm-onboarding-project-gaps branch from d453e09 to 6579666 Compare April 15, 2026 22:46
@jaydgoss jaydgoss force-pushed the jaygoss/fix-scm-onboarding-project-gaps branch from 6579666 to 8d87891 Compare April 15, 2026 23:00
@jaydgoss jaydgoss force-pushed the jaygoss/fix-scm-onboarding-project-gaps branch from 8d87891 to 3529183 Compare April 15, 2026 23:11
@jaydgoss jaydgoss force-pushed the jaygoss/fix-scm-onboarding-project-gaps branch from 3529183 to b349eb1 Compare April 15, 2026 23:13
@jaydgoss jaydgoss force-pushed the jaygoss/fix-scm-onboarding-project-gaps branch from b349eb1 to 07d66a1 Compare April 15, 2026 23:16
@jaydgoss jaydgoss force-pushed the jaygoss/fix-scm-onboarding-project-gaps branch from 07d66a1 to 0c9ada8 Compare April 15, 2026 23:19
@jaydgoss jaydgoss force-pushed the jaygoss/fix-scm-onboarding-project-gaps branch from 0c9ada8 to 1620994 Compare April 15, 2026 23:47
@jaydgoss jaydgoss force-pushed the jaygoss/ref-onboarding-context-persist-form-state branch from f1ef345 to 63dffeb Compare April 15, 2026 23:55
When the user navigates back from setup-docs after the project has
already received events, the project is not deleted. Handle this by
detecting the existing project via createdProjectSlug and persisted
form state:

- Platform changed: abandon old project, create new (matching legacy)
- No changes: reuse existing project as-is
- Name/team changed: update existing project in place via PUT

Also guard the Create button against teams and projects still loading
so the existence check cannot be bypassed by a race.
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