Skip to content

[Payment due @bernhardoj] Update NewDot onboarding employee ranges - #97021

Merged
flodnv merged 9 commits into
Expensify:mainfrom
ShridharGoel:fix/onboarding-company-size-ranges
Sep 21, 2026
Merged

flodnv merged 9 commits into
Expensify:mainfrom
ShridharGoel:fix/onboarding-company-size-ranges

Conversation

@ShridharGoel

@ShridharGoel ShridharGoel commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

NewDot onboarding used the employee ranges 1-4, 5-10, and 11-50, while the OldDot homepage splits users at 9 employees.

This updates the NewDot options to 1-4, 5-9, and 10-50. It also updates the stored company-size values, translations, onboarding comments, and existing test descriptions. The deprecated 1-10 value remains unchanged for saved-data compatibility.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/647670
PROPOSAL:

Tests

  1. Start the NewDot onboarding flow.
  2. Select Manage my team's expenses.
  3. Open the employee-count step.
  4. Verify the options are 1-4, 5-9, 10-50, 51-100, 101-1,000, and More than 1,000 employees.
  5. Start onboarding from the OldDot 1-9 employees option.
  6. Verify NewDot only shows 1-4 and 5-9.
  7. Start onboarding from the OldDot 10+ employees option.
  8. Verify NewDot starts at 10-50.
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

Same as tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

MacOS: Chrome / Safari Screenshot 2026-07-25 at 3 12 36 PM

@melvin-bot

melvin-bot Bot commented Jul 25, 2026

Copy link
Copy Markdown

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx ts-node ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx ts-node ./scripts/generateTranslations.ts --compare-ref main

@ShridharGoel
ShridharGoel marked this pull request as ready for review July 25, 2026 03:50
@ShridharGoel
ShridharGoel requested review from a team as code owners July 25, 2026 03:50
@melvin-bot
melvin-bot Bot requested review from bernhardoj and heyjennahay July 25, 2026 03:50
@melvin-bot

melvin-bot Bot commented Jul 25, 2026

Copy link
Copy Markdown

@bernhardoj Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot removed request for a team July 25, 2026 03:50

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8570a3a13c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/CONST/index.ts Resolved
Persisted onboarding data can still contain 5-10 and 11-50.

Keep both values valid for analytics and experiment classification.

Hide them from new selections.
@codecov

codecov Bot commented Jul 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/CONST/index.ts 91.52% <ø> (ø)
src/libs/getWorkspaceCreatedAnalyticsEvent.ts 100.00% <ø> (ø)
...es/OnboardingEmployees/BaseOnboardingEmployees.tsx 91.52% <100.00%> (+0.14%) ⬆️
src/pages/inbox/HeaderView.tsx 95.10% <100.00%> (ø)
src/components/SidePanel/RHPVariantTest/index.ts 50.00% <0.00%> (-1.52%) ⬇️
... and 16 files with indirect coverage changes

Comment thread src/languages/en.ts Resolved
@ShridharGoel
ShridharGoel requested a review from bernhardoj July 25, 2026 09:39
@bernhardoj

bernhardoj commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome Screenshot 2026-07-25 at 22 45 49
iOS: HybridApp image
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
Screenshot 2026-07-25 at 22 00 39

@melvin-bot melvin-bot Bot changed the title Update NewDot onboarding employee ranges [Payment due @bernhardoj] Update NewDot onboarding employee ranges Jul 25, 2026
@melvin-bot

melvin-bot Bot commented Jul 25, 2026

Copy link
Copy Markdown

🎯 @bernhardoj, thanks for reviewing and testing this PR! 🎉

A payment issue will be created for your review once this PR is deployed to production.
E/E issue linked to the PR - https://www.github.com/Expensify/Expensify/issues/647670.

If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created.

@ShridharGoel
ShridharGoel requested a review from flodnv July 28, 2026 04:29
Comment thread src/pages/inbox/HeaderView.tsx Outdated
!!canUserPerformWriteAction(report, isReportArchived) &&
!isChatThread &&
introSelected?.companySize !== CONST.ONBOARDING_COMPANY_SIZE.MICRO &&
introSelected?.companySize !== CONST.ONBOARDING_COMPANY_SIZE.LEGACY_MICRO &&

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.

Shouldn't we compare against the 4 values here? The 2 existing and the 2 legacy?

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.

I think I can help answer this. So, we previously used CONST.ONBOARDING_COMPANY_SIZE.MICRO here. MICRO value is 1-10, and this value is unchanged in this PR; it's just the name renamed to be prefixed with LEGACY_. So, the logic stays identical.

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.

Oh I see. So shouldn't this look at the new 1-9 values here? Specifically, why aren't we adding MICRO_MEDIUM to these conditions?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe because we are now showing the guide booking options for 5+ company size?

@trjExpensify Any idea?

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.

Yeah, I bet that's it. I believe before we didn't assign a guide to anyone that selected the 1-9 signUpQualifier on the homepage, but @MitchExpensify I believe led an initiative to change that and start assigning one to 5+, so this had to be split out.

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.

Yeah.

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.

Probably separate to this PR, but I'm somewhat surprised this code block doesn't have logic about if the deal is marked as won. Am I right in thinking that the "Book a call" button to book time on a Guide's calendar shows forever?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should LEGACY_MICRO keep showing the webinar option?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes the button isn't dependent on any deal status (is that even available on the frontend?)

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.

Should LEGACY_MICRO keep showing the webinar option?

Yeah, that appears to be what we showed to 1-10 prior to this, so continuing to show that instead of showing nothing makes sense.

Yes the button isn't dependent on any deal status (is that even available on the frontend?)

Not sure, it's the wonTimestamp in the assignedGuide NVP IIRC. You can take this to Slack and tag someone like Mitch from Sales to understand what's going on here. It's NAB for this PR though as it seems like an implementation detail missed (or there's some other way the Book a call button is removed when the deal is won) with this feature whenever it was added.

const isChatUsedForOnboarding = isChatUsedForOnboardingReportUtils(report, onboarding, conciergeReportID, onboardingPurposeSelected);
const shouldShowRegisterForWebinar =
(introSelected?.companySize === CONST.ONBOARDING_COMPANY_SIZE.MICRO || introSelected?.companySize === CONST.ONBOARDING_COMPANY_SIZE.MICRO_SMALL) &&
(introSelected?.companySize === CONST.ONBOARDING_COMPANY_SIZE.LEGACY_MICRO || introSelected?.companySize === CONST.ONBOARDING_COMPANY_SIZE.MICRO_SMALL) &&

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.

Same question

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.

Bump. It looks to me like the same problem exists here. Aren't we missing at least 1 value?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

MICRO_MEDIUM (5-9) is intentionally excluded because those users get the guide booking button, not the webinar

@melvin-bot

melvin-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx bun ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx bun ./scripts/generateTranslations.ts --compare-ref main

@ShridharGoel
ShridharGoel requested a review from flodnv September 11, 2026 10:27
.filter((size) => {
// Always hide the deprecated 1-10 option.
if (size === CONST.ONBOARDING_COMPANY_SIZE.MICRO) {
// Always hide deprecated options.

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.

Resumed onboarding can continue with no visible selection. BaseOnboardingEmployees hides legacy 5-10 and 11-50 values, but the component initializes its selection from the persisted Onyx value. A user who selected either range before updating sees no selected option, yet can press Continue and submit the hidden legacy value. Clear invalid legacy selections on load (requiring a new selection) or render the persisted legacy selection.

Does this matter? 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not really, very specific scenario - looks like it will happen if a user drops after selecting the company size before this is deployed

@melvin-bot

melvin-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

I could not review this diff, so I did not approve the workflow runs. An Expensify employee will review it and approve them manually.

@flodnv
flodnv merged commit 2ed57af into Expensify:main Sep 21, 2026
35 of 36 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 flodnv has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/flodnv in version: 9.4.91-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 No help site changes are required for this PR, so I didn't create a docs PR.

This PR only changes in-app onboarding option labels (5-10 → 5-9, 11-50 → 10-50) plus the underlying constants, translations, and tests. Nothing under App/docs/articles documents the employee-count step or its ranges, so there is nothing to update.

How I verified this

What the PR changes

  • src/languages/en.ts:3474 — the visible options under How many employees do you have? become 1-4 employees, 5-9 employees, 10-50 employees, 51-100 employees, 101-1,000 employees, More than 1,000 employees. The old 5-10, 1-10, and 11-50 strings are kept only as LEGACY_* keys for saved data.
  • The remaining changes are constants, the other 11 locale files, analytics, and test descriptions.

Searches across the help site (all returned nothing)

  • 11-50, 5-10 employees, 1-10 employees, 1-4 employees, 51-100, 101-1,000 across the whole docs/ tree
  • how many employees, number of employees, company size, employee count, employee range across docs/articles

The only article that mentions the onboarding questionnaire at all is docs/articles/new-expensify/getting-started/Submit-Workspace.md:29, and it references only What do you want to do today? — not the employee-count step. Editing it would mean documenting a step the help site has deliberately never covered, which is out of scope for this PR.


ShridharGoel, there is no linked help site PR to review because no article needs updating. If you'd like the onboarding questionnaire documented on the help site as new content, reply with @MelvinBot and I'll draft it.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/lakchote in version: 9.4.91-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

@melvin-bot

melvin-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

🤖 Payment issue created: #101975

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants