Skip to content

feat: Add support for group-by:approver - #102635

Open
nkdengineer wants to merge 25 commits into
Expensify:mainfrom
nkdengineer:fix/99931
Open

nkdengineer wants to merge 25 commits into
Expensify:mainfrom
nkdengineer:fix/99931

Conversation

@nkdengineer

@nkdengineer nkdengineer commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

feat: Add support for group-by:violation-approver

Fixed Issues

$ #99931
#99932
#99933

PROPOSAL:

Tests

Precondition:

  • Add a member with a two-level approval workflow, so her reports go to approver 1 and then to approver 2
  • As a member, submit a report with one expense
  • Approver 1 approves this expense, and then approver 2 approves this expense
  1. Sign in as a member
  2. Open Spend > Expense
  3. Open Display> Group by
  4. Verify that the Approver option appears
  5. Select this option
  6. Verify the result appears
  7. Expand a row
  8. Verify that the transactions are loaded
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

Same as test

  • 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 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 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)
  • 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 the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Screen.Recording.2026-10-23.at.23.04.57.mov
Android: mWeb Chrome
Screen.Recording.2026-10-23.at.23.02.26.mov
iOS: Native
Screen.Recording.2026-10-23.at.23.04.40.mov
iOS: mWeb Safari
Screen.Recording.2026-10-23.at.23.05.38.mov
MacOS: Chrome / Safari
Screen.Recording.2026-10-23.at.23.01.28.mov

@melvin-bot

melvin-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown

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

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

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

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

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

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

@nkdengineer
nkdengineer marked this pull request as ready for review October 1, 2026 05:25
@nkdengineer
nkdengineer requested review from a team as code owners October 1, 2026 05:25
@melvin-bot
melvin-bot Bot requested review from daledah and flaviadefaria October 1, 2026 05:25
@melvin-bot

melvin-bot Bot commented Oct 1, 2026

Copy link
Copy Markdown

@daledah 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 requested review from a team and removed request for a team October 1, 2026 05:25
@codecov

codecov Bot commented Oct 1, 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 95.90% <ø> (ø)
...ponents/Search/SearchList/ListItem/GroupHeader.tsx 90.95% <ø> (+0.23%) ⬆️
...h/SearchList/ListItem/TransactionGroupListItem.tsx 85.93% <100.00%> (+0.16%) ⬆️
src/components/Search/SearchList/ListItem/types.ts 100.00% <ø> (ø)
src/components/Search/hooks/useGroupedItems.ts 88.00% <100.00%> (+0.50%) ⬆️
...c/components/Search/hooks/useUpdateFilterQuery.tsx 80.64% <100.00%> (+3.72%) ⬆️
src/pages/Search/SearchColumnsPage.tsx 90.90% <100.00%> (+0.21%) ⬆️
src/styles/utils/index.ts 67.39% <0.00%> (+0.15%) ⬆️
src/components/Search/SearchTableHeader.tsx 51.42% <0.00%> (-1.00%) ⬇️
src/components/Search/chartGroupByConfig.ts 33.33% <0.00%> (-1.45%) ⬇️
... and 4 more
... and 127 files with indirect coverage changes

Comment thread src/libs/SearchUIUtils.ts Outdated
@OSBotify

OSBotify commented Oct 1, 2026

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 8eeada0a..582f5559 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -9943,7 +9943,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
                 [CONST.SEARCH.GROUP_BY.WEEK]: 'Woche',
                 [CONST.SEARCH.GROUP_BY.YEAR]: 'Jahr',
                 [CONST.SEARCH.GROUP_BY.QUARTER]: 'Quartal',
-                [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Verstoßgenehmiger',
+                [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Verstoßgenehmigende Person',
             },
             feed: 'Feed',
             withdrawalType: {
@@ -9953,8 +9953,8 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
             },
             is: 'Ist',
             has: {submittedViolation: 'Eingereichter Verstoß', approvedViolation: 'Genehmigter Verstoß'},
-            approvalCount: 'Anzahl der Genehmigungen',
-            approvedTotal: 'Genehmigter Gesamtbetrag',
+            approvalCount: 'Genehmigungsanzahl',
+            approvedTotal: 'Genehmigte Gesamtsumme',
             action: {
                 [CONST.SEARCH.ACTION_FILTERS.SUBMIT]: 'Senden',
                 [CONST.SEARCH.ACTION_FILTERS.APPROVE]: 'Genehmigen',
@@ -9998,7 +9998,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
             [CONST.SEARCH.GROUP_BY.WEEK]: 'Wochen',
             [CONST.SEARCH.GROUP_BY.YEAR]: 'Jahre',
             [CONST.SEARCH.GROUP_BY.QUARTER]: 'Quartale',
-            [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Verstoßgenehmiger',
+            [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Verstoßgenehmigende Personen',
         },
         moneyRequestReport: {emptyStateTitle: 'Noch keine Ausgaben', accessPlaceHolder: 'Für Details öffnen'},
         noCategory: 'Keine Kategorie',
diff --git a/src/languages/el.ts b/src/languages/el.ts
index e185137c..37ed8917 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -10151,7 +10151,7 @@ ${reportName}`,
                 [CONST.SEARCH.GROUP_BY.WEEK]: 'Εβδομάδα',
                 [CONST.SEARCH.GROUP_BY.YEAR]: 'Έτος',
                 [CONST.SEARCH.GROUP_BY.QUARTER]: 'Τρίμηνο',
-                [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Εγκριτής παραβάσεων',
+                [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Εγκρίνων παραβάσεων',
             },
             feed: 'Ροή',
             withdrawalType: {
@@ -10167,8 +10167,8 @@ ${reportName}`,
                 [CONST.SEARCH.ACTION_FILTERS.EXPORT]: 'Εξαγωγή',
             },
             has: {submittedViolation: 'Υποβληθείσα παράβαση', approvedViolation: 'Εγκεκριμένη παράβαση'},
-            approvalCount: 'Αριθμός εγκρίσεων',
-            approvedTotal: 'Εγκεκριμένο σύνολο',
+            approvalCount: 'Μετρητής εγκρίσεων',
+            approvedTotal: 'Συνολικό εγκεκριμένο ποσό',
             filterType: {
                 label: 'Τύπος φίλτρου',
                 has: {positive: 'έχει', negative: 'δεν έχει'},
@@ -10208,9 +10208,9 @@ ${reportName}`,
             [CONST.SEARCH.GROUP_BY.DAY]: 'Ημέρες',
             [CONST.SEARCH.GROUP_BY.MONTH]: 'Μήνες',
             [CONST.SEARCH.GROUP_BY.WEEK]: 'Εβδομάδες',
-            [CONST.SEARCH.GROUP_BY.YEAR]: 'Έτη',
+            [CONST.SEARCH.GROUP_BY.YEAR]: 'Χρόνια',
             [CONST.SEARCH.GROUP_BY.QUARTER]: 'Τρίμηνα',
-            [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Εγκριτές παραβάσεων',
+            [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Εγκρίνοντες παραβάσεων',
         },
         moneyRequestReport: {
             emptyStateTitle: 'Καμία δαπάνη ακόμη',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 06e08396..25452686 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -9789,9 +9789,9 @@ ${reportName}`,
             groupBy: {
                 [CONST.SEARCH.GROUP_BY.FROM]: 'De',
                 [CONST.SEARCH.GROUP_BY.CARD]: 'Tarjeta',
-                [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: 'ID de retiro',
+                [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: 'ID de retirada',
                 [CONST.SEARCH.GROUP_BY.CATEGORY]: 'Categoría',
-                [CONST.SEARCH.GROUP_BY.MERCHANT]: 'Comerciante',
+                [CONST.SEARCH.GROUP_BY.MERCHANT]: 'Comercio',
                 [CONST.SEARCH.GROUP_BY.TAG]: 'Etiqueta',
                 [CONST.SEARCH.GROUP_BY.DAY]: 'Día',
                 [CONST.SEARCH.GROUP_BY.MONTH]: 'Mes',
@@ -9832,7 +9832,7 @@ ${reportName}`,
             [CONST.SEARCH.GROUP_BY.CARD]: 'Tarjetas',
             [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: 'Exportaciones',
             [CONST.SEARCH.GROUP_BY.CATEGORY]: 'Categorías',
-            [CONST.SEARCH.GROUP_BY.MERCHANT]: 'Comerciantes',
+            [CONST.SEARCH.GROUP_BY.MERCHANT]: 'Comercios',
             [CONST.SEARCH.GROUP_BY.TAG]: 'Etiquetas',
             [CONST.SEARCH.GROUP_BY.DAY]: 'Días',
             [CONST.SEARCH.GROUP_BY.MONTH]: 'Meses',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 37796f6a..ac2a6f9a 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -10014,7 +10014,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
         chartTitles: {
             [CONST.SEARCH.GROUP_BY.FROM]: 'De',
             [CONST.SEARCH.GROUP_BY.CARD]: 'Cartes',
-            [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: 'Exports',
+            [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: 'Exportations',
             [CONST.SEARCH.GROUP_BY.CATEGORY]: 'Catégories',
             [CONST.SEARCH.GROUP_BY.MERCHANT]: 'Commerçants',
             [CONST.SEARCH.GROUP_BY.TAG]: 'Tags',
@@ -10023,7 +10023,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
             [CONST.SEARCH.GROUP_BY.WEEK]: 'Semaines',
             [CONST.SEARCH.GROUP_BY.YEAR]: 'Années',
             [CONST.SEARCH.GROUP_BY.QUARTER]: 'Trimestres',
-            [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Approbateurs des violations',
+            [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Approbateurs des infractions',
         },
         moneyRequestReport: {emptyStateTitle: 'Aucune dépense pour l’instant', accessPlaceHolder: 'Ouvrir pour plus de détails'},
         noCategory: 'Aucune catégorie',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index f9bec08e..bbb0d6c0 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -9898,7 +9898,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
                 [CONST.SEARCH.GROUP_BY.WEEK]: 'Settimana',
                 [CONST.SEARCH.GROUP_BY.YEAR]: 'Anno',
                 [CONST.SEARCH.GROUP_BY.QUARTER]: 'Trimestre',
-                [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Approvatore delle violazioni',
+                [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Responsabile violazioni',
             },
             feed: 'Feed',
             withdrawalType: {
@@ -9953,7 +9953,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
             [CONST.SEARCH.GROUP_BY.WEEK]: 'Settimane',
             [CONST.SEARCH.GROUP_BY.YEAR]: 'Anni',
             [CONST.SEARCH.GROUP_BY.QUARTER]: 'Trimestri',
-            [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Approvatori delle violazioni',
+            [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Approver delle violazioni',
         },
         moneyRequestReport: {emptyStateTitle: 'Nessuna spesa ancora', accessPlaceHolder: 'Apri per i dettagli'},
         noCategory: 'Nessuna categoria',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 1b598b68..2aeb9f40 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -9749,7 +9749,7 @@ ${reportName}`,
             groupBy: {
                 [CONST.SEARCH.GROUP_BY.FROM]: '差出人',
                 [CONST.SEARCH.GROUP_BY.CARD]: 'カード',
-                [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: '出金ID',
+                [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: '出金 ID',
                 [CONST.SEARCH.GROUP_BY.CATEGORY]: 'カテゴリ',
                 [CONST.SEARCH.GROUP_BY.MERCHANT]: '加盟店',
                 [CONST.SEARCH.GROUP_BY.TAG]: 'タグ',
@@ -9768,8 +9768,8 @@ ${reportName}`,
             },
             is: 'は',
             has: {submittedViolation: '違反を送信しました', approvedViolation: '承認済みの違反'},
-            approvalCount: '承認件数',
-            approvedTotal: '承認合計',
+            approvalCount: '承認数',
+            approvedTotal: '承認済み合計',
             action: {
                 [CONST.SEARCH.ACTION_FILTERS.SUBMIT]: '送信',
                 [CONST.SEARCH.ACTION_FILTERS.APPROVE]: '承認',
@@ -9804,7 +9804,7 @@ ${reportName}`,
             [CONST.SEARCH.GROUP_BY.TAG]: 'タグ',
             [CONST.SEARCH.GROUP_BY.DAY]: '日数',
             [CONST.SEARCH.GROUP_BY.MONTH]: '月数',
-            [CONST.SEARCH.GROUP_BY.WEEK]: '週数',
+            [CONST.SEARCH.GROUP_BY.WEEK]: '週間',
             [CONST.SEARCH.GROUP_BY.YEAR]: '年数',
             [CONST.SEARCH.GROUP_BY.QUARTER]: '四半期',
             [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: '違反承認者',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 0f8f7e5c..ffc4ddcf 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -9858,14 +9858,14 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
                 [CONST.SEARCH.GROUP_BY.CARD]: 'Kaart',
                 [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: 'Opname-ID',
                 [CONST.SEARCH.GROUP_BY.CATEGORY]: 'Categorie',
-                [CONST.SEARCH.GROUP_BY.MERCHANT]: 'Handelaar',
+                [CONST.SEARCH.GROUP_BY.MERCHANT]: 'Winkelier',
                 [CONST.SEARCH.GROUP_BY.TAG]: 'Label',
                 [CONST.SEARCH.GROUP_BY.DAY]: 'Dag',
                 [CONST.SEARCH.GROUP_BY.MONTH]: 'Maand',
                 [CONST.SEARCH.GROUP_BY.WEEK]: 'Week',
                 [CONST.SEARCH.GROUP_BY.YEAR]: 'Jaar',
                 [CONST.SEARCH.GROUP_BY.QUARTER]: 'Kwartaal',
-                [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Overtredingsgoedkeurder',
+                [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Schendinggoedkeurder',
             },
             feed: 'Feed',
             withdrawalType: {
@@ -9955,7 +9955,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
         chartTitles: {
             [CONST.SEARCH.GROUP_BY.FROM]: 'Van',
             [CONST.SEARCH.GROUP_BY.CARD]: 'Kaarten',
-            [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: 'Exporten',
+            [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: 'Exports',
             [CONST.SEARCH.GROUP_BY.CATEGORY]: 'Categorieën',
             [CONST.SEARCH.GROUP_BY.MERCHANT]: 'Handelaars',
             [CONST.SEARCH.GROUP_BY.TAG]: 'Tags',
@@ -9964,7 +9964,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
             [CONST.SEARCH.GROUP_BY.WEEK]: 'Weken',
             [CONST.SEARCH.GROUP_BY.YEAR]: 'Jaren',
             [CONST.SEARCH.GROUP_BY.QUARTER]: 'Kwartalen',
-            [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Overtredingsgoedkeurders',
+            [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Overtredingsfiatteurs',
         },
         spendOverTime: 'Uitgaven in de tijd',
         tabs: {
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 8889d031..329d7e1c 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -9872,7 +9872,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
             groupBy: {
                 [CONST.SEARCH.GROUP_BY.FROM]: 'Od',
                 [CONST.SEARCH.GROUP_BY.CARD]: 'Karta',
-                [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: 'Identyfikator wypłaty',
+                [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: 'ID wypłaty',
                 [CONST.SEARCH.GROUP_BY.CATEGORY]: 'Kategoria',
                 [CONST.SEARCH.GROUP_BY.MERCHANT]: 'Sprzedawca',
                 [CONST.SEARCH.GROUP_BY.TAG]: 'Tag',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 7b1f0f68..da7157ed 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -9854,16 +9854,16 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
             groupBy: {
                 [CONST.SEARCH.GROUP_BY.FROM]: 'De',
                 [CONST.SEARCH.GROUP_BY.CARD]: 'Cartão',
-                [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: 'ID do saque',
+                [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: 'ID de saque',
                 [CONST.SEARCH.GROUP_BY.CATEGORY]: 'Categoria',
-                [CONST.SEARCH.GROUP_BY.MERCHANT]: 'Estabelecimento',
-                [CONST.SEARCH.GROUP_BY.TAG]: 'Etiqueta',
+                [CONST.SEARCH.GROUP_BY.MERCHANT]: 'Comerciante',
+                [CONST.SEARCH.GROUP_BY.TAG]: 'Tag',
                 [CONST.SEARCH.GROUP_BY.DAY]: 'Dia',
                 [CONST.SEARCH.GROUP_BY.MONTH]: 'Mês',
                 [CONST.SEARCH.GROUP_BY.WEEK]: 'Semana',
                 [CONST.SEARCH.GROUP_BY.YEAR]: 'Ano',
                 [CONST.SEARCH.GROUP_BY.QUARTER]: 'Trimestre',
-                [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Aprovador de violações',
+                [CONST.SEARCH.GROUP_BY.VIOLATION_APPROVER]: 'Aprovador de violação',
             },
             feed: 'Feed',
             withdrawalType: {
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 6ed0132d..600f6397 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -9487,11 +9487,11 @@ ${reportName}`,
                 [CONST.SEARCH.SORT_ORDER.DESC]: '降序',
             },
             groupBy: {
-                [CONST.SEARCH.GROUP_BY.FROM]: '来自',
-                [CONST.SEARCH.GROUP_BY.CARD]: '卡片',
-                [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: '提现编号',
+                [CONST.SEARCH.GROUP_BY.FROM]: '发件人',
+                [CONST.SEARCH.GROUP_BY.CARD]: '卡',
+                [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: '提现 ID',
                 [CONST.SEARCH.GROUP_BY.CATEGORY]: '类别',
-                [CONST.SEARCH.GROUP_BY.MERCHANT]: '商户',
+                [CONST.SEARCH.GROUP_BY.MERCHANT]: '商家',
                 [CONST.SEARCH.GROUP_BY.TAG]: '标签',
                 [CONST.SEARCH.GROUP_BY.DAY]: '天',
                 [CONST.SEARCH.GROUP_BY.MONTH]: '月',
@@ -9508,8 +9508,8 @@ ${reportName}`,
             },
             is: '是',
             has: {submittedViolation: '已提交违规', approvedViolation: '已批准违规'},
-            approvalCount: '审批次数',
-            approvedTotal: '已审批总额',
+            approvalCount: '审批数量',
+            approvedTotal: '已批准总额',
             action: {
                 [CONST.SEARCH.ACTION_FILTERS.SUBMIT]: '提交',
                 [CONST.SEARCH.ACTION_FILTERS.APPROVE]: '批准',
@@ -9536,11 +9536,11 @@ ${reportName}`,
         has: '有',
         view: {label: '查看', table: '表格', bar: '栏', line: '折线', pie: '饼图'},
         chartTitles: {
-            [CONST.SEARCH.GROUP_BY.FROM]: '来自',
+            [CONST.SEARCH.GROUP_BY.FROM]: '发件人',
             [CONST.SEARCH.GROUP_BY.CARD]: '卡片',
             [CONST.SEARCH.GROUP_BY.WITHDRAWAL_ID]: '导出',
             [CONST.SEARCH.GROUP_BY.CATEGORY]: '类别',
-            [CONST.SEARCH.GROUP_BY.MERCHANT]: '商家',
+            [CONST.SEARCH.GROUP_BY.MERCHANT]: '商户',
             [CONST.SEARCH.GROUP_BY.TAG]: '标签',
             [CONST.SEARCH.GROUP_BY.DAY]: '天',
             [CONST.SEARCH.GROUP_BY.MONTH]: '月数',

Note

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

View workflow run

@daledah

daledah commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@nkdengineer BUG: After applying has:approved-violation groupBy:violation-approver, clicking the Reset button displays the Oops... Something went wrong page.

Screen.Recording.2026-10-02.at.12.21.33.mov

@trjExpensify
trjExpensify requested review from trjExpensify and removed request for flaviadefaria October 2, 2026 11:45
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
Built from App PR #102635.

Android 🤖 iOS 🍎
⏩ SKIPPED ⏩ ⏩ SKIPPED ⏩
The build for Android was skipped The build for iOS was skipped
Web 🕸️
https://102635.pr-testing.expensify.com
Web

👀 View the workflow run that generated this build 👀

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

Asked @neil-marcellini for some context on this group-by:violation-approver addition here in thread: https://expensify.slack.com/archives/C07HPDRELLD/p1790941165166729?thread_ts=1790607185.617899&cid=C07HPDRELLD

The HL had "Violations by approver" down to use group-by:to, the existing "To" column, and thus display the "To" column in the table:

Image

If it transpires that we couldn't do that for some tangible reason, it seems extraneous to have opted to call this Group by Violation approver and not simply Approver.

Image

Similarly, I see the groupTotal has been named Approval total which I don't understand why we deviated from Total like all of the other group by table views, including "Violations by submitter".

Image Image

Then lastly, where did we decide to add this Approval count column? It's identical to the existing Expenses group column which is a count.

Image

"Violations by submitter" doesn't have that, so I don't quite understand why we need to add it for "Violations by approver".

Image

@neil-marcellini

Copy link
Copy Markdown
Contributor

Answered in Slack

Comment thread src/languages/es.ts Outdated
@daledah

daledah commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

@nkdengineer please update the Tests section in your checklist to cover all threes PRs

@nkdengineer

Copy link
Copy Markdown
Contributor Author

@nkdengineer please update the Tests section in your checklist to cover all threes PRs

My test sections already cover all three PRs.

@nkdengineer

Copy link
Copy Markdown
Contributor Author

@daledah Ready for review now.

@daledah

daledah commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

on my list today

Comment thread src/libs/SearchUIUtils.ts
*
* Do not use directly, use only via `getSections()` facade.
*/
function getApproverSections(

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.

@nkdengineer getApproverSections repeats getMemberSections, should we write one generic helper (e.g. getPersonGroupSections) that takes the filter key and a buildItem callback, and call it from both.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think we should keep getApproverSections. It's easier to maintain the logic for the specific groupBy

@daledah

daledah commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

@nkdengineer BUG: After applying Sort by: approver, it displays the Oops... Something went wrong page.

Screen.Recording.2026-10-26.at.14.24.45.mov

@nkdengineer

Copy link
Copy Markdown
Contributor Author

@neil-marcellini Looks like sortBy:"groupApprover" is not supported.

@github-actions

Copy link
Copy Markdown
Contributor

It looks like this PR adds a search filter or column. Please double check the following:

  • The filter is available in the Search filters dropdown and returns the expected results.
  • The filter has a matching column that can be shown through Display > Edit columns.
  • The column can be sorted by clicking its header.
  • Export > Current view includes the column in the exported CSV.

@nkdengineer

Copy link
Copy Markdown
Contributor Author

@daledah The sortBy is supported now. Please review again.

@daledah

This comment has been minimized.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 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 ⚠️ Failed 2026-10-30T09:31:14.646137Z
We couldn’t complete this review. Comment @codex review to try again.
86ce0c7 Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Failed to set up container
ℹ️ 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".

@daledah

This comment has been minimized.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Provided git ref 86ce0c7d4adb1dbf442529302ffc8c4d111490c1 does not exist
ℹ️ 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".

@daledah

daledah commented Oct 30, 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 any copy / text that was added to the app 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 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
    • 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
    • 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 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 the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • 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.mov
MacOS: Chrome / Safari
web.mov

@daledah

daledah commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot please review this PR

@MelvinBot

Copy link
Copy Markdown
Contributor

Code review

The approver grouping follows the existing group-by patterns. I found one functional gap and one risky parser change that should be resolved before merge. The rest are minor.

Should fix

  1. Chart drill-down creates an approver: filter the rest of Search doesn't support. chartGroupByConfig.ts:141 adds approver:<accountID> to the query. But approver is not a key in SearchAdvancedFiltersForm, and buildFilterFormValuesFromQuery skips it. It is also missing from the user-ID substitution lists that from and assignee use. After you click a bar in chart view:

    • The search bar shows a raw account ID instead of a name.
    • No filter chip appears.
    • The filter will likely disappear when you change any other filter from the filter bar, because that path rebuilds the query from form values.

    Either set up approver as a full user filter, like from, or drill down some other way.

  2. The isDefaultSortValue change affects every grouping. searchParser.peggy:78-80 used to treat any grouping's default sort as "not user-chosen." Now only date and the current grouping's default count. buildQueryStringFromFilterFormValues writes sort-by before group-by (SearchQueryUtils.ts:1370-1385). So in that path, groupBy is still unset when the parser checks the sort. A leftover sort such as sort-by:groupCategory is then treated as user-chosen and survives a switch to group-by:approver. That is an invalid sort for the new grouping. Why was this change needed? If it isn't needed, please revert it. If it is, please add parser tests for a leftover sort with each order of sort-by and group-by.

Minor

  1. useSearchBulkActions.ts:467-474: TEMPLATE_EXPORTABLE_GROUP_BYS says to stay in sync with getSelectedGroupFilterEntry. The PR added APPROVER to that function (SearchUIUtils.ts:3197) but not to this set. Add it, or leave a comment saying why it's excluded.
  2. ApproverListItemHeader.tsx is almost a line-for-line copy of MemberListItemHeader.tsx. Consider reusing that component with a column-key prop. The copy also drops isSelectable from the name and email TextWithTooltips, so you can't select that text in the approver grouping.
  3. SearchUIUtils.ts:7841-7843 matches every new transaction to every approver group, so the new-expense highlight appears in all groups. FROM already does this, so it's acceptable if intended.
  4. The formatting-only changes in useUpdateFilterQuery.tsx and the Navigation.navigate call in SearchColumnsPage.tsx aren't related to this feature. Please revert them to keep the diff focused.

I reviewed the code only and did not run the app.

@nkdengineer

Copy link
Copy Markdown
Contributor Author

Either set up approver as a full user filter, like from, or drill down some other way.

@neil-marcellini Should we support a full user filter for approver? Or keep it as it is in this PR?

This branch has not been deployed

No deployments
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