Skip to content

fix(Onboarding): Keep new users on the flow they were assigned - #9017

Draft
talissoncosta wants to merge 3 commits into
mainfrom
fix/onboarding-sticky-entry-variant
Draft

talissoncosta wants to merge 3 commits into
mainfrom
fix/onboarding-sticky-entry-variant

Conversation

@talissoncosta

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Session replays showed new users on "Create your organisation" and then the new onboarding, ending with two organisations.

Cause: a reload before onboarding has created the organisation logs in again without isGettingStarted, so a single_page user is sent to /create. Submitting it opens onboarding, which reads a stale organisation list and creates a second one.

  • The stored variant now wins over a new decision, so the user stays on the flow they were assigned.
  • Onboarding waits for the organisation list to finish refetching before creating one.
  • The onboarding_variant trait is sent at the decision for both arms. It was set on /getting-started, which control users only reach after /create, so control drop-offs there were never labelled.

Doesn't change bucketing, exposure or the control flow.

How did you test this code?

  • Unit tests for resolveOnboardingVariant.
  • New E2E test that pins the variant, reloads before the organisation exists and expects to stay on onboarding. Ran locally: fails on main (lands on "Create your organisation"), passes here. It has its own E2E user, added to the API settings and teardown.
  • Manually in Chrome against a local API, with the variant pinned:
    • Control signup: /create, then the legacy page, one organisation, trait sent before /create.
    • single_page signup with a reload before the organisation exists: stays on onboarding, one organisation.
    • Existing user with no organisation: /create, no trait.
  • The trait arriving in Amplitude (it's off locally).

talissoncosta and others added 2 commits November 19, 2026 09:29
A reload before onboarding had created the organisation logged in again
without isGettingStarted, so a single_page user was sent to /create.
Submitting it opened the onboarding flow, which read a stale organisation
list and created a second organisation.

Route by the stored variant when there is one, and wait for the
organisation list to finish refetching before onboarding creates one.
The E2E test pins the variant so it runs whatever the flag is set to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The onboarding_variant trait was set on /getting-started. Single-page
users reach it straight after signup, but control users only after
/create, so control users who left on /create were never labelled.
Set it where the variant is resolved instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
flagsmith-frontend-preview Ready Ready Preview Nov 19, 2026 1:01pm UTC
2 Skipped Deployments
Project Deployment Actions Updated
docs Ignored Ignored Preview Nov 19, 2026 1:01pm UTC
flagsmith-frontend-staging Ignored Ignored Preview Nov 19, 2026 1:01pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added front-end Issue related to the React Front End Dashboard api Issue related to the REST API fix labels Nov 19, 2026
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.92%. Comparing base (7ec6a0e) to head (1921d73).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9017   +/-   ##
=======================================
  Coverage   98.92%   98.92%           
=======================================
  Files        1713     1713           
  Lines       72566    72566           
=======================================
  Hits        71789    71789           
  Misses        777      777           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch was successfully deployed

1 active (outdated) deployment
Preview – flagsmith-frontend-staging — fd3b40f8 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API fix front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant