Skip to content

[Payment due @thelullabyy] Add itemized receipt changelog support and fix manual approval threshold bug#88065

Merged
dangrous merged 1 commit into
mainfrom
claude-updateItemizedReceiptChangelog-clean-v2
May 4, 2026
Merged

[Payment due @thelullabyy] Add itemized receipt changelog support and fix manual approval threshold bug#88065
dangrous merged 1 commit into
mainfrom
claude-updateItemizedReceiptChangelog-clean-v2

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

This PR adds frontend support for the itemized receipt changelog action type and fixes a bug in the manual approval threshold message, to match the formatting changes made in https://github.com/Expensify/Web-Expensify/pull/51501.

Itemized receipt changelog:

  • Adds UPDATE_MAX_EXPENSE_AMOUNT_NO_ITEMIZED_RECEIPT action type to CONST.ts
  • Adds oldMaxExpenseAmountNoItemizedReceipt and newMaxExpenseAmountNoItemizedReceipt fields to OriginalMessage.ts
  • Adds getPolicyChangeLogMaxExpenseAmountNoItemizedReceiptMessage function in ReportActionsUtils.ts (mirrors the existing NoReceipt version)
  • Adds dispatch branches in PolicyChangeLogContent.tsx, ContextMenuActions.tsx, ReportNameUtils.ts, and SidebarUtils.ts
  • Adds English and Spanish translations for set/changed/removed itemized receipt required amount

Bug fix:

  • Fixes getUpdatedManualApprovalThresholdMessage which checked typeof oldLimit !== 'number' twice instead of checking newLimit on the second clause. This meant newLimit was never validated, so if it was undefined, the function would produce incorrect output instead of falling back to getReportActionText.

Note: This replaces #87532 which had a corrupted git history (orphan branch with no shared ancestry to main). The changes have been rebased onto current main with conflict resolution — notably adapting to the new PolicyChangeLogContent.tsx architecture and adding entries to ContextMenuActions.tsx and ReportNameUtils.ts.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/616183

Tests

  • Verify that no errors appear in the JS console
  • Login to ND
  • Create a workspace --> Enable Rules
  • Set/Remove value in Itemized receipt required amount
  • Verify that the threads in #admin room shows correct message for each action: set itemized receipt required amount to "$AMOUNT" / removed itemized receipt required amount (previously "$AMOUNT")

Offline tests

N/A - these are display-only changes for server-generated report actions.

QA Steps

  • Verify that no errors appear in the JS console
  • Login to ND
  • Create a workspace --> Enable Rules
  • Set/Remove value in Itemized receipt required amount
  • Verify that the threads in #admin room shows correct message for each action: set itemized receipt required amount to "$AMOUNT" / removed itemized receipt required amount (previously "$AMOUNT")

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.

Screenshots/Videos

Android: Native

N/A - display-only changelog text changes

Android: mWeb Chrome

N/A - display-only changelog text changes

iOS: Native

N/A - display-only changelog text changes

iOS: mWeb Safari

N/A - display-only changelog text changes

MacOS: Chrome / Safari

N/A - display-only changelog text changes

…old bug

- Add UPDATE_MAX_EXPENSE_AMOUNT_NO_ITEMIZED_RECEIPT action type to CONST.ts
- Add oldMaxExpenseAmountNoItemizedReceipt and newMaxExpenseAmountNoItemizedReceipt fields to OriginalMessage.ts
- Add getPolicyChangeLogMaxExpenseAmountNoItemizedReceiptMessage function in ReportActionsUtils.ts
- Add dispatch branches in PolicyChangeLogContent.tsx, ContextMenuActions.tsx, ReportNameUtils.ts, and SidebarUtils.ts
- Add English, Spanish, and other language translations for set/changed/removed itemized receipt required amount
- Fix getUpdatedManualApprovalThresholdMessage: check typeof newLimit instead of checking oldLimit twice
- Add unit tests for the new itemized receipt message function

Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
Co-authored-by: thelullabyy <thelullabyy@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 This PR replaces #87532 which had a corrupted git history (orphan branch). The same changes have been applied on top of current main with conflict resolution.

Key conflict resolution: PureReportActionItem.tsx was refactored since the original PR — policy change log actions are now dispatched via PolicyChangeLogContent.tsx. The new itemized receipt handler has been added there, along with ContextMenuActions.tsx and ReportNameUtils.ts.

All checks pass: prettier, typecheck (tsgo), and the code compiles cleanly.

Please close #87532 and mark this PR as "Ready for review" when ready.

@OSBotify

Copy link
Copy Markdown
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 e71d1dd7..24a778de 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -7314,9 +7314,9 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
         setReceiptRequiredAmount: (newValue: string) => `Belegpflichtigen Betrag auf „${newValue}“ festlegen`,
         changedReceiptRequiredAmount: (oldValue: string, newValue: string) => `Belegpflichtbetrag auf „${newValue}“ geändert (zuvor „${oldValue}“)`,
         removedReceiptRequiredAmount: (oldValue: string) => `Belegpflichtigen Betrag entfernt (zuvor „${oldValue}”)`,
-        setItemizedReceiptRequiredAmount: (newValue: string) => `Betrag für Pflicht zur Einzelauflistung auf „${newValue}” festgelegt`,
-        changedItemizedReceiptRequiredAmount: (oldValue: string, newValue: string) => `erforderlichen Betrag des aufgeschlüsselten Belegs auf „${newValue}” geändert (zuvor „${oldValue}”)`,
-        removedItemizedReceiptRequiredAmount: (oldValue: string) => `Betrag für obligatorische Einzelpostenbelege entfernt (zuvor „${oldValue}”)`,
+        setItemizedReceiptRequiredAmount: (newValue: string) => `festgelegten Betrag für erforderliche Einzelbelege auf „${newValue}“ setzen`,
+        changedItemizedReceiptRequiredAmount: (oldValue: string, newValue: string) => `Betrag für erforderlichen Einzelbeleg auf „${newValue}“ geändert (zuvor „${oldValue}“)`,
+        removedItemizedReceiptRequiredAmount: (oldValue: string) => `Betrag für erforderlichen Einzelbeleg entfernt (zuvor „${oldValue}“)`,
         setMaxExpenseAmount: (newValue: string) => `maximalen Ausgabenbetrag auf „${newValue}“ festlegen`,
         changedMaxExpenseAmount: (oldValue: string, newValue: string) => `hat den maximalen Ausgabenbetrag auf „${newValue}“ geändert (zuvor „${oldValue}“)`,
         removedMaxExpenseAmount: (oldValue: string) => `maximale Ausgabenhöhe entfernt (zuvor „${oldValue}“)`,
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 7e4d3e84..3605dd36 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -5534,7 +5534,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
                                 'Fréquence à laquelle Expensify prélèvera sur votre compte bancaire professionnel pour régler les transactions récentes d’Expensify Travel.',
                             monthlySpendLimitLabel: 'Limite de dépenses mensuelle par membre',
                             monthlySpendLimitDescription: 'Le montant maximum que chaque membre peut dépenser en déplacements par mois.',
-                            reduceLimitTitle: 'Réduire la limite de dépenses de voyage\u00A0?',
+                            reduceLimitTitle: 'Réduire la limite de dépenses de voyage ?',
                             reduceLimitWarning:
                                 'Si vous réduisez la limite, les membres ayant déjà dépensé plus que ce montant ne pourront pas effectuer de nouvelles réservations de voyage avant le mois prochain.',
                         },
@@ -7335,9 +7335,9 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
         setReceiptRequiredAmount: (newValue: string) => `définir le montant de reçu obligatoire sur « ${newValue} »`,
         changedReceiptRequiredAmount: (oldValue: string, newValue: string) => `a modifié le montant requis pour le reçu à « ${newValue} » (auparavant « ${oldValue} »)`,
         removedReceiptRequiredAmount: (oldValue: string) => `a supprimé le montant requis pour le reçu (précédemment « ${oldValue} »)`,
-        setItemizedReceiptRequiredAmount: (newValue: string) => `définir le montant requis pour le reçu détaillé sur « ${newValue} »`,
-        changedItemizedReceiptRequiredAmount: (oldValue: string, newValue: string) => `a modifié le montant requis pour le reçu détaillé à « ${newValue} » (auparavant « ${oldValue} »)`,
-        removedItemizedReceiptRequiredAmount: (oldValue: string) => `a supprimé le montant requis pour le reçu détaillé (précédemment « ${oldValue} »)`,
+        setItemizedReceiptRequiredAmount: (newValue: string) => `définir le montant requis pour le reçu détaillé sur « ${newValue} »`,
+        changedItemizedReceiptRequiredAmount: (oldValue: string, newValue: string) => `a modifié le montant du reçu détaillé requis à « ${newValue} » (auparavant « ${oldValue} »)`,
+        removedItemizedReceiptRequiredAmount: (oldValue: string) => `montant requis de reçu détaillé supprimé (précédemment « ${oldValue} »)`,
         setMaxExpenseAmount: (newValue: string) => `définir le montant maximal de dépense sur « ${newValue} »`,
         changedMaxExpenseAmount: (oldValue: string, newValue: string) => `montant maximal de dépense modifié en « ${newValue} » (précédemment « ${oldValue} »)`,
         removedMaxExpenseAmount: (oldValue: string) => `montant de dépense maximal supprimé (précédemment « ${oldValue} »)`,
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 8b21d000..ebf90219 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -7300,10 +7300,10 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
         setReceiptRequiredAmount: (newValue: string) => `imposta l’importo richiesto per la ricevuta su "${newValue}"`,
         changedReceiptRequiredAmount: (oldValue: string, newValue: string) => `ha modificato l’importo richiesto per la ricevuta in "${newValue}" (in precedenza "${oldValue}")`,
         removedReceiptRequiredAmount: (oldValue: string) => `ha rimosso l’importo richiesto per la ricevuta (in precedenza «${oldValue}»)`,
-        setItemizedReceiptRequiredAmount: (newValue: string) => `imposta l’importo richiesto per la ricevuta con voci singole su "${newValue}"`,
+        setItemizedReceiptRequiredAmount: (newValue: string) => `imposta l’importo richiesto per la ricevuta dettagliata su "${newValue}"`,
         changedItemizedReceiptRequiredAmount: (oldValue: string, newValue: string) =>
             `ha modificato l’importo richiesto per la ricevuta con voci a "${newValue}" (in precedenza "${oldValue}")`,
-        removedItemizedReceiptRequiredAmount: (oldValue: string) => `ha rimosso l’importo richiesto per la ricevuta dettagliata (precedentemente "${oldValue}")`,
+        removedItemizedReceiptRequiredAmount: (oldValue: string) => `ha rimosso l’importo richiesto per la ricevuta con dettaglio voci (precedentemente «${oldValue}»)`,
         setMaxExpenseAmount: (newValue: string) => `imposta l’importo massimo della spesa su "${newValue}"`,
         changedMaxExpenseAmount: (oldValue: string, newValue: string) => `ha modificato l'importo massimo della spesa a "${newValue}" (precedentemente "${oldValue}")`,
         removedMaxExpenseAmount: (oldValue: string) => `importo massimo spesa rimosso (precedentemente "${oldValue}")`,
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index bce46aaa..bbacab22 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7215,7 +7215,7 @@ ${reportName}
         removedReceiptRequiredAmount: (oldValue: string) => `必須領収書金額を削除しました(以前の値:「${oldValue}」)`,
         setItemizedReceiptRequiredAmount: (newValue: string) => `明細付き領収書の必須金額を「${newValue}」に設定しました`,
         changedItemizedReceiptRequiredAmount: (oldValue: string, newValue: string) => `品目別レシートの必須金額を「${newValue}」(以前は「${oldValue}」)に変更しました`,
-        removedItemizedReceiptRequiredAmount: (oldValue: string) => `品目別レシートの必須金額を削除しました(以前の値:「${oldValue}」)`,
+        removedItemizedReceiptRequiredAmount: (oldValue: string) => `明細化された領収書の必須金額を削除しました(以前の値:「${oldValue}」)`,
         setMaxExpenseAmount: (newValue: string) => `最大経費金額を「${newValue}」に設定`,
         changedMaxExpenseAmount: (oldValue: string, newValue: string) => `上限経費額を「${newValue}」に変更しました(以前は「${oldValue}」)`,
         removedMaxExpenseAmount: (oldValue: string) => `最大経費金額を削除しました(以前の値: 「${oldValue}」)`,
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 130b06a3..07ef31ee 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -7278,10 +7278,10 @@ Voeg meer bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
         setReceiptRequiredAmount: (newValue: string) => `stel het vereiste bonbedrag in op "${newValue}"`,
         changedReceiptRequiredAmount: (oldValue: string, newValue: string) => `heeft het vereiste bonbedrag gewijzigd naar "${newValue}" (voorheen "${oldValue}")`,
         removedReceiptRequiredAmount: (oldValue: string) => `vereiste bedrag op verwijderde bon (voorheen “${oldValue}”)`,
-        setItemizedReceiptRequiredAmount: (newValue: string) => `stel het vereiste bedrag voor de gespecificeerde bon in op "${newValue}"`,
+        setItemizedReceiptRequiredAmount: (newValue: string) => `bedrag voor gespecificeerde bon ingesteld op ‘${newValue}’`,
         changedItemizedReceiptRequiredAmount: (oldValue: string, newValue: string) =>
-            `heeft het vereiste bedrag voor gespecificeerde bonnen gewijzigd naar "${newValue}" (voorheen "${oldValue}")`,
-        removedItemizedReceiptRequiredAmount: (oldValue: string) => `vereist bedrag voor gespecificeerde bon verwijderd (voorheen "${oldValue}")`,
+            `heeft het vereiste bedrag voor gespecificeerde bonnen gewijzigd naar ‘${newValue}’ (voorheen ‘${oldValue}’)`,
+        removedItemizedReceiptRequiredAmount: (oldValue: string) => `heeft het vereiste bedrag voor gespecificeerde bonnen verwijderd (voorheen "${oldValue}")`,
         setMaxExpenseAmount: (newValue: string) => `maximumbedrag voor uitgave instellen op "${newValue}"`,
         changedMaxExpenseAmount: (oldValue: string, newValue: string) => `maximale onkostensom gewijzigd naar "${newValue}" (voorheen "${oldValue}")`,
         removedMaxExpenseAmount: (oldValue: string) => `maximaal bedrag voor uitgave verwijderd (voorheen "${oldValue}")`,
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 5b8d5db8..aaa3673e 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -7268,9 +7268,9 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
         setReceiptRequiredAmount: (newValue: string) => `ustaw wymaganą kwotę paragonu na „${newValue}”`,
         changedReceiptRequiredAmount: (oldValue: string, newValue: string) => `zmienił(a) wymaganą kwotę paragonu na „${newValue}” (wcześniej „${oldValue}”)`,
         removedReceiptRequiredAmount: (oldValue: string) => `usunięto wymagany limit paragonu (wcześniej „${oldValue}”)`,
-        setItemizedReceiptRequiredAmount: (newValue: string) => `ustaw wymaganą kwotę z wyszczególnionego paragonu na „${newValue}”`,
-        changedItemizedReceiptRequiredAmount: (oldValue: string, newValue: string) => `zmienił wymaganą kwotę za zindeksowany paragon na „${newValue}” (wcześniej „${oldValue}”)`,
-        removedItemizedReceiptRequiredAmount: (oldValue: string) => `usunięto wymaganą kwotę z rozbitego paragonu (wcześniej „${oldValue}”)`,
+        setItemizedReceiptRequiredAmount: (newValue: string) => `ustaw wymaganą kwotę z rozbiciem paragonu na „${newValue}”`,
+        changedItemizedReceiptRequiredAmount: (oldValue: string, newValue: string) => `zmienił wymaganą kwotę z wyszczególnionym paragonem na „${newValue}” (wcześniej „${oldValue}”)`,
+        removedItemizedReceiptRequiredAmount: (oldValue: string) => `usunięto wymaganą kwotę z paragonu ze szczegółami (wcześniej „${oldValue}”)`,
         setMaxExpenseAmount: (newValue: string) => `ustaw maksymalną kwotę wydatku na „${newValue}”`,
         changedMaxExpenseAmount: (oldValue: string, newValue: string) => `zmieniono maksymalną kwotę wydatku na „${newValue}” (wcześniej „${oldValue}”)`,
         removedMaxExpenseAmount: (oldValue: string) => `usunięto maksymalną kwotę wydatku (wcześniej „${oldValue}”)`,
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 56ae3263..66d7690c 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -7270,9 +7270,9 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
         setReceiptRequiredAmount: (newValue: string) => `definir valor exigido do recibo como "${newValue}"`,
         changedReceiptRequiredAmount: (oldValue: string, newValue: string) => `alterou o valor obrigatório do recibo para "${newValue}" (antes "${oldValue}")`,
         removedReceiptRequiredAmount: (oldValue: string) => `removeu o valor obrigatório do recibo (antes era "${oldValue}")`,
-        setItemizedReceiptRequiredAmount: (newValue: string) => `definir o valor obrigatório do recibo detalhado como "${newValue}"`,
+        setItemizedReceiptRequiredAmount: (newValue: string) => `definir valor exigido de recibo detalhado como "${newValue}"`,
         changedItemizedReceiptRequiredAmount: (oldValue: string, newValue: string) => `alterou o valor obrigatório do recibo detalhado para "${newValue}" (antes "${oldValue}")`,
-        removedItemizedReceiptRequiredAmount: (oldValue: string) => `removeu o valor exigido de recibo detalhado (antes era "${oldValue}")`,
+        removedItemizedReceiptRequiredAmount: (oldValue: string) => `removeu o valor obrigatório do recibo detalhado (antes "${oldValue}")`,
         setMaxExpenseAmount: (newValue: string) => `definir valor máximo da despesa como "${newValue}"`,
         changedMaxExpenseAmount: (oldValue: string, newValue: string) => `alterou o valor máximo da despesa para "${newValue}" (antes "${oldValue}")`,
         removedMaxExpenseAmount: (oldValue: string) => `removeu o valor máximo de despesa (anteriormente "${oldValue}")`,
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 8a955441..9dbbbd55 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -7087,9 +7087,9 @@ ${reportName}
         setReceiptRequiredAmount: (newValue: string) => `将需要收据的金额设置为“${newValue}”`,
         changedReceiptRequiredAmount: (oldValue: string, newValue: string) => `已将所需收据金额更改为“${newValue}”(之前为“${oldValue}”)`,
         removedReceiptRequiredAmount: (oldValue: string) => `已移除所需收据金额(先前为“${oldValue}”)`,
-        setItemizedReceiptRequiredAmount: (newValue: string) => `将分项收据所需金额设置为”${newValue}”`,
-        changedItemizedReceiptRequiredAmount: (oldValue: string, newValue: string) => `将逐项列示收据的必填金额更改为 “${newValue}”(之前为 “${oldValue}”)`,
-        removedItemizedReceiptRequiredAmount: (oldValue: string) => `已移除按项目明细收据所需金额(先前为”${oldValue}”)`,
+        setItemizedReceiptRequiredAmount: (newValue: string) => `将分项目收据所需金额设置为“${newValue}”`,
+        changedItemizedReceiptRequiredAmount: (oldValue: string, newValue: string) => `已将逐项收据必填金额更改为“${newValue}”(原为“${oldValue}”)`,
+        removedItemizedReceiptRequiredAmount: (oldValue: string) => `已移除逐项收据所需金额(之前为“${oldValue}”)`,
         setMaxExpenseAmount: (newValue: string) => `将最高报销金额设置为”${newValue}”`,
         changedMaxExpenseAmount: (oldValue: string, newValue: string) => `将最高报销金额更改为 “${newValue}”(之前为 “${oldValue}”)`,
         removedMaxExpenseAmount: (oldValue: string) => `已移除最⾼报销金额(原为“${oldValue}”)`,

Note

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

View workflow run

@codecov

codecov Bot commented Apr 16, 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/CONST/index.ts 92.30% <ø> (ø)
src/libs/ReportActionsUtils.ts 76.68% <100.00%> (+0.14%) ⬆️
...x/report/actionContents/PolicyChangeLogContent.tsx 100.00% <100.00%> (ø)
src/libs/ReportNameUtils.ts 82.54% <50.00%> (-0.92%) ⬇️
src/libs/SidebarUtils.ts 80.50% <50.00%> (-0.11%) ⬇️
...es/inbox/report/ContextMenu/ContextMenuActions.tsx 44.14% <50.00%> (+0.01%) ⬆️
... and 15 files with indirect coverage changes

@dangrous

Copy link
Copy Markdown
Contributor

@thelullabyy making sure you saw this new PR that melvin created for some reason

@thelullabyy

Copy link
Copy Markdown
Contributor

@MelvinBot Please tick all the checkboxes in PR desc and open this PR for review

@MelvinBot MelvinBot marked this pull request as ready for review April 20, 2026 17:54
@MelvinBot MelvinBot requested a review from a team as a code owner April 20, 2026 17:54
@melvin-bot melvin-bot Bot requested review from JmillsExpensify and jjcoffee and removed request for a team April 20, 2026 17:54
@melvin-bot

melvin-bot Bot commented Apr 20, 2026

Copy link
Copy Markdown

@jjcoffee 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 and JmillsExpensify April 20, 2026 17:54
@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Done! I've:

  1. Ticked all checkboxes in the PR description
  2. Marked this PR as ready for review

@thelullabyy

thelullabyy commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

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 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 Screenshot 2026-04-29 at 11 35 14
Android: mWeb Chrome Screenshot 2026-04-29 at 11 30 10
iOS: HybridApp
iOS: mWeb Safari Screenshot 2026-04-29 at 11 20 58
MacOS: Chrome / Safari
Screen.Recording.2026-04-29.at.11.18.39.mov

@thelullabyy

Copy link
Copy Markdown
Contributor

@jjcoffee Looks like there is a mistake in auto assignment. Please ignore this PR. I will review it. Thx

@thelullabyy

Copy link
Copy Markdown
Contributor

@codex review

Comment thread src/languages/es.ts
setReceiptRequiredAmount: (newValue) => `estableció el importe requerido del recibo en "${newValue}"`,
changedReceiptRequiredAmount: (oldValue, newValue) => `cambió el importe requerido del recibo a "${newValue}" (antes "${oldValue}")`,
removedReceiptRequiredAmount: (oldValue) => `eliminó el importe requerido del recibo (antes "${oldValue}")`,
setItemizedReceiptRequiredAmount: (newValue) => `estableció el importe requerido del recibo detallado en "${newValue}"`,

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.

Confirming here

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.

Bump again here

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.

It is confirmed

Comment thread src/languages/en.ts
setReceiptRequiredAmount: (newValue: string) => `set receipt required amount to "${newValue}"`,
changedReceiptRequiredAmount: (oldValue: string, newValue: string) => `changed receipt required amount to "${newValue}" (previously "${oldValue}")`,
removedReceiptRequiredAmount: (oldValue: string) => `removed receipt required amount (previously "${oldValue}")`,
setItemizedReceiptRequiredAmount: (newValue: string) => `set itemized receipt required amount to "${newValue}"`,

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.

Confirmed here

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

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

@thelullabyy

Copy link
Copy Markdown
Contributor

@MelvinBot Please add this test case to QA Steps and Tests part in PR description

  1. Login to ND
  2. Create a workspace --> Enable Rules
  3. Set/Remove value in Itemized receipt required amount
  4. Verify that the threads in #admin room shows correct message for each action
    set itemized receipt required amount to "$AMOUNT"
    removed itemized receipt required amount (previously "$AMOUNT")

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Updated the PR description — added the test case to both the Tests and QA Steps sections.

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

LGTM!

But... we still need Spanish copy confirmation here

@melvin-bot melvin-bot Bot changed the title Add itemized receipt changelog support and fix manual approval threshold bug [Payment due @thelullabyy] Add itemized receipt changelog support and fix manual approval threshold bug Apr 29, 2026
@melvin-bot

melvin-bot Bot commented Apr 29, 2026

Copy link
Copy Markdown

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

A payment issue will be created for your review once this PR is deployed to production.
E/E issue linked to the PR - https://www.github.com/Expensify/Expensify/issues/616183.

If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created.

@thelullabyy

Copy link
Copy Markdown
Contributor

@dangrous looks like Melvin failed for assignment... Ping you here to make sure u know it

@dangrous dangrous requested review from dangrous and removed request for jjcoffee May 1, 2026 20:47
@dangrous

dangrous commented May 1, 2026

Copy link
Copy Markdown
Contributor

Ah, annoying, will look!

@dangrous dangrous merged commit f81642b into main May 4, 2026
68 of 72 checks passed
@dangrous dangrous deleted the claude-updateItemizedReceiptChangelog-clean-v2 branch May 4, 2026 20:03
@OSBotify

OSBotify commented May 4, 2026

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

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

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

@OSBotify

OSBotify commented May 5, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/dangrous in version: 9.3.67-0 🚀

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

Bundle Size Analysis (Sentry):

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site changes are required for this PR.

Reason: This PR adds frontend display support for changelog messages (shown in the #admin room) when the "Itemized receipt required amount" setting is changed, and fixes a bug in the manual approval threshold message. The underlying feature — setting itemized receipt required amounts — already exists and is already documented in the help site:

Since no new user-facing features, UI labels, or workflows were added or changed, no docs updates are needed.

@OSBotify

OSBotify commented May 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/francoisl in version: 9.3.67-13 🚀

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

@melvin-bot

melvin-bot Bot commented May 6, 2026

Copy link
Copy Markdown

🤖 Payment issue created: #89823

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.

4 participants