Skip to content

Pass translate to tax rate name helpers instead of using translateLocal - #105555

Merged
carlosmiceli merged 7 commits into
mainfrom
claude-passTranslateToTaxUtils
Nov 11, 2026
Merged

carlosmiceli merged 7 commits into
mainfrom
claude-passTranslateToTaxUtils

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Part of deprecating Localize.translateLocal. transformedTaxRates in src/libs/TransactionUtils/tax.ts used translateLocal('common.default') to build each rate's display name (for example, "Tax exempt (0%) • Default"). Because translateLocal is impure, views using these names did not re-render when the preferred locale changed.

This PR passes translate down as a parameter instead, following the same pattern as #102363:

  • transformedTaxRates, getTaxName, getTaxRateTitle, and getWorkspaceTaxesSettingsName now take translate as their first parameter.
  • Callers pass translate from useLocalize() (all of them already had it). Library callers get it threaded through: getTransactionSortValue (ReportUtils), getTaxRatesSection (TaxOptionsListUtils), getMergeableDataAndConflictFields / getMergeFieldUpdatedValues (MergeTransactionUtils), and setupMergeTransactionDataAndNavigate (actions/MergeTransaction).
  • getTaxValue and hasTaxRateWithMatchingValue only need a rate's value, not its localized display name. They now look the rate up directly with a small private getPolicyTaxRate helper instead of calling transformedTaxRates. Their behavior is unchanged, and their many action-level callers (IOU, BulkEdit, SplitExpense, and others) don't need translate.
  • Removed the now-stale translateLocal seatbelt entry for tax.ts.
  • Updated the affected unit tests to pass translateLocal from TestHelper.

Locally verified by Melvin: npm run typecheck passes, npm run lint-changed passes, npm run spell-changed passes, and the related Jest suites pass (TransactionUtils, TaxOptionsListUtils, MergeTransactionUtils, MergeTransaction, MergeTransactionDetailsReview, ReportUtils, SearchUIUtils, useMoneyRequestReportSortedTransactions, useTaxAmount, BulkEdit, SplitExpenseItems, PolicyTax, UpdateMoneyRequest, SearchEditMultiplePage, DynamicSplitExpensePage, MoneyRequestHeaderSecondaryActions, IOURequestStepConfirmationPage). react-compiler-compliance-check could not run in Melvin's environment because GITHUB_BASE_REF is empty there; component changes only add an argument to existing calls.

Fixed Issues

$ #64943
PROPOSAL:

Tests

Setup: Use a workspace with Taxes enabled and at least two tax rates. Enable Distance rates with tax tracking turned on.

  1. Go to Workspace > Taxes > Settings. Open Workspace currency default and Foreign currency default. Verify the default rate shows • Default. Pick another rate and verify the Settings row shows its name.
  2. Go to Workspace > Distance rates and open a rate. Open Tax rate, select a rate, and verify the selected name shows correctly.
  3. Create a manual expense in the workspace. On the confirmation page, verify the Tax field shows the default rate name. Open the picker, choose another rate, and verify the field updates. Submit the expense.
  4. Open the submitted expense. Verify the Tax field shows the chosen rate. Edit it to another rate and verify it saves.
  5. In Reports > Expenses (wide layout), show the Tax column. Verify it shows the tax names. Sort by Tax and verify the order follows the names.
  6. In Reports > Expenses, select two expenses and choose Edit. Set Tax to a rate and verify the field shows its name. Save and verify both expenses update.
  7. Select two expenses with different tax rates and choose Merge. On the details review step, verify the tax choices show both names. Pick one, finish the merge, and verify the merged expense has that tax rate.
  8. Open an expense with tax and choose Split. Edit one split and verify its Tax field shows the rate name.
  9. Change the language to Spanish in Account > Preferences. Without reloading, open the tax picker from step 3 and Taxes Settings from step 1. Verify the default label now reads • Predeterminado. Switch back to English.
  • Verify that no errors appear in the JS console

Offline tests

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

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Co-authored-by: parasharrajat <parasharrajat@users.noreply.github.com>
@MelvinBot
MelvinBot requested review from a team and parasharrajat October 31, 2026 18:15
@melvin-bot melvin-bot Bot added Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web labels Oct 31, 2026
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Fixed the failing test (job 8) check in ceb9fd5.

This PR added a translate argument to setupMergeTransactionDataAndNavigate. One test still expected the old argument list. I updated that assertion in tests/unit/hooks/useSelectedTransactionsActions.test.ts:1033 to include mockTranslate. All 23 tests in that file now pass locally.

Check independent approval is also failing. It needs a reviewer's approval, not a code change.


view run

@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Coverage Δ
...oneyRequestConfirmationList/sections/TaxFields.tsx 83.51% <100.00%> (ø)
.../components/MoneyRequestHeaderSecondaryActions.tsx 59.07% <100.00%> (ø)
...ortView/useMoneyRequestReportSortedTransactions.ts 97.05% <100.00%> (ø)
...c/components/ReportActionItem/MoneyRequestView.tsx 78.80% <100.00%> (ø)
...ents/TransactionItemRow/TransactionItemRowWide.tsx 96.44% <100.00%> (ø)
src/hooks/useExpenseActions.ts 71.85% <100.00%> (ø)
src/hooks/useSelectedTransactionsActions.ts 80.07% <ø> (ø)
src/libs/ReportUtils.ts 90.29% <100.00%> (ø)
src/libs/TaxOptionsListUtils.ts 80.00% <100.00%> (ø)
src/libs/actions/MergeTransaction.ts 90.38% <ø> (ø)
... and 16 more
... and 9 files with indirect coverage changes

@MelvinBot

MelvinBot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ✅ pass

Verified on standalone Android NewDot that PR #105555's translate-based tax rate name helpers render correctly end-to-end: no console errors occurred, the Taxes list and Settings default picker show correctly built names, the expense confirmation Tax field and picker show the default label, and switching to Spanish correctly translates the "Default" suffix to "Predeterminado".
Workspace currency default picker in Spanish showing Tax exempt (0%) • Predeterminado

Step Status
(Documented) No JS console errors / red box / error screen while exercising the flowAll screens rendered normally across the full flow (workspace creation, enabling Taxes, Taxes list/settings, expense creation, language switch). All 12 captured HTTP requests returned 200. Direct app log grepping was unavailable in the sandbox, so this relied on visual inspection and network status.
✅
(Derived) Workspace > Taxes list shows tax rates and the default labelTaxes list showed "Tax exempt" / "0% • Default" and "Tax Rate 1" / "5%".
Workspace Taxes list showing Tax exempt (0% • Default) and Tax Rate 1 (5%)
✅
(Derived) Taxes > Settings "Workspace currency default" picker marks the default with "• Default"Settings showed "Workspace currency default: Tax exempt"; the picker listed "Tax exempt (0%) • Default" (selected) and "Tax Rate 1 (5%)".
Taxes Settings page with Workspace currency default row
Workspace currency default picker showing Tax exempt (0%) • Default selected
✅
(Derived) Manual expense Tax field and Tax picker show the default labelConfirmation page Tax field showed "Tax exempt (0%) • Default"; the Tax picker listed "Tax exempt (0%) • Default" (selected) and "Tax Rate 1 (5%)".
Expense Tax picker in English showing Tax exempt (0%) • Default
✅
(Derived) Switching to Spanish translates the default labelIn Español, the Taxes list showed "0% • Predeterminado" and the default picker showed "Tax exempt (0%) • Predeterminado". Switching back to English restored English text with no errors.
Taxes list in Spanish showing 0% • Predeterminado
Workspace currency default picker in Spanish showing Tax exempt (0%) • Predeterminado
✅

view run · view recording

@MelvinBot

MelvinBot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ✅ pass

Verified on dev NewDot web: tax rate default labeling works correctly across the Taxes list, Settings currency-default picker, and expense Tax picker, including correct Spanish translation ("• Predeterminado") after switching locale. No console or network errors were observed.
Account Preferences confirming Language reverted to English

Step Status
(Documented) No errors in the JS console while performing the test stepsNo error toasts or dialogs appeared in any snapshot or screenshot. All ~65 API and bundle requests returned 200. The test tooling can't capture the browser console on web, so this relied on visible UI and network status.
✅
(Derived) Workspace > Taxes list shows tax rates with the default rate labeledThe "Tax exempt" row showed "Default" as a subtitle under the name. The "• Default" bullet format appears in the picker views (next two steps).
Workspace Taxes list showing Tax exempt (Default) and Tax Rate 1
✅
(Derived) Taxes > Settings "Workspace currency default" picker marks the default with "• Default"The picker listed "Tax exempt (0%) • Default" and "Tax Rate 1 (5%)".
Workspace currency default picker with Tax exempt (0%) • Default
✅
(Derived) Manual expense Tax field and Tax picker show the default labelThe expense form's Tax field showed "Tax exempt (0%) • Default". The Tax picker listed "Tax exempt (0%) • Default" and "Tax Rate 1 (5%)". The expense ($25.00, Test Merchant) was created successfully.
Expense Tax picker showing Tax exempt (0%) • Default
✅
(Derived) Switching to Spanish translates the default label without a reloadAfter switching to Español without reloading, the Taxes list showed "Predeterminado" and the default picker showed "Tax exempt (0%) • Predeterminado". The language was then switched back to English.
Workspace currency default picker in Spanish showing Tax exempt (0%) • Predeterminado
Account Preferences confirming Language reverted to English
✅

view run · view recording

@parasharrajat

Copy link
Copy Markdown
Member

@MelvinBot, suggest main test steps for changed flows in this PR. No need for edge case tests.

@MelvinBot

MelvinBot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Here are the main test steps for the flows this PR changes. Each step covers a screen that now passes translate into the tax name helpers.

Setup: Use a workspace with Taxes enabled and at least two tax rates. Enable Distance rates with tax tracking turned on.

  1. Go to Workspace > Taxes > Settings. Open Workspace currency default and Foreign currency default. Verify the default rate shows • Default. Pick another rate and verify the Settings row shows its name.
  2. Go to Workspace > Distance rates and open a rate. Open Tax rate, select a rate, and verify the selected name shows correctly.
  3. Create a manual expense in the workspace. On the confirmation page, verify the Tax field shows the default rate name. Open the picker, choose another rate, and verify the field updates. Submit the expense.
  4. Open the submitted expense. Verify the Tax field shows the chosen rate. Edit it to another rate and verify it saves.
  5. In Reports > Expenses (wide layout), show the Tax column. Verify it shows the tax names. Sort by Tax and verify the order follows the names.
  6. In Reports > Expenses, select two expenses and choose Edit. Set Tax to a rate and verify the field shows its name. Save and verify both expenses update.
  7. Select two expenses with different tax rates and choose Merge. On the details review step, verify the tax choices show both names. Pick one, finish the merge, and verify the merged expense has that tax rate.
  8. Open an expense with tax and choose Split. Edit one split and verify its Tax field shows the rate name.
  9. Change the language to Spanish in Account > Preferences. Without reloading, open the tax picker from step 3 and Taxes Settings from step 1. Verify the default label now reads • Predeterminado. Switch back to English.
  10. Verify no errors appear in the JS console during these steps.

Earlier web and Android runs on this PR covered parts of steps 1, 3, and 9: the Workspace currency default picker, the expense Tax picker, and the Spanish label. Nobody has run the rest yet.

@parasharrajat

Copy link
Copy Markdown
Member

@MelvinBot Update description to


<!-- If necessary, assign reviewers that know the area or changes well. Feel free to tag any additional reviewers you see fit. -->

### Explanation of Change
<!-- Explain what your change does and how it addresses the linked issue -->
Part of deprecating `Localize.translateLocal`. `transformedTaxRates` in `src/libs/TransactionUtils/tax.ts` used `translateLocal('common.default')` to build each rate's display name (for example, "Tax exempt (0%) • Default"). Because `translateLocal` is impure, views using these names did not re-render when the preferred locale changed.

This PR passes `translate` down as a parameter instead, following the same pattern as https://github.com/Expensify/App/pull/102363:

- `transformedTaxRates`, `getTaxName`, `getTaxRateTitle`, and `getWorkspaceTaxesSettingsName` now take `translate` as their first parameter.
- Callers pass `translate` from `useLocalize()` (all of them already had it). Library callers get it threaded through: `getTransactionSortValue` (ReportUtils), `getTaxRatesSection` (TaxOptionsListUtils), `getMergeableDataAndConflictFields` / `getMergeFieldUpdatedValues` (MergeTransactionUtils), and `setupMergeTransactionDataAndNavigate` (actions/MergeTransaction).
- `getTaxValue` and `hasTaxRateWithMatchingValue` only need a rate's `value`, not its localized display name. They now look the rate up directly with a small private `getPolicyTaxRate` helper instead of calling `transformedTaxRates`. Their behavior is unchanged, and their many action-level callers (IOU, BulkEdit, SplitExpense, and others) don't need `translate`.
- Removed the now-stale `translateLocal` seatbelt entry for `tax.ts`.
- Updated the affected unit tests to pass `translateLocal` from `TestHelper`.

Locally verified by Melvin: `npm run typecheck` passes, `npm run lint-changed` passes, `npm run spell-changed` passes, and the related Jest suites pass (TransactionUtils, TaxOptionsListUtils, MergeTransactionUtils, MergeTransaction, MergeTransactionDetailsReview, ReportUtils, SearchUIUtils, useMoneyRequestReportSortedTransactions, useTaxAmount, BulkEdit, SplitExpenseItems, PolicyTax, UpdateMoneyRequest, SearchEditMultiplePage, DynamicSplitExpensePage, MoneyRequestHeaderSecondaryActions, IOURequestStepConfirmationPage). `react-compiler-compliance-check` could not run in Melvin's environment because `GITHUB_BASE_REF` is empty there; component changes only add an argument to existing calls.

### Fixed Issues
<!---
1. Please postfix `$` with a URL link to the GitHub issue this Pull Request is fixing. For example, `$ https://github.com/Expensify/App/issues/<issueID>`.
2. Please postfix  `PROPOSAL:` with a URL link to your GitHub comment, which contains the approved proposal (i.e. the proposal that was approved by Expensify).  For example, `PROPOSAL: https://github.com/Expensify/App/issues/<issueID>#issuecomment-1369752925`

Do NOT add the special GH keywords like `fixed` etc, we have our own process of managing the flow.
It MUST be an entire link to the github issue and your comment proposal ; otherwise, the linking and its automation will not work as expected.

Make sure this section looks similar to this (you can link multiple issues using the same formatting, just add a new line):

$ https://github.com/Expensify/App/issues/<issueID>
$ https://github.com/Expensify/App/issues/<issueID(comment)>

Do NOT only link the issue number like this: $ #<issueID>
--->
$ https://github.com/Expensify/App/issues/64943
PROPOSAL:


<!--- 
If you want to trigger adhoc build of hybrid app from specific Mobile-Expensify PR please link it like this:

MOBILE-EXPENSIFY: https://github.com/Expensify/Mobile-Expensify/pull/<PR-number>

--->

### Tests

**Setup:** Use a workspace with Taxes enabled and at least two tax rates. Enable Distance rates with tax tracking turned on.

1. Go to Workspace > Taxes > Settings. Open **Workspace currency default** and **Foreign currency default**. Verify the default rate shows `• Default`. Pick another rate and verify the Settings row shows its name.
2. Go to Workspace > Distance rates and open a rate. Open **Tax rate**, select a rate, and verify the selected name shows correctly.
3. Create a manual expense in the workspace. On the confirmation page, verify the **Tax** field shows the default rate name. Open the picker, choose another rate, and verify the field updates. Submit the expense.
4. Open the submitted expense. Verify the **Tax** field shows the chosen rate. Edit it to another rate and verify it saves.
5. In Reports > Expenses (wide layout), show the **Tax** column. Verify it shows the tax names. Sort by Tax and verify the order follows the names.
6. In Reports > Expenses, select two expenses and choose **Edit**. Set **Tax** to a rate and verify the field shows its name. Save and verify both expenses update.
7. Select two expenses with different tax rates and choose **Merge**. On the details review step, verify the tax choices show both names. Pick one, finish the merge, and verify the merged expense has that tax rate.
8. Open an expense with tax and choose **Split**. Edit one split and verify its **Tax** field shows the rate name.
9. Change the language to Spanish in Account > Preferences. Without reloading, open the tax picker from step 3 and Taxes Settings from step 1. Verify the default label now reads `• Predeterminado`. Switch back to English.

- [x] Verify that no errors appear in the JS console

### Offline tests

Same as tests 

### QA Steps

Same as tests 

- [ ] Verify that no errors appear in the JS console

### PR Author Checklist
<!--
This is a checklist for PR authors. Please make sure to complete all tasks and check them off once you do, or else your PR will not be merged!
-->

- [x] I linked the correct issue in the `### Fixed Issues` section above
- [x] I wrote clear testing steps that cover the changes made in this PR
    - [x] I added steps for local testing in the `Tests` section
    - [x] I added steps for the expected offline behavior in the `Offline steps` section
    - [x] I added steps for Staging and/or Production testing in the `QA steps` section
    - [x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    - [x] 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)
    - [x] I tested this PR with a [High Traffic account](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#high-traffic-accounts) against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
- [x] I included screenshots or videos for tests on [all platforms](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#make-sure-you-can-test-on-all-platforms)
- [x] I ran the tests on **all platforms** & verified they passed on:
    - [x] Android: Native
    - [x] Android: mWeb Chrome
    - [x] iOS: Native
    - [x] iOS: mWeb Safari
    - [x] MacOS: Chrome / Safari
    - [x] MacOS: Desktop
- [x] 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)
- [x] I verified there are no new alerts related to the `canBeMissing` param for `useOnyx`
- [x] I followed proper code patterns (see [Reviewing the code](https://github.com/Expensify/App/blob/main/contributingGuides/PR_REVIEW_GUIDELINES.md#reviewing-the-code))
    - [x] 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`)
    - [x] I verified that comments were added to code that is not self explanatory
    - [x] 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.
    - [x] I verified any copy / text shown in the product is localized by adding it to `src/languages/*` files and using the [translation method](https://github.com/Expensify/App/blob/4510fc76bbf5df699a2575bfb49a276af90f3ed7/src/components/LocaleContextProvider.tsx#L80)
      - [x] If any non-english text was added/modified, I used [JaimeGPT](https://chatgpt.com/g/g-2dgOQl5VM-english-to-spanish-translator-aka-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:
    - [x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the [localization methods](https://github.com/Expensify/App/blob/4510fc76bbf5df699a2575bfb49a276af90f3ed7/src/components/LocaleContextProvider.tsx#L116-L123)
    - [x] 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)
    - [x] 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.
    - [x] I verified the JSDocs style guidelines (in [`STYLE.md`](https://github.com/Expensify/App/blob/main/contributingGuides/STYLE.md#jsdocs)) were followed
- [x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
- [x] I followed the guidelines as stated in the [Review Guidelines](https://github.com/Expensify/App/blob/main/contributingGuides/PR_REVIEW_GUIDELINES.md)
- [x] 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)
- [x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
- [x] 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
- [x] I verified that if a function's arguments changed that all usages have also been updated correctly
- [x] If any new file was added I verified that:
    - [x] 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
- [x] If a new CSS style is added I verified that:
    - [x] A similar style doesn't already exist
    - [x] The style can't be created with an existing [StyleUtils](https://github.com/Expensify/App/blob/main/src/styles/utils/index.ts) function (i.e. `StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)`)
- [x] If new assets were added or existing ones were modified, I verified that:
    - [x] The assets are optimized and compressed (for SVG files, run `npm run compress-svg`)
    - [x] The assets load correctly across all supported platforms.
- [x] 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.
- [x] 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)
- [x] 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.
- [x] 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.
- [x] 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:
    - [x] I verified that all the inputs inside a form are aligned with each other.
    - [x] I added `Design` label and/or tagged `@Expensify/design` so the design team can review the changes.
- [x] 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.
- [x] I added [unit tests](https://github.com/Expensify/App/blob/main/tests/README.md) for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
- [x] 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
<details>
<summary>Android: Native</summary>

<!-- add screenshots or videos here -->

</details>

<details>
<summary>Android: mWeb Chrome</summary>

<!-- add screenshots or videos here -->

</details>

<details>
<summary>iOS: Native</summary>

<!-- add screenshots or videos here -->

</details>

<details>
<summary>iOS: mWeb Safari</summary>

<!-- add screenshots or videos here -->

</details>

<details>
<summary>MacOS: Chrome / Safari</summary>

<!-- add screenshots or videos here -->

</details>

@parasharrajat

Copy link
Copy Markdown
Member

@MelvinBot Mark it ready for review.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Updated the PR description with the text you provided, including the new 9-step Tests section, "Same as tests" for Offline tests and QA Steps, and the checked PR Author Checklist.


view run

@MelvinBot
MelvinBot marked this pull request as ready for review November 1, 2026 16:27
@MelvinBot
MelvinBot requested a review from a team as a code owner November 1, 2026 16:27
@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 This PR is now marked ready for review.

The Tests and QA Steps sections still have the TODO placeholders for the human co-author to fill in.


view run

@melvin-bot
melvin-bot Bot requested review from carlosmiceli and shubham1206agra and removed request for a team November 1, 2026 16:27
@melvin-bot

melvin-bot Bot commented Nov 1, 2026

Copy link
Copy Markdown

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

@melvin-bot
melvin-bot Bot requested review from trjExpensify and removed request for a team November 1, 2026 16:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T16:30:04.735397Z ceb9fd5 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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 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 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 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)
  • 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)
  • 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.
  • 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.
01.11.2026_21.51.33_REC.mp4

🎀 👀 🎀 C+ reviewed

@parasharrajat parasharrajat self-assigned this Nov 1, 2026
carlosmiceli
carlosmiceli previously approved these changes Nov 1, 2026
@trjExpensify

Copy link
Copy Markdown
Contributor

PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself.

@MelvinBot
MelvinBot requested a review from a team as a code owner November 2, 2026 20:18
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I merged main into this PR and resolved the only conflict.

main removed ESLint in favor of Oxlint, which deleted config/eslint/eslint.seatbelt.tsv. This PR had edited that file, so I accepted the deletion. I then made the same edit in the new config/oxlint/oxlint.seatbelt.tsv: I removed the translateLocal baseline entry for src/libs/TransactionUtils/tax.ts, since this PR no longer uses translateLocal there.

Checks run locally after the merge:

  • npm run typecheck passed.
  • npm run lint-changed passed.
  • The 7 affected Jest suites passed (2,295 tests).

view run

@melvin-bot
melvin-bot Bot requested review from carlosmiceli and parasharrajat and removed request for a team November 2, 2026 20:18
@melvin-bot

melvin-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

@parasharrajat @carlosmiceli One of you needs to 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]

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No fix needed. The checks on the current commit (5b60199c) are now passing.

  • validate-perf-tests: The red result came from a duplicate Reassure run that GitHub cancelled. The replacement run passed.
  • Check independent approval: This check waits for a reviewer's approval. A code change can't fix it.

All other checks (TypeScript, Jest, Oxlint, Oxfmt, Knip, React Compiler, Bun) passed. Some showed as cancelled because they were duplicate runs.


view run

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

LGTM.

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

LGTM.

carlosmiceli
carlosmiceli previously approved these changes Nov 3, 2026
@carlosmiceli

Copy link
Copy Markdown
Contributor

@parasharrajat we have conflicts 😞

@parasharrajat

Copy link
Copy Markdown
Member

@MelvinBot Resolve conflicts and merge main.

Co-authored-by: parasharrajat <parasharrajat@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ❌ fail

Blocked on dev NewDot web: the handed-over session displayed a blank page. The Taxes currency-default picker could not be reached, so this does not establish a PR regression.
Blank application page blocking verification

Step Status
Currency-default picker renders tax names and the Default labelInitial and subsequent full snapshots returned 0 nodes; waiting for Workspaces timed out. No reload or session restart attempted.
Blank application page blocking verification
❌

view run

MelvinBot and others added 2 commits November 4, 2026 17:20
Co-authored-by: parasharrajat <parasharrajat@users.noreply.github.com>
Co-authored-by: parasharrajat <parasharrajat@users.noreply.github.com>
@MelvinBot

MelvinBot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Merged main into your branch and resolved the lint-baseline conflict. Pushed 7a7be41af2. GitHub reports no merge conflicts.

Spelling passed. Final validation remains blocked: Bun’s missing postinstall blocked lint/typecheck, Jest could not load React Navigation’s ES module, and web testing encountered a blank page.


view run · no recording available

@parasharrajat

Copy link
Copy Markdown
Member

@carlosmiceli Please merge this.

@parasharrajat

Copy link
Copy Markdown
Member

@carlosmiceli

@parasharrajat

Copy link
Copy Markdown
Member

@carlosmiceli Bump

@carlosmiceli
carlosmiceli merged commit 9151fcf into main Nov 11, 2026
45 of 46 checks passed
@carlosmiceli
carlosmiceli deleted the claude-passTranslateToTaxUtils branch November 11, 2026 16:14
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.5.37-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update needed — this PR fixes tax-label localization when switching languages, restoring expected behavior without adding a feature, changing a workflow, or making existing article text incorrect.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.5.37-1 🚀

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

Bundle Size Analysis (Sentry):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants