Skip to content

Add trackExpensesWithConcierge onboarding RHP variant - #85762

Merged
dangrous merged 35 commits into
mainfrom
claude-trackOnboardingHomeConcierge
Apr 14, 2026
Merged

dangrous merged 35 commits into
mainfrom
claude-trackOnboardingHomeConcierge

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Mar 19, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Adds the trackExpensesWithConcierge onboarding RHP variant for Track workspace admins. When the backend sets this variant, Track-intent admins (newDotTrackWorkspace) will:

  • Desktop: Land on the Home page with the Concierge side panel open showing onboarding tasks
  • Mobile: Navigate directly to the Concierge DM chat (which contains onboarding tasks)

Unlike the existing RHP variants (which require micro company size), this variant applies regardless of company size.

The Concierge welcome message for Track users displays:

Welcome to Expensify
Hi! I'm Concierge, your personal financial assistant. To make the most of your 30-day free trial, just follow the remaining setup steps below!

With exactly 3 onboarding tasks:

  • Take a test drive
  • Create your first report
  • Set up categories

Note: Task parentReportID for Track workspace users already points to the Concierge DM (existing behavior in isPostingTasksInAdminsRoom), so onboarding tasks already appear in the Concierge chat — no change needed there.

Fixed Issues

$ #85226

Tests

  1. Set the ONBOARDING_RHP_VARIANT NVP to trackExpensesWithConcierge for a new Track workspace admin
  2. Complete the guided setup flow with newDotTrackWorkspace choice
  3. Desktop: Verify the user lands on the Home page with the Concierge side panel open
  4. Verify the Concierge message shows "Welcome to Expensify" and "Hi! I'm Concierge, your personal financial assistant..."
  5. Verify only 3 onboarding tasks appear: Take a test drive, Create your first report, Set up categories
  6. Mobile: Verify the user lands in the Concierge DM chat with the same tasks
  7. Verify existing RHP variants (rhpConciergeDm, rhpAdminsRoom, rhpHomePage) still work as before (still gated by micro company size)
  8. Verify control variant still navigates to last accessed report / Home as before
  • Verify that no errors appear in the JS console

Offline tests

N/A — This change only affects post-onboarding navigation, which happens after an API response.

QA Steps

  1. Create a new account and select Track workspace during onboarding
  2. Ensure the backend assigns trackExpensesWithConcierge as the RHP variant
  3. Desktop: After completing onboarding, verify the Home page loads with the Concierge side panel open showing "Welcome to Expensify" message and 3 onboarding tasks
  4. Mobile: After completing onboarding, verify the Concierge DM chat opens with the same message and tasks
  5. Verify other onboarding variants (manage team, existing RHP experiments) are unaffected
  • 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 any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • 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 shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • 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)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • 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)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • 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.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • 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

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Track workspace admins land on Home page with Concierge side panel
(desktop) or Concierge DM chat (mobile) for onboarding tasks.

Co-authored-by: Jayesh Mangwani <jayeshmangwani@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team March 19, 2026 11:21
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I created this PR from an upstream branch since I don't have push access to your fork.

To take ownership of this branch and be able to push updates, run:

git remote add upstream https://github.com/Expensify/App.git
git fetch upstream claude-trackOnboardingHomeConcierge
git checkout -b claude-trackOnboardingHomeConcierge upstream/claude-trackOnboardingHomeConcierge
git push -u origin claude-trackOnboardingHomeConcierge

Then you can close this PR and open a new one from your fork.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

The failing check is unrelated to this PR.

Analysis: The only failing check is test (job 8), where 2 tests fail in tests/unit/canEditFieldOfMoneyRequestTest.ts:

  • should return true for submitter of a distance request for amount and currency fields (line 215)
  • should return true for submitter when there are multiple outstanding reports (line 231)

This PR only modifies onboarding RHP variant files (src/CONST/index.ts, src/components/SidePanel/RHPVariantTest/index.ts, src/libs/navigateAfterOnboarding.ts, src/types/onyx/OnboardingRHPVariant.ts) — none of which are related to the canEditFieldOfMoneyRequest logic in src/libs/ReportUtils.ts.

Evidence:

  • The test file and source function (canEditFieldOfMoneyRequest) are identical between the PR branch and main
  • The same test passed on main on March 18 (run 23226563794)
  • This appears to be a flaky/intermittent test failure unrelated to the PR changes

Retrying the CI run should resolve this.

@jayeshmangwani

Copy link
Copy Markdown
Contributor

@MelvinBot merge main and fix conflicts.

Resolved conflicts in CONST/index.ts, RHPVariantTest/index.ts, and
OnboardingRHPVariant.ts to preserve the trackExpensesWithConcierge
variant additions while incorporating upstream changes.

Co-authored-by: Jayesh Mangwani <jayeshmangwani@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Merged main and resolved conflicts in:

  • src/CONST/index.ts — kept the new RHP_HOME_PAGE and TRACK_EXPENSES_WITH_CONCIERGE entries
  • src/components/SidePanel/RHPVariantTest/index.ts — preserved the variantOverride parameter and Track/Home navigation logic
  • src/components/SidePanel/RHPVariantTest/types.ts — restored the variantOverride parameter in type definitions (auto-merge had dropped it)
  • src/types/onyx/OnboardingRHPVariant.ts — kept the expanded union type with rhpHomePage and trackExpensesWithConcierge

MelvinBot and others added 2 commits March 25, 2026 06:36
Co-authored-by: Jayesh Mangwani <jayeshmangwani@users.noreply.github.com>
…com/Expensify/App into claude-trackOnboardingHomeConcierge

Co-authored-by: Jayesh Mangwani <jayeshmangwani@users.noreply.github.com>
@OSBotify

This comment has been minimized.

…matting

Co-authored-by: Jayesh Mangwani <jayeshmangwani@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Fixed the failing checks:

  1. ESLint (no-unused-vars): Removed the inviteAccountantTask variable declaration in OnboardingFlow.ts — it became unused after the task array was trimmed in this PR.
  2. Prettier: Changed double quotes to single quotes for the onboardingTrackWorkspaceMessage string in en.ts (the string uses a Unicode curly apostrophe, so single quotes are safe).

@OSBotify

This comment has been minimized.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

The previous ESLint and Prettier failures were already resolved by the latest commit (6f9f74e). The current CI run shows both checks passing. The remaining checks (tests, typecheck, perf-tests, etc.) are still in progress.

The older test failure in canEditFieldOfMoneyRequestTest.ts from March 19 is unrelated to this PR — none of the files changed here affect that test.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I have failed to help you. I let you down and for that I am sorry. Please try again later. This may be due to a Claude outage (check here).

Failure details: https://github.com/Expensify/Expensify/actions/runs/23528473149

…rOnboarding

Co-authored-by: Jayesh Mangwani <jayeshmangwani@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Fixed the failing typecheck and test (job 6) checks: onboardingRHPVariant was referenced on line 65 of navigateAfterOnboarding.ts but never declared or connected to Onyx. Added the missing Onyx connection using Onyx.connectWithoutView (same pattern as RHPVariantTest/index.ts) so the variable is available for the mobile Track workspace variant check.

Co-authored-by: Jayesh Mangwani <jayeshmangwani@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Fixed the failing Prettier check: corrected import ordering in navigateAfterOnboarding.ts — react-native-onyx imports need to come before @components imports.

@codecov

codecov Bot commented Mar 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 92.30% <ø> (ø)
src/libs/actions/Welcome/OnboardingFlow.ts 76.41% <ø> (+1.18%) ⬆️
src/libs/actions/Report/index.ts 68.66% <0.00%> (-0.08%) ⬇️
src/libs/navigateAfterOnboarding.ts 70.58% <66.66%> (+0.21%) ⬆️
src/hooks/useAutoCreateTrackWorkspace.ts 59.57% <0.00%> (+3.32%) ⬆️
src/components/SidePanel/RHPVariantTest/index.ts 0.00% <0.00%> (ø)
... and 8 files with indirect coverage changes

@jayeshmangwani

Copy link
Copy Markdown
Contributor

@MelvinBot CompleteGuidedSetup sends the variant value in the response, but the value is undefined inshouldOpenRHPVariant`.

{
        "key": "nvp_onboardingRHPVariant",
        "onyxMethod": "set",
        "value": "trackExpensesWithConcierge"
}
      

The variantOverride parameter was added to shouldOpenRHPVariant and
handleRHPVariantNavigation but no call site was passing it. This caused
the variant to be undefined because the Onyx callback hadn't fired yet
when the functions were called immediately after CompleteGuidedSetup.

Changes:
- Capture completeOnboarding response and extract nvp_onboardingRHPVariant
  in BaseOnboardingInterestedFeatures and useAutoCreateTrackWorkspace
- Thread variantOverride through navigateAfterOnboarding and its
  microtask wrapper
- Fix shouldOpenRHPVariant to use the variant local (which respects the
  override) for all checks, not just TRACK_EXPENSES_WITH_CONCIERGE

Co-authored-by: Jayesh Mangwani <jayeshmangwani@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Good catch! The variantOverride parameter was added to shouldOpenRHPVariant and handleRHPVariantNavigation specifically to avoid this race condition, but no call site was actually passing it — so the functions always fell back to the module-level Onyx variable, which hadn't been updated yet.

Root cause: CompleteGuidedSetup returns nvp_onboardingRHPVariant in response.onyxData, and makeRequestWithSideEffects resolves after Onyx updates are applied. However, Onyx.connectWithoutView callbacks fire asynchronously in a subsequent microtask, so the module-level onboardingRHPVariant variable is still undefined when shouldOpenRHPVariant() is called immediately after.

Fix pushed (4 files):

  1. RHPVariantTest/index.ts — Fixed shouldOpenRHPVariant to use the variant local (which respects the override) for the RHP_CONCIERGE_DM and RHP_ADMINS_ROOM checks too. Previously lines 46-47 used the raw onboardingRHPVariant module variable, ignoring the override for those variants.

  2. navigateAfterOnboarding.ts — Added variantOverride parameter to both navigateAfterOnboarding and navigateAfterOnboardingWithMicrotaskQueue, threaded through to shouldOpenRHPVariant, handleRHPVariantNavigation, and the small-screen TRACK_EXPENSES_WITH_CONCIERGE check.

  3. BaseOnboardingInterestedFeatures.tsx — Captured the completeOnboarding response, extracted nvp_onboardingRHPVariant from response.onyxData, and passed it as variantOverride to navigateAfterOnboardingWithMicrotaskQueue.

  4. useAutoCreateTrackWorkspace.ts — Added shouldWaitForRHPVariantInitialization and await to the completeOnboarding call, extracted the variant from the response, and passed it through. This is the primary Track workspace flow that would receive trackExpensesWithConcierge.

The server response may include onyx keys not present in the request's
optimistic/success/failure data, causing TypeScript to report no overlap.

Co-authored-by: Jayesh Mangwani <jayeshmangwani@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Fixed the failing typecheck: cast update.key to string when comparing against ONYXKEYS.NVP_ONBOARDING_RHP_VARIANT in both useAutoCreateTrackWorkspace.ts and BaseOnboardingInterestedFeatures.tsx. The server response includes this key but it's not in the inferred TKey union from the request's optimistic/success/failure data, causing TypeScript to report no type overlap.

@dangrous

Copy link
Copy Markdown
Contributor

Just pinging here too, when you have a sec please update the copy/translations in this PR to match the ones in this now-closed PR which is more recent (in that respect only - yours is much more accurate in all other parts haha)

@jayeshmangwani

Copy link
Copy Markdown
Contributor

@MelvinBot Please update onboardingTrackWorkspaceMessage with this copy.

onboardingTrackWorkspaceMessage: 'To make the most of your 30-day free trial, follow the remaining steps below:',

@jayeshmangwani

Copy link
Copy Markdown
Contributor

@dangrous, conflicts resolved and comment updated.

@joekaufmanexpensify joekaufmanexpensify 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.

Design doc issue

dangrous
dangrous previously approved these changes Apr 8, 2026

@dangrous dangrous 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.

Alright, let's do it! @dylanexpensify I know we're making a couple changes to the design doc, etc - is it okay to merge this or should we hold?

@dangrous

Copy link
Copy Markdown
Contributor

Getting caught up to speed on our revisions to the design doc today, we might need a few updates to this, sorry!

@dangrous dangrous changed the title Add trackExpensesWithConcierge onboarding RHP variant [HOLD Project Updates] Add trackExpensesWithConcierge onboarding RHP variant Apr 10, 2026
@dangrous

dangrous commented Apr 13, 2026 •

Copy link
Copy Markdown
Contributor

Hey @jayeshmangwani, I think these are the only relevant changes for this PR - can you update for the following:

  • Update the onboarding modal steps to be three steps (work email, intent, personal details) instead of the current 7 steps (work email, intent, personal details, workspace creation, name workspace, invite users, enable features).
    • This results in a much faster onboarding process and removes the potential that they feel the product is more complex than they need.
  • Update where these users land post-onboarding to be the Home page w/ConciergeRHP open w/onboarding tasks.
  • Combine the Workspace welcome message and reduce the tasks to:
    • Take a test drive
    • Create your first report
    • Set up categories

So we're removing the "Create a workspace" task entirely. Navigation I believe is still what you have listed, and then we'll need to cut down the onboarding steps as described. Do you need more details on that? I think we already have a model for different flows through that modal depending on onboarding choices.

EDIT: really autocomplete? not gonna message the person who is assigned to this PR?

@jayeshmangwani

Copy link
Copy Markdown
Contributor

@dangrous , regarding the first section of the comment of cut down the onboarding steps, we are reducing the steps from seven to three. This change applies only to Track Intent users, correct? If so, it has already been implemented, then no additional action is required for the first point of the comment.

@jayeshmangwani

Copy link
Copy Markdown
Contributor

@MelvinBot merge the latest main, remove the Create a workspace (auto-completed) task for Track Intent users, and update the Test section of the PR.

MelvinBot and others added 2 commits April 14, 2026 15:25
…gHomeConcierge

Co-authored-by: Jayesh Mangwani <jayeshmangwani@users.noreply.github.com>
Track Intent users no longer see the "Create a workspace (auto-completed)"
task in their onboarding flow.

Co-authored-by: Jayesh Mangwani <jayeshmangwani@users.noreply.github.com>
@MelvinBot
MelvinBot dismissed stale reviews from dangrous and joekaufmanexpensify via 158ebe1 April 14, 2026 15:27
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Done! Here's what I did:

  1. Merged latest main into the branch
  2. Removed createWorkspaceTask from the Track Intent onboarding tasks in OnboardingFlow.ts — Track users now get 3 tasks instead of 4 (Take a test drive, Create your first report, Set up categories)
  3. Updated the PR description and Test section — removed the "Create a workspace (auto-completed)" task reference and updated task counts from 4 to 3

@dangrous dangrous changed the title [HOLD Project Updates] Add trackExpensesWithConcierge onboarding RHP variant Add trackExpensesWithConcierge onboarding RHP variant Apr 14, 2026
@dangrous

Copy link
Copy Markdown
Contributor

@dangrous , regarding the first section of the comment of cut down the onboarding steps, we are reducing the steps from seven to three. This change applies only to Track Intent users, correct? If so, it has already been implemented, then no additional action is required for the first point of the comment.

Yep! just for track intent, so sounds like we're good to go here once this is tested! I'll review today and we can get moving.

@dangrous
dangrous merged commit 6c818f4 into main Apr 14, 2026
42 checks passed
@dangrous
dangrous deleted the claude-trackOnboardingHomeConcierge branch April 14, 2026 19:59
@github-actions

Copy link
Copy Markdown
Contributor

🚧 @dangrous 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/dangrous in version: 9.3.60-0 🚀

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

Bundle Size Analysis (Sentry):

@MelvinBot

Copy link
Copy Markdown
Contributor Author

After reviewing the PR changes and searching all help site articles under App/docs/articles, no help site updates are required.

The PR modifies internal onboarding behavior (post-onboarding navigation, Concierge welcome message text, and onboarding task list for Track workspace admins). None of the existing help articles document these internals — the closest articles (Track Personal Expenses and Configure a Company Workspace) cover workspace setup steps and general Concierge functionality, but don't reference specific onboarding tasks, Concierge message content, or RHP variant navigation behavior.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.3.60-22 🚀

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

// with the CompleteGuidedSetup response and side panel isn't supported on native.
let rhpVariant: OnboardingRHPVariant | undefined = isSidePanelReportSupported ? undefined : CONST.ONBOARDING_RHP_VARIANT.TRACK_EXPENSES_WITH_CONCIERGE;
try {
const response = await completeOnboarding({

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.

This change introduced a regression, fixed in #89904. While awaiting completeOnboarding here, the user can still click Continue again, so completeOnboarding gets called multiple times and causes the duplicated task.

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