Skip to content

[NoQA] Feature: Travel Invoicing – Release 10: Add Legal Name Capture Flow to NewDot - #82759

Merged
blimpich merged 18 commits into
Expensify:mainfrom
ikevin127:ikevin127-travel-invoicing-10
Feb 26, 2026
Merged

blimpich merged 18 commits into
Expensify:mainfrom
ikevin127:ikevin127-travel-invoicing-10

Conversation

@ikevin127

@ikevin127 ikevin127 commented Feb 18, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Release 10: Capture Traveler's Legal Name

When travel cards are used at hotels and car rental agencies, we want the charge to display the traveler's actual legal name rather than a generic corporate billing name. This makes the card appear more like a personal credit card, reducing CCA (Credit Card Authorization) issues and friction for the traveler.

Since users don't always provide their legal name at signup, we need to capture it before they can book travel with Travel Invoicing. The existing SetPrivatePersonalDetails command already handles updating the Marqeta card object. We'll extend it to also push the updated name to Spotnana.

UX Flow:

  1. User taps "Book travel" button
  2. If Travel Invoicing is enabled AND legal name is missing → Navigate to personal details RHP
  3. User completes legal name form → Navigate to magic code confirmation
  4. User enters magic code → SetPrivatePersonalDetails updates details + Marqeta card name + Spotnana profile
  5. Success → Dismiss modal & open travel.expensify.com

10.1 Add navigation infrastructure

Register the new RHP routes and screens for the personal details capture flow:

  • Add TRAVEL_MISSING_PERSONAL_DETAILS and TRAVEL_MISSING_PERSONAL_DETAILS_CONFIRM_MAGIC_CODE routes to src/ROUTES.ts
  • Add corresponding screen constants to src/SCREENS.ts (both in RIGHT_MODAL and root level)
  • Add TravelMissingPersonalDetailsParamList type to src/libs/Navigation/types.ts and include it in RightModalNavigatorParamList
  • Add route configuration to src/libs/Navigation/linkingConfig/config.ts
  • Create TravelMissingPersonalDetailsModalStackNavigator in src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx
  • Register the new screen in src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx

This follows the existing pattern used by MissingPersonalDetailsModalStackNavigator.

10.2 Create personal details RHP pages

Create two new pages under src/pages/Travel/TravelMissingPersonalDetails/:

  • index.tsx - Main RHP component that reuses MissingPersonalDetailsContent (same component used by ExpensifyCardMissingDetailsPage). On completion, navigates to the magic code confirmation page.
  • TravelMissingPersonalDetailsMagicCodePage.tsx - Handles magic code verification using ValidateCodeActionModal. Calls updatePersonalDetailsAndShipExpensifyCards on submission, then redirects to travel.expensify.com on success.

10.3 Add legal name check to BookTravelButton

Modify BookTravelButton.tsx to check for missing legal name when Travel Invoicing is enabled:

  • Add Onyx hook to read PRIVATE_PERSONAL_DETAILS
  • Add areTravelPersonalDetailsMissing helper that checks if legalFirstName or legalLastName is missing (can be added to PersonalDetailsUtils.ts)
  • In the bookATrip callback, after the isPolicyProvisioned check and before openTravelDotLink, add a check: if Travel Invoicing is enabled and legal name is missing, navigate to the new RHP instead of proceeding to travel booking

10.4 Add translation keys

Add new translation keys to src/languages/en.ts and src/languages/es.ts in the travel section:

  • personalDetailsDescription - Explanation of why legal name is needed

Fixed Issues

$ #78720
PROPOSAL:

Tests

Test Scenario 1: Booking Travel via "Let's go" button

Pre-requisites:

  1. Use an Expensify account that does not have a Legal Name set yet (e.g. newly created account).
  2. Ensure the account has access to a Workspace > Travel feature enabled and ready to use.

Steps:

  1. Open the Expensify app and navigate Workspace > Travel.
  2. Click on Let's go button.
  3. Verify that RHP opens with the Legal Name page (asking for your Legal First Name and Legal Last Name) instead of proceeding with the "Let's go" button flow.
  4. Fill in a valid Legal First Name and Legal Last Name, then submit the form.
  5. Verify that the details are successfully saved and Legal name RHP flow is dismissed.
  6. Click *Let's go button again.
  7. Verify that you are now successfully routed to the standard travel booking flow (domain selector or Spotnana portal) without being asked for your legal name again.

Test Scenario 2: Enabling Central Invoicing in Workspace settings

Pre-requisites:

  1. Use an Expensify account that does not have a Legal Name set yet.
  2. Ensure the account has the Travel Invoicing beta enabled and Travel Invoicing setup and ready to go.

Steps:

  1. Navigate to Settings > Workspaces > [Select your Workspace] > Travel.
  2. Scroll down to the Central invoicing section and click the toggle to enable it.
  3. Verify that RHP opens with the Legal Name page since your personal details are missing.
  4. Fill in a valid Legal First Name and Legal Last Name, then submit the form.
  5. Verify that the details are successfully saved and the Legal name RHP flow is dismissed.
  6. Click the Central invoicing toggle to enable it once more.
  7. Verify that it now successfully proceeds to the next step of the invoicing flow (e.g., prompting you to select a Settlement Account or enabling the toggle directly) without asking for your legal name again.
  • Verify that no errors appear in the JS console

Offline tests

N/A

QA Steps

Same as tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I 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

Test 1

1.mov

Test 2

2.mov

@melvin-bot

melvin-bot Bot commented Feb 18, 2026

Copy link
Copy Markdown

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

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

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

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

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

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

@codecov

codecov Bot commented Feb 18, 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/SCREENS.ts 100.00% <ø> (ø)
...gation/linkingConfig/RELATIONS/WORKSPACE_TO_RHP.ts 100.00% <ø> (ø)
src/libs/Navigation/linkingConfig/config.ts 75.00% <ø> (ø)
src/libs/PersonalDetailsUtils.ts 79.16% <100.00%> (+0.25%) ⬆️
src/ROUTES.ts 13.83% <0.00%> (+0.04%) ⬆️
...gation/AppNavigator/ModalStackNavigators/index.tsx 7.45% <0.00%> (-0.05%) ⬇️
...settings/Profile/PersonalDetails/LegalNamePage.tsx 0.00% <0.00%> (ø)
...rkspace/travel/WorkspaceTravelInvoicingSection.tsx 57.64% <45.45%> (-35.32%) ⬇️
src/pages/Travel/TravelLegalNamePage.tsx 0.00% <0.00%> (ø)
src/components/BookTravelButton.tsx 0.99% <0.00%> (-0.80%) ⬇️
... and 1 more
... and 280 files with indirect coverage changes

@ikevin127
ikevin127 marked this pull request as ready for review February 20, 2026 02:14
@ikevin127
ikevin127 requested review from a team as code owners February 20, 2026 02:14
@melvin-bot

melvin-bot Bot commented Feb 20, 2026

Copy link
Copy Markdown

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

@melvin-bot
melvin-bot Bot removed request for a team February 20, 2026 02:14
@ikevin127

Copy link
Copy Markdown
Contributor Author

@parasharrajat 🟢 Ready for review! Check latest Slack discussion for context.

[SCREENS.WORKSPACE.TRAVEL]: [
SCREENS.WORKSPACE.TRAVEL_SETTINGS_ACCOUNT,
SCREENS.WORKSPACE.TRAVEL_SETTINGS_FREQUENCY,
SCREENS.WORKSPACE.TRAVEL_MISSING_PERSONAL_DETAILS,

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.

❌ CONSISTENCY-2 (docs)

SCREENS.WORKSPACE.TRAVEL_MISSING_PERSONAL_DETAILS_ROOT and SCREENS.WORKSPACE.TRAVEL_MISSING_PERSONAL_DETAILS_CONFIRM_MAGIC_CODE are referenced here but never defined in src/SCREENS.ts. Only SCREENS.WORKSPACE.TRAVEL_MISSING_PERSONAL_DETAILS (under WORKSPACE) and SCREENS.TRAVEL.MISSING_PERSONAL_DETAILS_CONFIRM_MAGIC_CODE (under TRAVEL, not WORKSPACE) are defined in this PR. These undefined references will cause TypeScript compilation errors or runtime failures.

Remove the undefined references and use only the constants that are actually defined:

[SCREENS.WORKSPACE.TRAVEL]: [
    SCREENS.WORKSPACE.TRAVEL_SETTINGS_ACCOUNT,
    SCREENS.WORKSPACE.TRAVEL_SETTINGS_FREQUENCY,
    SCREENS.WORKSPACE.TRAVEL_MISSING_PERSONAL_DETAILS,
],

Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

Comment thread src/components/BookTravelButton.tsx Outdated
const {isBetaEnabled} = usePermissions();
const [isPreventionModalVisible, setPreventionModalVisibility] = useState(false);
const [isVerificationModalVisible, setVerificationModalVisibility] = useState(false);
const [privatePersonalDetails] = useOnyx(ONYXKEYS.PRIVATE_PERSONAL_DETAILS, {canBeMissing: true});

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.

❌ PERF-11 (docs)

PRIVATE_PERSONAL_DETAILS is subscribed to without a selector, but only legalFirstName and legalLastName are needed (via areTravelPersonalDetailsMissing). Any change to other fields in private personal details (address, phone number, etc.) will cause an unnecessary re-render of this component.

Use a selector that computes the boolean directly:

const [areTravelDetailsMissing] = useOnyx(ONYXKEYS.PRIVATE_PERSONAL_DETAILS, {
    canBeMissing: true,
    selector: (details) => \!details?.legalFirstName || \!details?.legalLastName,
});

Then use areTravelDetailsMissing directly in the condition instead of calling areTravelPersonalDetailsMissing(privatePersonalDetails).


Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

const [account] = useOnyx(ONYXKEYS.ACCOUNT, {canBeMissing: true});
const [bankAccountList] = useOnyx(ONYXKEYS.BANK_ACCOUNT_LIST, {canBeMissing: true});
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {canBeMissing: true});
const [privatePersonalDetails] = useOnyx(ONYXKEYS.PRIVATE_PERSONAL_DETAILS, {canBeMissing: true});

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.

❌ PERF-11 (docs)

PRIVATE_PERSONAL_DETAILS is subscribed to without a selector, but only legalFirstName and legalLastName are needed (via areTravelPersonalDetailsMissing). Any change to other fields in private personal details will trigger an unnecessary re-render.

Use a selector that computes the boolean directly:

const [areTravelDetailsMissing] = useOnyx(ONYXKEYS.PRIVATE_PERSONAL_DETAILS, {
    canBeMissing: true,
    selector: (details) => \!details?.legalFirstName || \!details?.legalLastName,
});

Then use areTravelDetailsMissing directly in the condition.


Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

return;
}

if (isBetaEnabled(CONST.BETAS.TRAVEL_INVOICING) && areTravelPersonalDetailsMissing(privatePersonalDetails)) {

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.

❌ CONSISTENCY-3 (docs)

This exact conditional pattern (isBetaEnabled(CONST.BETAS.TRAVEL_INVOICING) && areTravelPersonalDetailsMissing(privatePersonalDetails) followed by navigating to ROUTES.WORKSPACE_TRAVEL_MISSING_PERSONAL_DETAILS) is duplicated in WorkspaceTravelInvoicingSection.tsx. Both locations perform the same check and the same navigation.

Extract this into a shared helper function in a utils or actions module, e.g.:

function navigateIfTravelPersonalDetailsMissing(
    isBetaEnabled: (beta: string) => boolean,
    privatePersonalDetails: OnyxEntry<PrivatePersonalDetails>,
    policyID: string,
): boolean {
    if (isBetaEnabled(CONST.BETAS.TRAVEL_INVOICING) && areTravelPersonalDetailsMissing(privatePersonalDetails)) {
        Navigation.navigate(ROUTES.WORKSPACE_TRAVEL_MISSING_PERSONAL_DETAILS.getRoute(policyID));
        return true;
    }
    return false;
}

Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5dc9248028

ℹ️ About Codex in GitHub

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

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

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

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

Comment on lines +104 to +105
if (isBetaEnabled(CONST.BETAS.TRAVEL_INVOICING) && areTravelPersonalDetailsMissing(privatePersonalDetails)) {
Navigation.navigate(ROUTES.WORKSPACE_TRAVEL_MISSING_PERSONAL_DETAILS.getRoute(policy?.id ?? String(CONST.DEFAULT_NUMBER_ID)));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Gate legal-name redirect on workspace invoicing state

This condition only checks the TRAVEL_INVOICING beta flag, so any beta-enabled user with missing legal names is redirected to the invoicing-specific personal-details flow even when the selected workspace is not using Travel Invoicing. Because this runs before the existing booking eligibility checks, it changes the normal booking/upgrade path for non-invoicing policies and introduces an unnecessary hard gate; the redirect should be conditioned on the workspace’s actual invoicing state, not just the beta.

Useful? React with 👍 / 👎.

Comment on lines +58 to +59
const handleSubmit = (values: FormOnyxValues<typeof ONYXKEYS.FORMS.PERSONAL_DETAILS_FORM>) => {
updateLegalName(values.legalFirstName?.trim() ?? '', values.legalLastName?.trim() ?? '', formatPhoneNumber, currentUserPersonalDetails);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Submit travel legal name via SetPrivatePersonalDetails

The new travel legal-name page submits through updateLegalName (UpdateLegalName) and immediately exits, while the newly added SetPrivatePersonalDetails write command (with required validateCode) is never invoked by this flow. That means the travel-specific private-details update path introduced in this commit is bypassed, so the legal-name capture flow can complete without running the intended verified backend update for travel provisioning.

Useful? React with 👍 / 👎.

@abzokhattab

Copy link
Copy Markdown
Contributor

Hi, does it need c+ review? asking since it was requested.

@ikevin127

Copy link
Copy Markdown
Contributor Author

@abzokhattab Sorry for the ping, this will be reviewed by @parasharrajat as it's part of a project.

@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 project

@parasharrajat parasharrajat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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 tests pass on all platforms & I tested again on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • 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 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 the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • 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 approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • 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.js 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 form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label 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.
  • 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.
24.02.2026_14.53.39_REC.mp4

🎀 👀 🎀 C+ reviewed

@melvin-bot
melvin-bot Bot requested a review from blimpich February 24, 2026 09:28
@parasharrajat

Copy link
Copy Markdown
Member

Looks good.

@blimpich
blimpich requested review from rlinoz and removed request for abzokhattab February 24, 2026 17:43
@blimpich

Copy link
Copy Markdown
Contributor

The PR body description lists everything from release 10, including the backend changes. Can we please shorten it to just include the changes relevant to this PR?

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

Looks good, just the validation thing about the name.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree this would be better if we reused the LegalPageName

Validation Logic: The Travel page applies isValidLegalName to check for specific characters, whereas the profile settings page checks for reserved words via doesContainReservedWord.

As for this, we probably should have the same validate function we have in LegalPageName, no?

return;
}

if (isBetaEnabled(CONST.BETAS.TRAVEL_INVOICING) && areTravelPersonalDetailsMissing(privatePersonalDetails)) {

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.

NAB: We only display this section if the beta is enabled, so I think we could remove it here.

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.

✅ Fixed

@ikevin127

Copy link
Copy Markdown
Contributor Author

🟢 Ready for review

@rlinoz

rlinoz commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor

This can be a follow up, but after setting the legal name we should continue the flow to the next screen instead of just dismissing the RHP

Screen.Recording.2026-02-25.at.09.12.17.mov

Comment on lines +29 to +51
const validate = (values: FormOnyxValues<typeof ONYXKEYS.FORMS.PERSONAL_DETAILS_FORM>): FormInputErrors<typeof ONYXKEYS.FORMS.PERSONAL_DETAILS_FORM> => {
const errors = getFieldRequiredErrors(values, STEP_FIELDS, translate);

const firstName = values[INPUT_IDS.LEGAL_FIRST_NAME];
if (!isRequiredFulfilled(firstName)) {
errors[INPUT_IDS.LEGAL_FIRST_NAME] = translate('common.error.fieldRequired');
} else if (!isValidLegalName(firstName)) {
errors[INPUT_IDS.LEGAL_FIRST_NAME] = translate('privatePersonalDetails.error.hasInvalidCharacter');
} else if (firstName.length > CONST.LEGAL_NAME.MAX_LENGTH) {
errors[INPUT_IDS.LEGAL_FIRST_NAME] = translate('common.error.characterLimitExceedCounter', firstName.length, CONST.LEGAL_NAME.MAX_LENGTH);
}

const lastName = values[INPUT_IDS.LEGAL_LAST_NAME];
if (!isRequiredFulfilled(lastName)) {
errors[INPUT_IDS.LEGAL_LAST_NAME] = translate('common.error.fieldRequired');
} else if (!isValidLegalName(lastName)) {
errors[INPUT_IDS.LEGAL_LAST_NAME] = translate('privatePersonalDetails.error.hasInvalidCharacter');
} else if (lastName.length > CONST.LEGAL_NAME.MAX_LENGTH) {
errors[INPUT_IDS.LEGAL_LAST_NAME] = translate('common.error.characterLimitExceedCounter', lastName.length, CONST.LEGAL_NAME.MAX_LENGTH);
}

return errors;
};

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.

Why this is different than the one in LegalNamePage?

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.

No difference, unified to use LegalNamePage validation function ✅

};

function LegalNamePage() {
function BaseLegalNamePage<TFormID extends OnyxFormKey>({

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you create a separate component file for this?

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.

✅ Done

@ikevin127

Copy link
Copy Markdown
Contributor Author

This can be a follow up, but after setting the legal name we should continue the flow to the next screen instead of just dismissing the RHP

✅ Fixed

Flow 1 Flow 2
1.mov
2.mov

🟢 Ready for review

@blimpich

Copy link
Copy Markdown
Contributor

Wasn't able to get around to reviewing this today, apologies, will review first thing tomorrow morning

@parasharrajat parasharrajat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Thanks.

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

Thank you

@blimpich
blimpich merged commit 9727a93 into Expensify:main Feb 26, 2026
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.

@github-actions

Copy link
Copy Markdown
Contributor

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

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/blimpich in version: 9.3.27-0 🚀

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

@OSBotify

OSBotify commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/blimpich in version: 9.3.27-8 🚀

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.

7 participants