Expand PREGENERATED_RESPONSE to all company sizes and deprecate WELCOME_EVENT#85326
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd2a420ddf
ℹ️ 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".
|
PR doesn’t need product input as a code refactor PR. Unassigning and unsubscribing myself. |
|
Should I review this @marcochavezf ? |
|
Hi @FitseTLT, yes please this is ready for review |
Okay |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Reviewer Checklist
Screenshots/Videos |
FitseTLT
left a comment
There was a problem hiding this comment.
Approving, with one NAB suggestion
|
@carlosmiceli 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] |
Remove the MICRO-only restriction on bespoke welcome messages so that all company sizes use the PREGENERATED_RESPONSE path when the suggestedFollowups beta is enabled. This makes the WELCOME_EVENT backend fallback unnecessary for new App versions. getBespokeWelcomeMessage now accepts companySize and tailors the welcome phrasing: MEDIUM/LARGE companies hear about approval workflows and the Expensify Card, SMALL/MEDIUM_SMALL about categories and workflows, and MICRO (default) about receipts and quick setup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… company sizes The PR removed the MICRO-only guard from prepareOnboardingOnyxData, so now all company sizes get a bespoke welcome message when shouldUseFollowupsInsteadOfTasks is true. Update the expected signoff message count from 0 to 1. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ration suffix paths Cover MEDIUM_SMALL, MEDIUM company sizes and the userReportedIntegration suffix path in prepareOnboardingOnyxData to satisfy Codecov requirements. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ests
- Extract duplicated welcome header string into `welcomeHeader` constant in
getBespokeWelcomeMessage, concatenating only the varying tail per company size
- Rename test from 'non-MICRO' to 'SMALL' to match the actual company size tested
- Add content assertion for MICRO/default test case ('For a small team like yours')
- Remove redundant toBeDefined() checks where toContain already validates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…meHeader Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Address review feedback to simplify the switch by appending directly to message instead of using an intermediate variable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1420b06 to
966203b
Compare
|
Friendly bump @carlosmiceli |
|
@marcochavezf looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
The remote build failing checks are unrelated to the changes |
|
🚧 @marcochavezf has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/marcochavezf in version: 9.3.42-0 🚀
Bundle Size Analysis (Sentry): |
|
This PR failing because of the issue #86110 |





Explanation of Change
Removes the
MICRO-only restriction on bespoke welcome messages so that all company sizes use thePREGENERATED_RESPONSEpath when thesuggestedFollowupsbeta is enabled. Previously, only MICRO (1-10 employees) company sizes would send a frontend-generated bespoke welcome message; larger companies fell through to the flakyWELCOME_EVENTbackend LLM path.Changes:
getBespokeWelcomeMessage()now acceptscompanySizeand tailors the welcome phrasing:prepareOnboardingOnyxData(): thecompanySize === MICROguard is removed — the bespoke message is generated for all company sizes whenshouldUseFollowupsInsteadOfTasksis true.Backward compatibility: The backend
WELCOME_EVENTfallback in Web-Expensify (UserAPI::queueAdminsRoomWelcome) remains untouched — older App versions that don't sendbespokeWelcomeMessagewill still fall back to the WELCOME_EVENT path. A follow-up PR will deprecate WELCOME_EVENT from the Concierge prompt once this ships.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/610942
Tests
suggestedFollowupsbeta enabledOffline tests
N/A — the bespoke welcome message is generated client-side during onboarding and sent to the server. Offline behavior is unchanged: the optimistic message appears immediately, and the server appends followups when connectivity is restored.
QA Steps
suggestedFollowupsbeta is enabled for the test accountPR Author Checklist
I linked the correct issue in the
### Fixed Issuessection aboveI wrote clear testing steps that cover the changes made in this PR
TestssectionOffline stepssectionQA stepssectionI included screenshots or videos for tests on all platforms
I ran the tests on all platforms & verified they passed on:
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)
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 , I verified the components using 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
I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
If any new file was added I verified that:
If a new CSS style is added I verified that:
StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))If new assets were added or existing ones were modified, I verified that:
npm run compress-svg)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
Avataris modified, I verified thatAvataris 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:
Designlabel and/or tagged@Expensify/designso the design team can review the changes.If a new page is added, I verified it is using the
ScrollViewcomponent to make it scrollable when more elements are added to the page.If the
mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A — no UI component changes, only welcome message text varies by company size
Android: mWeb Chrome
N/A
iOS: Native
N/A
iOS: mWeb Safari
N/A
MacOS: Chrome / Safari
N/A