Skip to content

[NO QA] make Travel Invoicing use 1:1:1 commands and implement verifying UI state#83481

Merged
blimpich merged 31 commits intomainfrom
blimpich-fix111issueWithTravelInvoicing
Mar 5, 2026
Merged

[NO QA] make Travel Invoicing use 1:1:1 commands and implement verifying UI state#83481
blimpich merged 31 commits intomainfrom
blimpich-fix111issueWithTravelInvoicing

Conversation

@blimpich
Copy link
Contributor

@blimpich blimpich commented Feb 25, 2026

Explanation of Change

This PR finishes the core work of #81470, which makes our core Travel Invoicing flow 1:1:1. Instead of using the ToggleTravelInvoicing command to turn the feature on and off, we now instead use two separate commands: ConfigureTravelInvoicingForPolicy and DeactivateTravelInvoicing. It also adds logic to the frontend to handle the "verifying" state of a bank account, where a bank account can be waiting to be verified by our internal tools and therefore we need to communicate to the user that their request is in transit and being looked at.

Fixed Issues

#81470
PROPOSAL:

Tests

  • Verify that no errors appear in the JS console

Note: here's how to create bank account locally that will work for this:

./script/clitools.sh generator:bankaccount
Account email? [blimpich@expensify.com] ti@test24.com
Let's authenticate you
success
Deposit or Withdrawal?
  [0] Deposit
  [1] Withdrawal
 > 1
Validated?
  [0] Yes
  [1] No
 > 0
Upgraded?
  [0] Yes
  [1] No
 > 0
Use Stripe Test Acct Information?
  [0] Yes
  [1] No
 > 0

Success
Bank account ID: 1179319

Verifying state

  1. create a fresh account with a workspace that has travel enabled
  2. go to travel
  3. toggle on "Central Invoicing"
  4. add a non-validated bank account (either via dev script or using the Alberta Bobbeth Charleson fake credentials)
  5. see we've entered "verifying" state for the account, see onyx data to confirm

Note: you'll want the domain of the user to be fresh since Travel won't like it if you use a domain it's already seen before. So use a domain like @testN.com where N is the iteration of your test.

Success state
Do the exact same thing as the verifying state except add your user to the allowSameExpensifyCardSettlementBBA beta, and make sure that you mark the bank account as "validated" when running the bank account generator script.

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
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I verified that similar component doesn't exist in the codebase
  • I verified that all props are defined accurately and each prop has a /** comment above it */
  • I verified that each file is named correctly
  • I verified that each component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
  • I verified that the only data being stored in component state is data necessary for rendering and nothing else
  • In component if we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
  • 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)
  • I verified that component 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)
  • I verified that all JSX used for rendering exists in the render method
  • I verified that each 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

Screenshots/Videos

555674156-e6a66fd0-d7b4-4684-bccb-b5fcbcd20270.mov
Screen.Recording.2026-02-26.at.3.01.27.PM.mov

Replace TOGGLE_TRAVEL_INVOICING with CONFIGURE_TRAVEL_INVOICING_FOR_POLICY
and DEACTIVATE_TRAVEL_INVOICING. Create corresponding parameter types.
…ctions

Replace toggleTravelInvoicing with two separate actions. The enable action
combines settlement account and isEnabled optimistic data into a single API
call. Rename clearToggleTravelInvoicingErrors to clearTravelInvoicingErrors.
Settlement account page now calls configureTravelInvoicingForPolicy when
enabling (single API call instead of two). Section page uses
configureTravelInvoicingForPolicy for enable and deactivateTravelInvoicing
for disable.
Replace toggleTravelInvoicing test with separate tests for
configureTravelInvoicingForPolicy and deactivateTravelInvoicing.
@blimpich blimpich self-assigned this Feb 25, 2026
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/libs/API/types.ts 100.00% <ø> (ø)
src/libs/actions/TravelInvoicing.ts 79.59% <90.90%> (+3.40%) ⬆️
...g/qbo/export/QuickbooksExportConfigurationPage.tsx 0.00% <0.00%> (ø)
src/libs/TravelInvoicingUtils.ts 94.11% <90.90%> (+2.18%) ⬆️
...pensifyCard/WorkspaceExpensifyCardBankAccounts.tsx 0.00% <0.00%> (ø)
...orkspaceTravelInvoicingSettlementFrequencyPage.tsx 0.00% <0.00%> (ø)
...rkspace/travel/WorkspaceTravelInvoicingSection.tsx 61.29% <66.66%> (+3.64%) ⬆️
src/components/BankAccountVerificationView.tsx 0.00% <0.00%> (ø)
.../WorkspaceTravelInvoicingSettlementAccountPage.tsx 0.00% <0.00%> (ø)
... and 9 files with indirect coverage changes

@OSBotify
Copy link
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 6412f175..2bfa7f50 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -955,8 +955,8 @@ const translations: TranslationDeepObject<typeof en> = {
             ctaFix: 'Beheben',
             fixCompanyCardConnection: {
                 title: ({feedName}: {feedName: string}) => (feedName ? `${feedName}-Firmenkartenverbindung reparieren` : 'Firmenkarte reparieren Verbindung der Firmenkarte reparieren'),
-                defaultSubtitle: 'Workspace > Unternehmenskarten',
-                subtitle: ({policyName}: {policyName: string}) => `${policyName} > Unternehmenskarten`,
+                defaultSubtitle: 'Arbeitsbereich > Firmenkarten',
+                subtitle: ({policyName}: {policyName: string}) => `${policyName} > Firmenkarten`,
             },
             fixAccountingConnection: {
                 title: ({integrationName}: {integrationName: string}) => `${integrationName}-Verbindung reparieren`,
@@ -5172,6 +5172,8 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
                         body: 'Sie haben noch einen offenen Reisensaldo. Bitte begleichen Sie zuerst Ihren Saldo.',
                         confirm: 'Verstanden',
                     },
+                    enabled: 'Zentrale Rechnungsstellung aktiviert!',
+                    enabledDescription: 'Alle Reisekosten in diesem Workspace werden nun in einer monatlichen Rechnung zentralisiert.',
                 },
             },
             expensifyCard: {
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 12d92d6b..a66e007c 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -959,7 +959,7 @@ const translations: TranslationDeepObject<typeof en> = {
             fixCompanyCardConnection: {
                 title: ({feedName}: {feedName: string}) => (feedName ? `Corriger la connexion de la carte d'entreprise ${feedName}` : 'Corriger la connexion de la carte entreprise'),
                 defaultSubtitle: 'Espace de travail > Cartes d’entreprise',
-                subtitle: ({policyName}: {policyName: string}) => `${policyName} > Cartes d'entreprise`,
+                subtitle: ({policyName}: {policyName: string}) => `${policyName} > Cartes d’entreprise`,
             },
             fixAccountingConnection: {
                 title: ({integrationName}: {integrationName: string}) => `Corriger la connexion ${integrationName}`,
@@ -5190,6 +5190,8 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
                         body: 'Vous avez encore un solde de voyage impayé. Veuillez d’abord régler ce solde.',
                         confirm: 'Compris',
                     },
+                    enabled: 'Facturation centralisée activée !',
+                    enabledDescription: 'Toutes les dépenses de voyage sur cet espace de travail seront désormais centralisées dans une facture mensuelle.',
                 },
             },
             expensifyCard: {
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 71f57aba..95930d19 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -959,7 +959,7 @@ const translations: TranslationDeepObject<typeof en> = {
             },
             fixAccountingConnection: {
                 title: ({integrationName}: {integrationName: string}) => `Correggi connessione ${integrationName}`,
-                defaultSubtitle: 'Spazio di lavoro > Contabilità',
+                defaultSubtitle: 'Area di lavoro > Contabilità',
                 subtitle: ({policyName}: {policyName: string}) => `${policyName} > Contabilità`,
             },
             fixPersonalCardConnection: {
@@ -5162,6 +5162,8 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
                         body: 'Hai ancora un saldo di viaggio in sospeso. Paga prima il tuo saldo.',
                         confirm: 'Capito',
                     },
+                    enabled: 'Fatturazione centralizzata abilitata!',
+                    enabledDescription: 'Tutte le spese di viaggio in questo spazio di lavoro saranno ora centralizzate in una fattura mensile.',
                 },
             },
             expensifyCard: {
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 922ebd79..4617f55f 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -949,7 +949,7 @@ const translations: TranslationDeepObject<typeof en> = {
             ctaFix: '修正',
             fixCompanyCardConnection: {
                 title: ({feedName}: {feedName: string}) => (feedName ? `${feedName} 会社カード接続を修正` : '法人クレジットカードの接続を修正'),
-                defaultSubtitle: 'ワークスペース > 会社カード',
+                defaultSubtitle: 'ワークスペース > 会社カード',
                 subtitle: ({policyName}: {policyName: string}) => `${policyName} > 会社カード`,
             },
             fixAccountingConnection: {
@@ -959,7 +959,7 @@ const translations: TranslationDeepObject<typeof en> = {
             },
             fixPersonalCardConnection: {
                 title: ({cardName}: {cardName?: string}) => (cardName ? `${cardName}個人カードの接続を修正` : '個人カードの連携を修正'),
-                subtitle: 'ウォレット > 割り当てられたカード',
+                subtitle: 'ウォレット > 割り当てられたカード',
             },
         },
         assignedCards: '割り当て済みカード',
@@ -5108,6 +5108,8 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
                         confirm: 'オフにする',
                     },
                     outstandingBalanceModal: {title: 'トラベル請求書作成をオフにできません', body: '未清算の出張残高があります。先に残高を精算してください。', confirm: '了解しました'},
+                    enabled: '集中請求が有効になりました!',
+                    enabledDescription: 'このワークスペースのすべての出張費は、今後、月次請求書で一元管理されます。',
                 },
             },
             expensifyCard: {
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 913f1975..a0737c56 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -953,7 +953,7 @@ const translations: TranslationDeepObject<typeof en> = {
             ctaFix: 'Repareren',
             fixCompanyCardConnection: {
                 title: ({feedName}: {feedName: string}) => (feedName ? `Verbinding bedrijfskaart ${feedName} herstellen` : 'Verbinding van bedrijfskaart repareren'),
-                defaultSubtitle: 'Werkruimte > Bedrijfspassen',
+                defaultSubtitle: 'Workspace > Bedrijfskaarten',
                 subtitle: ({policyName}: {policyName: string}) => `${policyName} > Bedrijfspassen`,
             },
             fixAccountingConnection: {
@@ -963,7 +963,7 @@ const translations: TranslationDeepObject<typeof en> = {
             },
             fixPersonalCardConnection: {
                 title: ({cardName}: {cardName?: string}) => (cardName ? `Verbinding van persoonlijke kaart ${cardName} herstellen` : 'Verbinding persoonlijke kaart herstellen'),
-                subtitle: 'Wallet > Toegewezen kaarten',
+                subtitle: 'Portemonnee > Toegewezen kaarten',
             },
         },
         assignedCards: 'Toegewezen kaarten',
@@ -5144,6 +5144,8 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
                         confirm: 'Uitschakelen',
                     },
                     outstandingBalanceModal: {title: 'Kan Reiskostenfacturatie niet uitschakelen', body: 'Je hebt nog een openstaand reissaldo. Betaal eerst je saldo.', confirm: 'Begrepen'},
+                    enabled: 'Centraal factureren ingeschakeld!',
+                    enabledDescription: 'Alle reiskosten in deze workspace worden nu gebundeld op één maandelijkse factuur.',
                 },
             },
             expensifyCard: {
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index c653a278..bb9c0569 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -955,7 +955,7 @@ const translations: TranslationDeepObject<typeof en> = {
             fixCompanyCardConnection: {
                 title: ({feedName}: {feedName: string}) => (feedName ? `Napraw połączenie karty firmowej ${feedName}` : 'Napraw połączenie karty firmowej'),
                 defaultSubtitle: 'Workspace > Karty firmowe',
-                subtitle: ({policyName}: {policyName: string}) => `${policyName} > Karty firmowe`,
+                subtitle: ({policyName}: {policyName: string}) => `${policyName} > Firmowe karty`,
             },
             fixAccountingConnection: {
                 title: ({integrationName}: {integrationName: string}) => `Napraw połączenie ${integrationName}`,
@@ -5138,6 +5138,8 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
                         body: 'Masz nadal zaległe saldo za podróż. Najpierw ureguluj swoje saldo.',
                         confirm: 'Rozumiem',
                     },
+                    enabled: 'Centralne fakturowanie włączone!',
+                    enabledDescription: 'Wszystkie wydatki podróżne w tym obszarze roboczym będą teraz rozliczane na scentralizowanej, miesięcznej fakturze.',
                 },
             },
             expensifyCard: {
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index dfa3650b..17312517 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -952,7 +952,7 @@ const translations: TranslationDeepObject<typeof en> = {
             ctaFix: 'Corrigir',
             fixCompanyCardConnection: {
                 title: ({feedName}: {feedName: string}) => (feedName ? `Corrigir conexão do cartão corporativo ${feedName}` : 'Corrigir conexão do cartão corporativo'),
-                defaultSubtitle: 'Área de trabalho > Cartões corporativos',
+                defaultSubtitle: 'Espaço de trabalho > Cartões corporativos',
                 subtitle: ({policyName}: {policyName: string}) => `${policyName} > Cartões corporativos`,
             },
             fixAccountingConnection: {
@@ -5144,6 +5144,8 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
                         body: 'Você ainda tem um saldo de viagem pendente. Pague esse saldo primeiro.',
                         confirm: 'Entendi',
                     },
+                    enabled: 'Faturamento centralizado ativado!',
+                    enabledDescription: 'Todos os gastos de viagem neste workspace agora serão centralizados em uma fatura mensal.',
                 },
             },
             expensifyCard: {
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index dc6a168f..876fa7da 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -940,13 +940,13 @@ const translations: TranslationDeepObject<typeof en> = {
             fixCompanyCardConnection: {
                 title: ({feedName}: {feedName: string}) => (feedName ? `修复 ${feedName} 公司卡连接` : '修复公司卡连接'),
                 defaultSubtitle: '工作区 > 公司卡片',
-                subtitle: ({policyName}: {policyName: string}) => `${policyName} > 公司卡片`,
+                subtitle: ({policyName}: {policyName: string}) => `${policyName} > 公司卡`,
             },
-            fixPersonalCardConnection: {title: ({cardName}: {cardName?: string}) => (cardName ? `修复 ${cardName} 个人卡连接` : '修复个人银行卡连接'), subtitle: '钱包 > 已分配的卡片'},
+            fixPersonalCardConnection: {title: ({cardName}: {cardName?: string}) => (cardName ? `修复 ${cardName} 个人卡连接` : '修复个人银行卡连接'), subtitle: '钱包 > 已分配的卡片'},
             fixAccountingConnection: {
                 title: ({integrationName}: {integrationName: string}) => `修复 ${integrationName} 连接`,
                 defaultSubtitle: '工作区 > 会计',
-                subtitle: ({policyName}: {policyName: string}) => `${policyName} > 会计`,
+                subtitle: ({policyName}: {policyName: string}) => `${policyName} > 会计`,
             },
         },
         assignedCards: '已分配的卡片',
@@ -5030,6 +5030,8 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
                     },
                     disableModal: {title: '关闭差旅开票?', body: '即将到来的酒店和汽车租赁预订可能需要使用不同的付款方式重新预订,以避免被取消。', confirm: '关闭'},
                     outstandingBalanceModal: {title: '无法关闭差旅开票', body: '你仍有未结清的差旅余额。请先支付该余额。', confirm: '明白了'},
+                    enabled: '中央开票已启用!',
+                    enabledDescription: '此工作区的所有差旅支出现在将集中在一张月度发票中。',
                 },
             },
             expensifyCard: {

Note

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

View workflow run

blimpich and others added 6 commits March 2, 2026 11:24
# Conflicts:
#	src/languages/de.ts
#	src/languages/fr.ts
#	src/languages/it.ts
#	src/languages/ja.ts
#	src/languages/nl.ts
#	src/languages/pl.ts
#	src/languages/pt-BR.ts
#	src/languages/zh-hans.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@blimpich blimpich changed the title fix 111 issue with travel invoicing make Travel Invoicing use 1:1:1 commands and implement verifying UI state Mar 2, 2026
@blimpich
Copy link
Contributor Author

blimpich commented Mar 2, 2026

spanish translation help here: https://expensify.slack.com/archives/C01GTK53T8Q/p1772484760754349

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@blimpich
Copy link
Contributor Author

blimpich commented Mar 3, 2026

@codex review

Copy link

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

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: 7ce290bfda

ℹ️ 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".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@blimpich
Copy link
Contributor Author

blimpich commented Mar 3, 2026

Github actions are breaking according to githubstatus, so this won't pass in CI It passed!

Copy link
Contributor

@allgandalf allgandalf left a comment

Choose a reason for hiding this comment

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

Looks good! Just a few minor suggestions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rlinoz
rlinoz previously approved these changes Mar 4, 2026
Copy link
Contributor

@rlinoz rlinoz left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

// Has settlement account - enable Travel Invoicing directly
toggleTravelInvoicing(policyID, workspaceAccountID, true);
// Has settlement account - enable Travel Invoicing and navigate to settlement page to show verification state
const existingPaymentBankAccountID = cardSettings?.[CONST.TRAVEL.PROGRAM_TRAVEL_US]?.paymentBankAccountID ?? cardSettings?.paymentBankAccountID ?? settlementAccount?.bankAccountID;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need the fallback after the backend changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We won't, but the backend changes for the expensifyCardSettings NVP aren't merged yet, so this would break if we did. I'm going to push up a change that will make it work for both versions of the backend.

rlinoz
rlinoz previously approved these changes Mar 5, 2026
@rlinoz
Copy link
Contributor

rlinoz commented Mar 5, 2026

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
  • 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
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@ikevin127 ikevin127 left a comment

Choose a reason for hiding this comment

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

🟢 LGTM

Definitely needed as discussed before during Travel Invoicing – Release 2.2: Toggle Behavior (Enable / Disable Travel Invoicing), thanks for opening this one! 🙌

@melvin-bot melvin-bot bot requested a review from amyevans March 5, 2026 06:03
@melvin-bot
Copy link

melvin-bot bot commented Mar 5, 2026

@amyevans 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
Copy link

melvin-bot bot commented Mar 5, 2026

🎯 @ikevin127, thanks for reviewing and testing this PR! 🎉

An E/App issue has been created to issue payment here: #84240.

// Merge root settings with TRAVEL_US so partial optimistic updates (e.g. only isEnabled) still
// inherit other fields like monthlySettlementDate from the root.
return {...cardSettings, ...cardSettings.TRAVEL_US};
return cardSettings?.TRAVEL_US;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we dont want to use the getCardSettings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using it in TravelInvoicingUtils causes a very messy transitive dependency issue, so the options were to either revert it to this or get rid of getTravelSettings entirely and replace it with getCardSettings. There were other options like using a ton of mocks to make the transitive dependency not break our tests, but it was really messy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Open to changing it!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, latest commit redoes all of this. Way more of a pain to deal with than I thought it would be. I've tested it though and it works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aaaaaaand there's merge conflicts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay resolved

Copy link
Contributor

@allgandalf allgandalf left a comment

Choose a reason for hiding this comment

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

LGTM! Though @rlinoz 's comment ^ does make sense

@blimpich blimpich removed the request for review from amyevans March 5, 2026 16:41
blimpich and others added 2 commits March 5, 2026 10:32
@blimpich blimpich merged commit 1542eef into main Mar 5, 2026
35 checks passed
@blimpich blimpich deleted the blimpich-fix111issueWithTravelInvoicing branch March 5, 2026 19:31
@OSBotify
Copy link
Contributor

OSBotify commented Mar 5, 2026

✋ 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
Contributor

github-actions bot commented Mar 5, 2026

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

@OSBotify
Copy link
Contributor

OSBotify commented Mar 6, 2026

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

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

@OSBotify
Copy link
Contributor

OSBotify commented Mar 6, 2026

🚀 Deployed to production by https://github.com/blimpich in version: 9.3.32-3 🚀

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.

6 participants