Skip to content

Optimistically create welcome message - #74480

Merged
mountiny merged 15 commits into
Expensify:mainfrom
software-mansion-labs:jnowakow/67494-optimistically-create-welcome-message
Nov 26, 2025
Merged

mountiny merged 15 commits into
Expensify:mainfrom
software-mansion-labs:jnowakow/67494-optimistically-create-welcome-message

Conversation

@jnowakow

@jnowakow jnowakow commented Nov 6, 2025 •

Copy link
Copy Markdown
Contributor

Explanation of Change

The problem was that during onboarding we create 8 actions. 1st action ("Hey there, I'm your Expensify setup specialist...") was created on backend as a result of AddComment command which was forwarded by CreateWorkspace. Since it was forwarded command, created action wasn't immediately received by App and it wasn't aware of new it. Right after CreateWorkspace command, CompleteGuidedSetup was called. This command created actions 2-8 in the optimistic way. They were displayed before call to backend finished. When response arrived with last onyx update number, App recognised it missed updates generated by AddComment and fetched them. Thanks to that, 1st ("Hey there, I'm your Expensify setup specialist...") action was fetched and added to the list but it caused UI to flicker.

image

And after my changes there's no AddComment and all 8 actions are created optimistically by App meaning they are displayed at the same time. On the scheme it looks like this:

image

Fixed Issues

$ #67494
PROPOSAL: N/A

Tests

  1. Sign in with new email (without +)

  2. Select "Manage my team's expenses"

  3. Finish onboarding

  4. Verify that welcome message and tasks are created in correct order

  5. Sign in with new email

  6. Select "Something else"

  7. Finish onboarding

  8. Go to workspace tab

  9. Create new workspace

  10. Go to admins chat

  11. Verify that welcome message and tasks are created in correct order

  12. Sign in with new email

  13. Select "Track and budget expenses"

  14. Create workspace

  15. Finish onboarding

  16. Verify that welcome message and tasks are created in correct order

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • 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
    • MacOS: Desktop
  • 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 verified there are no new alerts related to the canBeMissing param for useOnyx
  • 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

https://github.com/user-attachments/assets/6a6f8f71-fff9-4d51-9bf9-a7d012ee5b08
https://github.com/user-attachments/assets/abfac549-592a-42c0-b4e1-0138b4cdea4b
https://github.com/user-attachments/assets/95bb823f-f9d6-467d-8fce-d08080d9e4d3

MacOS: Desktop

@jnowakow
jnowakow requested review from a team as code owners November 6, 2025 13:34
@melvin-bot
melvin-bot Bot requested a review from akinwale November 6, 2025 13:34
@jnowakow
jnowakow marked this pull request as draft November 6, 2025 13:34
@melvin-bot
melvin-bot Bot removed the request for review from a team November 6, 2025 13:34
@melvin-bot

melvin-bot Bot commented Nov 6, 2025

Copy link
Copy Markdown

@akinwale 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 requested review from heyjennahay and removed request for a team November 6, 2025 13:34
@codecov

codecov Bot commented Nov 6, 2025 •

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/libs/ReportUtils.ts 74.22% <100.00%> (-0.05%) ⬇️
src/libs/actions/Policy/Policy.ts 33.66% <100.00%> (+0.05%) ⬆️
src/libs/actions/Welcome/OnboardingFlow.ts 70.27% <100.00%> (+1.69%) ⬆️
...estedFeatures/BaseOnboardingInterestedFeatures.tsx 1.47% <ø> (ø)
...nfirmation/BaseOnboardingWorkspaceConfirmation.tsx 2.50% <ø> (ø)
... and 49 files with indirect coverage changes

Comment thread src/libs/ReportUtils.ts Resolved
@melvin-bot

melvin-bot Bot commented Nov 13, 2025

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

@jnowakow
jnowakow requested a review from mountiny November 13, 2025 16:13
@jnowakow
jnowakow marked this pull request as ready for review November 13, 2025 16:13
Comment thread src/languages/en.ts Resolved
@jnowakow jnowakow changed the title Optimistically create welcome message [Hold for https://github.com/Expensify/Auth/pull/18037] Optimistically create welcome message Nov 14, 2025
@jnowakow jnowakow changed the title [Hold for https://github.com/Expensify/Auth/pull/18037] Optimistically create welcome message [Hold for https://github.com/Expensify/Web-Expensify/pull/49368] Optimistically create welcome message Nov 18, 2025
@jnowakow jnowakow changed the title [Hold for https://github.com/Expensify/Web-Expensify/pull/49368] Optimistically create welcome message Optimistically create welcome message Nov 20, 2025
@OSBotify

Copy link
Copy Markdown
Contributor

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/de.ts b/src/languages/de.ts
index 84447ba0..8567d6e7 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -2682,12 +2682,20 @@ ${
         messages: {
             onboardingEmployerOrSubmitMessage: 'Erstattungen zu erhalten ist so einfach wie eine Nachricht zu senden. Lass uns die Grundlagen durchgehen.',
             onboardingPersonalSpendMessage: 'So verfolgst du deine Ausgaben mit nur wenigen Klicks.',
-            onboardingManageTeamMessage: dedent(`
-                # Deine kostenlose Testversion hat begonnen! Lass uns dich einrichten.
-                👋 Hallo! Ich bin dein Expensify-Einrichtungsspezialist. Da du einen Workspace erstellt hast, nutze deine 30-tägige kostenlose Testversion optimal, indem du die folgenden Schritte befolgst!
-            `),
-            onboardingTrackWorkspaceMessage:
-                '# Lass uns loslegen\n👋 Ich helfe dir! Ich habe deine Workspace-Einstellungen für Einzelunternehmer und ähnliche Unternehmen angepasst. Du kannst sie über den folgenden Link anpassen!\n\nSo verfolgst du deine Ausgaben mit nur wenigen Klicks:',
+            onboardingManageTeamMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? dedent(`
+                        # Deine kostenlose Testphase hat begonnen! Lass uns dich einrichten.
+                        👋 Hey, ich bin dein Expensify-Setup-Spezialist. Ich habe bereits einen Arbeitsbereich erstellt, um die Belege und Ausgaben deines Teams zu verwalten. Um das Beste aus deiner 30-tägigen kostenlosen Testphase herauszuholen, befolge einfach die restlichen Einrichtungsschritte unten!
+                    `)
+                    : dedent(`
+                        # Deine kostenlose Testphase hat begonnen! Lass uns dich einrichten.
+                        👋 Hey, ich bin dein Expensify-Einrichtungsspezialist. Da du jetzt einen Arbeitsbereich erstellt hast, nutze deine 30-tägige kostenlose Testphase bestmöglich, indem du die folgenden Schritte befolgst!
+                    `),
+            onboardingTrackWorkspaceMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? '# Legen wir mit der Einrichtung los\n👋 Hey! Ich bin dein Expensify-Einrichtungsspezialist. Ich habe bereits einen Workspace erstellt, um deine Belege und Ausgaben zu verwalten. Um das Beste aus deiner 30-tägigen kostenlosen Testversion herauszuholen, folge einfach den verbleibenden Einrichtungsschritten unten!'
+                    : '# Legen wir los\n👋 Ich bin hier, um zu helfen! Für den Start habe ich die Einstellungen Ihres Arbeitsbereichs für Einzelunternehmer und ähnliche Unternehmen angepasst. Sie können Ihren Arbeitsbereich über den untenstehenden Link anpassen!\n\nSo verfolgen Sie Ihre Ausgaben in wenigen Klicks:',
             onboardingChatSplitMessage: 'Rechnungen mit Freunden zu teilen ist so einfach wie eine Nachricht zu senden. So funktioniert’s.',
             onboardingAdminMessage: 'Lerne, wie du den Workspace deines Teams als Admin verwaltest und eigene Ausgaben einreichst.',
             onboardingLookingAroundMessage:
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index fbb0da05..2fa152ca 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -2682,12 +2682,20 @@ ${
         messages: {
             onboardingEmployerOrSubmitMessage: 'Se faire rembourser est aussi simple que d’envoyer un message. Voici les bases.',
             onboardingPersonalSpendMessage: 'Voici comment suivre vos dépenses en quelques clics.',
-            onboardingManageTeamMessage: dedent(`
-                Votre essai gratuit a commencé ! Passons à la configuration.
-                👋 Salut ! Je suis votre spécialiste de configuration Expensify. Maintenant que vous avez créé un espace de travail, profitez au maximum de votre essai gratuit de 30 jours en suivant les étapes ci-dessous !
-            `),
-            onboardingTrackWorkspaceMessage:
-                '# Configurons votre espace\n👋 Je suis là pour vous aider ! J’ai personnalisé votre espace pour les entrepreneurs individuels et entreprises similaires. Vous pouvez le modifier via le lien ci-dessous.\n\nVoici comment suivre vos dépenses rapidement :',
+            onboardingManageTeamMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? dedent(`
+                        # Votre essai gratuit a commencé ! Passons à la configuration.
+                        👋 Bonjour, je suis votre spécialiste de configuration Expensify. J’ai déjà créé un espace de travail pour aider à gérer les reçus et les dépenses de votre équipe. Pour tirer le meilleur parti de votre essai gratuit de 30 jours, suivez simplement les étapes de configuration restantes ci-dessous !
+                    `)
+                    : dedent(`
+                        # Votre période d’essai a commencé ! Passons à la configuration.
+                        👋 Bonjour, je suis votre spécialiste de configuration Expensify. Maintenant que vous avez créé un espace de travail, profitez au maximum de votre essai gratuit de 30 jours en suivant les étapes ci-dessous !
+                    `),
+            onboardingTrackWorkspaceMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? "# Procédons à la configuration\n👋 Salut ! Je suis votre spécialiste de configuration Expensify. J'ai déjà créé un espace de travail pour vous aider à gérer vos reçus et vos dépenses. Pour tirer le meilleur parti de votre essai gratuit de 30 jours, suivez simplement les étapes de configuration restantes ci-dessous !"
+                    : '# Commençons votre configuration\n👋 Je suis là pour vous aider ! Pour vous lancer, j’ai adapté les paramètres de votre espace de travail pour les entrepreneurs individuels et les entreprises similaires. Vous pouvez ajuster votre espace de travail en cliquant sur le lien ci-dessous !\n\nVoici comment suivre vos dépenses en quelques clics :',
             onboardingChatSplitMessage: 'Partager des dépenses entre amis est aussi simple qu’un message. Voici comment faire.',
             onboardingAdminMessage: 'Apprenez à gérer l’espace de votre équipe en tant qu’admin et soumettez vos propres dépenses.',
             onboardingLookingAroundMessage:
diff --git a/src/languages/it.ts b/src/languages/it.ts
index a7d602ce..a8cf7a6b 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -2668,12 +2668,20 @@ ${
         messages: {
             onboardingEmployerOrSubmitMessage: 'Ricevere un rimborso è facile come inviare un messaggio. Vediamo le basi.',
             onboardingPersonalSpendMessage: 'Ecco come monitorare le tue spese in pochi clic.',
-            onboardingManageTeamMessage: dedent(`
-                # La tua prova gratuita è iniziata! Iniziamo con la configurazione.
-                👋 Ciao! Sono il tuo specialista per la configurazione di Expensify. Ora che hai creato uno spazio di lavoro, sfrutta al massimo la tua prova gratuita di 30 giorni seguendo i passaggi qui sotto!
-            `),
-            onboardingTrackWorkspaceMessage:
-                '# Iniziamo\n👋 Sono qui per aiutarti! Per iniziare, ho personalizzato le impostazioni dello spazio di lavoro per ditte individuali e aziende simili. Puoi modificarle cliccando il link qui sotto!\n\nEcco come monitorare le tue spese in pochi clic:',
+            onboardingManageTeamMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? dedent(`
+                        # La tua prova gratuita è iniziata! Iniziamo con la configurazione.
+                        👋 Ciao! Sono il tuo specialista di configurazione Expensify. Ho già creato uno spazio di lavoro per aiutarti a gestire le ricevute e le spese del tuo team. Per sfruttare al massimo la tua prova gratuita di 30 giorni, segui semplicemente i passaggi di configurazione rimanenti qui sotto!
+                    `)
+                    : dedent(`
+                        # La tua prova gratuita è iniziata! Procediamo con la configurazione.
+                        👋 Ciao! Sono il tuo specialista per la configurazione di Expensify. Ora che hai creato uno spazio di lavoro, sfrutta al massimo la tua prova gratuita di 30 giorni seguendo i passaggi qui sotto!
+                    `),
+            onboardingTrackWorkspaceMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? '# Iniziamo con la configurazione\n👋 Ciao, sono il tuo specialista della configurazione di Expensify. Ho già creato uno spazio di lavoro per aiutarti a gestire le tue ricevute e spese. Per sfruttare al meglio la tua prova gratuita di 30 giorni, segui semplicemente i passaggi di configurazione rimanenti qui sotto!'
+                    : '# Iniziamo con la configurazione\n👋 Sono qui per aiutarti! Per iniziare, ho personalizzato le impostazioni del tuo spazio di lavoro per ditte individuali e aziende simili. Puoi modificare il tuo spazio di lavoro cliccando il link qui sotto!\n\nEcco come monitorare le tue spese in pochi clic:',
             onboardingChatSplitMessage: 'Dividere le spese con gli amici è facile come inviare un messaggio. Ecco come.',
             onboardingAdminMessage: 'Scopri come gestire lo spazio di lavoro del tuo team come admin e inviare le tue spese.',
             onboardingLookingAroundMessage:
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 1bf15e05..7db422d8 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -2659,12 +2659,20 @@ ${
         messages: {
             onboardingEmployerOrSubmitMessage: '支払いを受け取るのは、メッセージを送るのと同じくらい簡単です。基本を確認しましょう。',
             onboardingPersonalSpendMessage: '数回クリックするだけであなたの支出を追跡する方法は次のとおりです。',
-            onboardingManageTeamMessage: dedent(`
-                # 無料トライアルが開始されました!セットアップを始めましょう。
-                👋 こんにちは。私はあなたのExpensifyのセットアップ担当です。ワークスペースを作成したので、以下の手順に従って30日間の無料トライアルを最大限に活用しましょう!
-            `),
-            onboardingTrackWorkspaceMessage:
-                '# セットアップしましょう\nって、お手伝いします!開始にあたって、あなたのワークスペース設定を個人事業主や類似の企業に合わせて調整しました。以下のリンクをクリックすると、ワークスペースを調整できます!\n\n数回クリックするだけであなたの支出を追跡する方法は次のとおりです。',
+            onboardingManageTeamMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? dedent(`
+                        無料トライアルが開始されました!セットアップを進めましょう。
+                        👋 こんにちは、私はあなたの Expensify セットアップスペシャリストです。すでに、チームの領収書と経費を管理するためのワークスペースを作成しました。30日間の無料トライアルを最大限に活用するために、以下の残りの設定手順に従ってください!
+                    `)
+                    : dedent(`
+                        # 無料トライアルが始まりました!セットアップを始めましょう。
+                        👋 こんにちは、私はExpensifyのセットアップスペシャリストです。ワークスペースを作成したので、以下の手順に従って30日間の無料トライアルを最大限に活用しましょう!
+                    `),
+            onboardingTrackWorkspaceMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? '# さあ、セットアップを始めましょう\n👋 こんにちは、私はあなたのExpensifyセットアップスペシャリストです。領収書と経費を管理できるよう、すでにワークスペースを作成しました。30日間の無料トライアルを最大限に活用するために、以下の残りのセットアップ手順に従ってください!'
+                    : '# セットアップを始めましょう\n👋 お手伝いします!開始しやすいよう、個人事業主や同様の事業向けにワークスペース設定をカスタマイズしました。下のリンクをクリックすると、ワークスペースを調整できます!\n\n数回のクリックで支出を追跡する方法は次のとおりです:',
             onboardingChatSplitMessage: '友達との請求書の分割は、メッセージを送るのと同じくらい簡単です。方法は次のとおりです。',
             onboardingAdminMessage: '管理者としてチームのワークスペースを管理し、自分の経費を提出する方法を学びましょう。',
             onboardingLookingAroundMessage:
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index cfc6553d..f62a1add 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -2669,12 +2669,20 @@ ${
         messages: {
             onboardingEmployerOrSubmitMessage: 'Terugbetaald krijgen is net zo eenvoudig als een bericht sturen. Laten we de basis doornemen.',
             onboardingPersonalSpendMessage: 'Zo volgt u uw uitgaven in een paar klikken.',
-            onboardingManageTeamMessage: dedent(`
-                # Je gratis proefperiode is gestart! Laten we je op weg helpen.
-                👋 Hoi, ik ben je Expensify-instelspecialist. Nu je een werkruimte hebt gemaakt, haal je het meeste uit je gratis proefperiode van 30 dagen door de onderstaande stappen te volgen!
-            `),
-            onboardingTrackWorkspaceMessage:
-                '# Laten we u instellen\n👋 Ik ben hier om te helpen! Om u op weg te helpen, heb ik uw werkruimte-instellingen afgestemd op eenmanszaken en soortgelijke bedrijven. U kunt uw werkruimte aanpassen door op de onderstaande link te klikken!\n\nZo volgt u uw uitgaven in een paar klikken:',
+            onboardingManageTeamMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? dedent(`
+                        # Je gratis proefperiode is gestart! Laten we je instellen.
+                        👋 Hoi, ik ben je Expensify-instelspecialist. Ik heb al een werkruimte aangemaakt om de bonnetjes en uitgaven van je team te beheren. Om het meeste uit je gratis proefperiode van 30 dagen te halen, volg je gewoon de resterende instelstappen hieronder!
+                    `)
+                    : dedent(`
+                        # Je gratis proefperiode is begonnen! Laten we je instellen.
+                        👋 Hoi! Ik ben je Expensify-specialist voor het instellen. Nu je een werkruimte hebt aangemaakt, haal het meeste uit je gratis proefperiode van 30 dagen door de onderstaande stappen te volgen!
+                    `),
+            onboardingTrackWorkspaceMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? '# Laten we je instellen\n👋 Hoi, ik ben je Expensify-installatiespecialist. Ik heb al een werkruimte aangemaakt om te helpen bij het beheren van je bonnetjes en uitgaven. Om het meeste uit je gratis proefperiode van 30 dagen te halen, volg je gewoon de resterende instelstappen hieronder!'
+                    : '# Laten we je instellen\n👋 Ik ben er om te helpen! Om je op weg te helpen, heb ik je werkruimte-instellingen afgestemd op eenmanszaken en vergelijkbare bedrijven. Je kunt je werkruimte aanpassen door op de onderstaande link te klikken!\n\nZo houd je je uitgaven in een paar klikken bij:',
             onboardingChatSplitMessage: 'Rekeningen splitsen met vrienden is net zo eenvoudig als een bericht sturen. Zo doet u dat.',
             onboardingAdminMessage: 'Leer hoe u de werkruimte van uw team als beheerder beheert en uw eigen uitgaven indient.',
             onboardingLookingAroundMessage:
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index a337c495..81c661a9 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -2664,12 +2664,20 @@ ${
         messages: {
             onboardingEmployerOrSubmitMessage: 'Terugbetaald krijgen is net zo eenvoudig als een bericht sturen. Laten we de basis doornemen.',
             onboardingPersonalSpendMessage: 'Zo volgt u uw uitgaven in een paar klikken.',
-            onboardingManageTeamMessage: dedent(`
-                # Twój bezpłatny okres próbny właśnie się rozpoczął! Zajmijmy się konfiguracją.
-                👋 Cześć, jestem twoim specjalistą ds. konfiguracji Expensify. Po utworzeniu obszaru roboczego wykorzystaj w pełni 30‑dniowy bezpłatny okres próbny, wykonując poniższe kroki!
-            `),
-            onboardingTrackWorkspaceMessage:
-                '# Laten we u instellen\n👋 Ik ben hier om te helpen! Om u op weg te helpen, heb ik uw werkruimte-instellingen afgestemd op eenmanszaken en soortgelijke bedrijven. U kunt uw werkruimte aanpassen door op de onderstaande link te klikken!\n\nZo volgt u uw uitgaven in een paar klikken:',
+            onboardingManageTeamMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? dedent(`
+                        # Twój bezpłatny okres próbny się rozpoczął! Zacznijmy konfigurację.
+                        👋 Cześć, jestem Twoim specjalistą ds. konfiguracji Expensify. Utworzyłem już obszar roboczy, aby pomóc w zarządzaniu paragonami i wydatkami Twojego zespołu. Aby jak najlepiej wykorzystać 30-dniowy bezpłatny okres próbny, po prostu wykonaj pozostałe kroki konfiguracji poniżej!
+                    `)
+                    : dedent(`
+                        # Rozpoczęła się Twoja bezpłatna wersja próbna! Zacznijmy konfigurację.
+                        👋 Cześć! Jestem Twoim specjalistą ds. konfiguracji Expensify. Teraz, gdy masz już utworzony obszar roboczy, wykorzystaj w pełni 30-dniową bezpłatną wersję próbną, wykonując poniższe kroki!
+                    `),
+            onboardingTrackWorkspaceMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? '# Zacznijmy konfigurację\n👋 Cześć! Jestem Twoim specjalistą ds. konfiguracji Expensify. Utworzyłem już przestrzeń roboczą, aby pomóc Ci zarządzać paragonami i wydatkami. Aby jak najlepiej wykorzystać 30‑dniowy bezpłatny okres próbny, wykonaj pozostałe kroki konfiguracji poniżej!'
+                    : '# Zacznijmy od konfiguracji\n👋 Jestem tu, aby pomóc! Na początek ustawienia Twojego obszaru roboczego zostały dostosowane do potrzeb jednoosobowych działalności gospodarczych i podobnych firm. Możesz dostosować swój obszar roboczy, klikając poniższy link!\n\nOto jak śledzić swoje wydatki w kilku kliknięciach:',
             onboardingChatSplitMessage: 'Rekeningen splitsen met vrienden is net zo eenvoudig als een bericht sturen. Zo doet u dat.',
             onboardingAdminMessage: 'Leer hoe u de werkruimte van uw team als beheerder beheert en uw eigen uitgaven indient.',
             onboardingLookingAroundMessage:
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 57baf60d..76184246 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -2664,12 +2664,20 @@ ${
         messages: {
             onboardingEmployerOrSubmitMessage: 'Ser reembolsado é tão fácil quanto enviar uma mensagem. Vamos ver o básico.',
             onboardingPersonalSpendMessage: 'Veja como rastrear seus gastos em poucos cliques.',
-            onboardingManageTeamMessage: dedent(`
-                Seu teste gratuito começou! Vamos deixar tudo pronto.
-                👋 Olá! Sou seu especialista de configuração da Expensify. Agora que você criou um espaço de trabalho, aproveite ao máximo seu teste gratuito de 30 dias seguindo as etapas abaixo!
-            `),
-            onboardingTrackWorkspaceMessage:
-                '# Vamos configurar você\n👋 Estou aqui para ajudar! Para você começar, adaptei as configurações do seu espaço de trabalho para microempreendedores individuais e empresas semelhantes. Você pode ajustar seu espaço de trabalho clicando no link abaixo!\n\nVeja como rastrear seus gastos em poucos cliques:',
+            onboardingManageTeamMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? dedent(`
+                        # Sua avaliação gratuita foi iniciada! Vamos configurar tudo.
+                        👋 Oi! Sou seu especialista de configuração da Expensify. Já criei um espaço de trabalho para ajudar a gerenciar os recibos e as despesas da sua equipe. Para aproveitar ao máximo seus 30 dias de avaliação gratuita, basta seguir as etapas de configuração restantes abaixo!
+                    `)
+                    : dedent(`
+                        # Seu teste gratuito começou! Vamos configurar tudo.
+                        👋 Olá! Sou seu especialista de configuração da Expensify. Agora que você criou um espaço de trabalho, aproveite ao máximo seu teste gratuito de 30 dias seguindo as etapas abaixo!
+                    `),
+            onboardingTrackWorkspaceMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? '# Vamos configurar tudo\n👋 Olá! Sou seu especialista em configuração da Expensify. Já criei um espaço de trabalho para ajudar a gerenciar seus recibos e despesas. Para aproveitar ao máximo sua avaliação gratuita de 30 dias, basta seguir as etapas de configuração restantes abaixo!'
+                    : '# Vamos configurar tudo\n👋 Estou aqui para ajudar! Para começar, personalizei as configurações do seu espaço de trabalho para empresários individuais e empresas semelhantes. Você pode ajustar seu espaço de trabalho clicando no link abaixo!\n\nVeja como acompanhar seus gastos em poucos cliques:',
             onboardingChatSplitMessage: 'Dividir contas com amigos é tão fácil quanto enviar uma mensagem. Veja como.',
             onboardingAdminMessage: 'Aprenda a gerenciar o espaço de trabalho da sua equipe como administrador e enviar suas próprias despesas.',
             onboardingLookingAroundMessage:
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 0f2e314c..bdbbca16 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -2631,12 +2631,20 @@ ${
         messages: {
             onboardingEmployerOrSubmitMessage: '报销就像发送消息一样简单。让我们来看看基本知识。',
             onboardingPersonalSpendMessage: '以下是如何在几次点击中跟踪您的支出。',
-            onboardingManageTeamMessage: dedent(`
-                您的免费试用已开始!让我们为您完成设置。
-                👋 您好,我是您的 Expensify 设置专员。既然您已创建了一个工作区,请按照以下步骤操作,充分利用为期 30 天的免费试用!
-            `),
-            onboardingTrackWorkspaceMessage:
-                '# 让我们来设置您的帐户\nð��� 我来帮忙了!为了帮助您开始,我已为个体经营者和类似企业量身定制了您的工作区设置。您可以通过点击下面的链接来调整您的工作区!\n\n以下是如何在几次点击中跟踪您的支出:',
+            onboardingManageTeamMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? dedent(`
+                        # 你的免费试用已开始!让我们帮你完成设置。
+                        👋 你好,我是你的 Expensify 设置专员。我已经创建了一个工作区,帮助你管理团队的收据和费用。为了充分利用你的 30 天免费试用,只需按照下方剩余的设置步骤进行操作即可!
+                    `)
+                    : dedent(`
+                        # 您的免费试用已开始!让我们为您完成设置。
+                        👋 您好,我是您的 Expensify 设置专员。现在您已创建了一个工作区,请按照以下步骤操作,充分利用您的 30 天免费试用!
+                    `),
+            onboardingTrackWorkspaceMessage: ({isOnboardingFlow = false}: {isOnboardingFlow?: boolean}) =>
+                isOnboardingFlow
+                    ? '# 让我们开始为你进行设置\n👋 你好,我是你的 Expensify 设置专员。我已经创建了一个工作区,帮助你管理收据和费用。为充分利用你的 30 天免费试用,只需按照下面剩余的设置步骤操作!'
+                    : '# 让我们开始设置\n👋 我来帮您!为帮助您开始使用,我已根据个体经营者及类似企业为您定制了工作区设置。您可以点击下方链接来调整您的工作区!\n\n以下是通过几次点击即可跟踪支出的方式:',
             onboardingChatSplitMessage: '与朋友分摊账单就像发送消息一样简单。以下是方法。',
             onboardingAdminMessage: '了解如何作为管理员管理团队的工作区并提交自己的支出。',
             onboardingLookingAroundMessage: 'Expensify 以其支出、差旅和公司卡管理而闻名,但我们所做的远不止于此。让我知道您对什么感兴趣,我会帮助您开始。',

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

@jnowakow

Copy link
Copy Markdown
Contributor Author

PR is ready for review 😇

@jnowakow

Copy link
Copy Markdown
Contributor Author

@akinwale are you around to do the review? 🙏

@akinwale

Copy link
Copy Markdown
Contributor

@jnowakow Yes, I can review later today.

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

No concern with product change

@mountiny

Copy link
Copy Markdown
Contributor

@akinwale Let me know when done

@akinwale

Copy link
Copy Markdown
Contributor

@jnowakow Your uploaded screenshots / attachments are not displaying in the OP.

@akinwale

akinwale commented Nov 24, 2025 •

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
    • MacOS: Desktop
  • 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 there are no new alerts related to the canBeMissing param for useOnyx
  • I verified proper code patterns were followed (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
    • 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 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)
  • 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
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • 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
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • 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 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 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.
  • 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
74480-android-hybrid.mp4
Android: mWeb Chrome
74480-android-chrome.mp4
iOS: HybridApp
74480-ios-hybrid.mp4
iOS: mWeb Safari
74480-ios-safari.mp4
MacOS: Chrome / Safari
74480-web.mp4

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

LGTM.

@akinwale

Copy link
Copy Markdown
Contributor

@mountiny Ready for your review.

@mountiny
mountiny marked this pull request as draft November 24, 2025 16:23
@mountiny
mountiny marked this pull request as ready for review November 24, 2025 16:23

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

@jnowakow @akinwale can you please check why all the tasks been created in Concierge?

if (!value) {
return;
}
onboardingData = value;

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.

Since we only need the hasCompletedGuidedSetupFlowSelector selector here, I guess we could have already saved that in the global var

Comment thread src/libs/ReportUtils.ts
Comment on lines +11559 to +11566
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${targetChatReportID}`,
value: {
[textCommentAction.reportActionID]: {
errors: getMicroSecondOnyxErrorWithTranslationKey('report.genericAddCommentFailureMessage'),
} as ReportAction,
},

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.

Looking over all the recordings from @akinwale all the messages been created in Concierge, never in the admins room but I think from the original issue and in the steps it mentions we should add the onboarding to admins room

@akinwale akinwale Nov 24, 2025 •

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 is correct. If a workspace is created, the onboarding messages are supposed to be displayed in the #admins room of the newly created workspace.

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.

But that is not the case on this pr based on your testing, right?

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.

Indeed, the messages are not sent to the correct room in this PR. I missed some of the original context of the issue, and ended up only checking the order of the messages.

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.

That's strange 🤔 It works for me:

onboarding.mov

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.

@jnowakow Upon further testing, it behaves differently when there is a + symbol present in the login email address. Could you add this distinction to the test steps? Thanks.

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.

@mountiny To clarify, based on #74480 (comment), is this expected behaviour?

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.

Nice catch! I wouldn't thought that + in email changes the behaviour 🤯 I've checked it on staging and this but is there as well so it's not caused by this PR

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 that is true, we do not assign guides to + emails as they are testing emails so that would make sense

@akinwale so confirming that if the + is not used it works as expected?

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.

@mountiny Yes, confirmed. This is ready to merge.

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

@akinwale can you please retest without using the + in the email?

@akinwale

Copy link
Copy Markdown
Contributor

@akinwale can you please retest without using the + in the email?

Yes, I already re-tested on web and updated the test video. I'm checking on other platforms at the moment.

@akinwale

Copy link
Copy Markdown
Contributor

@mountiny All done!

@mountiny
mountiny merged commit ce35545 into Expensify:main Nov 26, 2025
2 checks passed
@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 OSBotify mentioned this pull request Nov 27, 2025
63 tasks done
@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/mountiny in version: 9.2.65-0 🚀

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

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/marcaaron in version: 9.2.65-6 🚀

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

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.

5 participants