Skip to content

Add Travel Enablement Flow to NewDot Workspace "More Features"#71630

Merged
stitesExpensify merged 53 commits into
Expensify:mainfrom
dukenv0307:feat/travel-for-workspace
Dec 19, 2025
Merged

Add Travel Enablement Flow to NewDot Workspace "More Features"#71630
stitesExpensify merged 53 commits into
Expensify:mainfrom
dukenv0307:feat/travel-for-workspace

Conversation

@dukenv0307

@dukenv0307 dukenv0307 commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

Explanation of Change

This PR moves all of travel to its own tab in the workspace, and a feature that you can add via the UI, rather than a separated page from the FAB.

Fixed Issues

$ #70187
PROPOSAL:

Tests

Test case 1:

  1. Create a new account on applause.expensifail.com
  2. Create a new workspace
  3. Open Workspace “More Features”
  4. Verify that the Travel feature card/toggle to enable per-workspace Travel appears.
  5. Enable Travel feature
  6. Verify that the Travel option appears on the left side
  7. Open workspace Travel page
  8. Ensure that you are required to add an address
  9. Ensure that you can accept the terms
  10. Ensure that you are sent to expensify travel
  11. Ensure that the page changes to say "Manage your trips"

Test case 2:

  1. Click FAB button
  2. Verify Book Travel option appears if the Travel feature is enabled on the default workspace
  • Verify that no errors appear in the JS console

Test case 3 (internal, ping @stitesExpensify :

  1. Using a non-validated domain create a new account
  2. Validate the account
  3. Create a workspace
  4. Enable travel
  5. Make sure that you have to validate the domain
  6. Make sure that the imagery shows "verifying your domain"
  7. Follow the remaining steps and ensure that travel is working correctly

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
    • 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
    • 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
Screen.Recording.2025-11-24.at.17.38.07.mov
Android: mWeb Chrome
Screen.Recording.2025-11-24.at.16.47.14.mov
iOS: Native
Screen.Recording.2025-11-24.at.17.36.04.mov
iOS: mWeb Safari
Screen.Recording.2025-11-24.at.16.45.40.mov
MacOS: Chrome / Safari
Screen.Recording.2025-11-24.at.16.39.17.mov
MacOS: Desktop
Screen.Recording.2025-11-24.at.17.41.31.mov

@codecov

codecov Bot commented Oct 1, 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/CONST/index.ts 84.68% <ø> (ø)
src/SCREENS.ts 100.00% <ø> (ø)
...mponents/FocusTrap/WIDE_LAYOUT_INACTIVE_SCREENS.ts 0.00% <ø> (ø)
...rc/components/Icon/chunks/expensify-icons.chunk.ts 0.00% <ø> (ø)
src/components/Icon/chunks/illustrations.chunk.ts 0.00% <ø> (ø)
src/libs/API/types.ts 100.00% <ø> (ø)
...gation/linkingConfig/RELATIONS/WORKSPACE_TO_RHP.ts 100.00% <ø> (ø)
src/libs/Navigation/linkingConfig/config.ts 75.00% <ø> (ø)
src/libs/actions/RequestConflictUtils.ts 98.36% <ø> (ø)
src/pages/Search/EmptySearchView.tsx 61.19% <100.00%> (-25.33%) ⬇️
... and 22 more
... and 6 files with indirect coverage changes

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

Looking good so far!

Comment thread src/CONST/index.ts Outdated
Comment thread src/languages/de.ts
Comment thread src/libs/actions/Policy/Travel.ts
Comment thread src/pages/Travel/DomainSelectorPage.tsx
@dukenv0307

Copy link
Copy Markdown
Contributor Author

@fedirjh Can you also please take a look at this PR? We need to have the new key named isTravelEnabled in the selectedFeatures

@stitesExpensify

Copy link
Copy Markdown
Contributor

FYI @dukenv0307 the API PR is now on staging

@dukenv0307

Copy link
Copy Markdown
Contributor Author

Thank you @stitesExpensify, it worked fine on my side

@dukenv0307 dukenv0307 marked this pull request as ready for review October 6, 2025 04:25
@dukenv0307 dukenv0307 requested review from a team as code owners October 6, 2025 04:25
@melvin-bot melvin-bot Bot requested review from alitoshmatov and removed request for a team October 6, 2025 04:25
@melvin-bot

melvin-bot Bot commented Oct 6, 2025

Copy link
Copy Markdown

@alitoshmatov 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]

@shawnborton

Copy link
Copy Markdown
Contributor

Going to run a test build for easier testing.

@github-actions

github-actions Bot commented Oct 6, 2025

Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

@shawnborton

Copy link
Copy Markdown
Contributor

Is this the icon we want to use @Expensify/design ?
CleanShot 2025-10-06 at 10 40 58@2x

I think we have an updated luggage icon that looks like this that I think we prefer?
CleanShot 2025-10-06 at 10 41 52@2x

@shawnborton

Copy link
Copy Markdown
Contributor

The empty state style is incorrect:
CleanShot 2025-10-06 at 10 43 38@2x

It should have the same max-width (680px) as other parts of the app. Can you double check things like Settings and grab widths/paddings/etc from there?
CleanShot 2025-10-06 at 10 44 12@2x

@shawnborton

Copy link
Copy Markdown
Contributor

We also want a margin of 12px above the card, again, like Account settings pages:
CleanShot 2025-10-06 at 10 44 57@2x

@shawnborton

Copy link
Copy Markdown
Contributor

I think the illustration should be vertically centered, it's not currently:
CleanShot 2025-10-06 at 10 45 54@2x

And the asset should be at 191x170:
CleanShot 2025-10-06 at 10 46 29@2x

@dannymcclain

Copy link
Copy Markdown
Contributor

Agree with all of your feedback Shawn!

We definitely want to use the icon you suggested (luggage with lines)—the same one we use for the GC option. I can't seem to find it in the repo though, but it must be there since we're using it in global create?

@dukenv0307

Copy link
Copy Markdown
Contributor Author

Thank you @shawnborton @dannymcclain, I fixed all these comments above

Screen.Recording.2025-10-08.at.15.29.31.mov

@dukenv0307

Copy link
Copy Markdown
Contributor Author

All yours @alitoshmatov

@stitesExpensify

Copy link
Copy Markdown
Contributor

We're just waiting for my review on this one :)

The PR is very big though so it's taking some time with other priorities

@JmillsExpensify

Copy link
Copy Markdown
Contributor

Btw, mostly for context: Getting this PR out helps us resolve an on-going onboarding issue, where we are promoting Invoicing. It's being activated by users not understanding what it is, and despite the feature not being ready for group business contexts yet.

@JmillsExpensify

Copy link
Copy Markdown
Contributor

So it'd be good to prioritize this if you're around next week and things have slowed down.

@stitesExpensify

Copy link
Copy Markdown
Contributor

I plan on having it fully reviewed (and hopefully merged) today!

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

Code looks great and things appear to work well!

@stitesExpensify

Copy link
Copy Markdown
Contributor

I noticed one thing while testing which is that we didn't replace invoicing with travel in the "what features are you interested in" flow. I think that we can go ahead and do a quick follow-up for that given that this is a huge PR

2025-12-19_11-56-55

@stitesExpensify

Copy link
Copy Markdown
Contributor

The test steps and QA are also very light, I'm going to write some up and replace the ones in the OP before merging to make sure that we don't break anything.

@dylanexpensify

dylanexpensify commented Dec 19, 2025 via email

Copy link
Copy Markdown
Contributor

@Expensify Expensify deleted a comment from hoangzinh Dec 19, 2025
@stitesExpensify

Copy link
Copy Markdown
Contributor

Checklist check was failing because of a previous comment that was empty, just deleted it and running again

@stitesExpensify stitesExpensify merged commit f65e433 into Expensify:main Dec 19, 2025
32 of 34 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.

@hoangzinh

Copy link
Copy Markdown
Contributor

I noticed one thing while testing which is that we didn't replace invoicing with travel in the "what features are you interested in" flow. I think that we can go ahead and do a quick follow-up for that given that this is a huge PR

2025-12-19_11-56-55

@stitesExpensify, it seems we planned to work on it in a follow-up PR #70187 (comment)

@m-natarajan

Copy link
Copy Markdown

@stitesExpensify Can you please test Test case:3

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/stitesExpensify in version: 9.2.85-0 🚀

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

@stitesExpensify

Copy link
Copy Markdown
Contributor

@m-natarajan test case 3 was a 🟢

@marcaaron

Copy link
Copy Markdown
Contributor

Just a heads up that this PR is linked to a deploy blocker. The issue looks relatively easy to fix and this PR seems quite large so I'd rather fix the issue. WDYT @stitesExpensify ?

@stitesExpensify

Copy link
Copy Markdown
Contributor

I agree, I would rather not revert. Looking into a fix now

@stitesExpensify

Copy link
Copy Markdown
Contributor

Just put up a PR, waiting for the adhoc build so that I can test

@stitesExpensify

Copy link
Copy Markdown
Contributor

I think we might actually have a worse bug here and want to revert that I found while testing the above.

  1. Download adhoc build above
  2. You are brought to the old app
  3. Click travel
  4. "Uh-oh, something went wrong!" page

Can someone else test and see if they get the same result? My guess is it's because we changed the route?

@stitesExpensify

Copy link
Copy Markdown
Contributor

Commented here to get both checked

@hoangzinh

Copy link
Copy Markdown
Contributor

Can someone else test and see if they get the same result?

I can reproduce this issue 🫨

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/marcaaron in version: 9.2.85-7 🚀

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

Comment on lines +32 to +34
const handleClose = useCallback(() => {
requestTravelAccess();
Navigation.goBack(backTo);

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.

requestTravelAccess is called even when close modal without submitting magic code. So it caused this regression.
More details: #78750 (comment)

return;
}
enablePolicyTravel(policyID, isEnabled);
},

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.

Coming from #81046, we should handle onPress to enable navigation to WORKSPACE_TRAVEL.

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.