Skip to content

[Home Page] Add Review X expenses action to For you to surface expenses against company expense policy#91983

Merged
grgia merged 16 commits into
Expensify:mainfrom
software-mansion-labs:@adamgrzybowski/review-x-expenses
Jun 12, 2026
Merged

[Home Page] Add Review X expenses action to For you to surface expenses against company expense policy#91983
grgia merged 16 commits into
Expensify:mainfrom
software-mansion-labs:@adamgrzybowski/review-x-expenses

Conversation

@adamgrzybowski

Copy link
Copy Markdown
Contributor

Explanation of Change

  • Add a Review X expenses row to Home's For you slot, above Submit/Approve/Pay/Export, that surfaces policy-flagged expenses on the user's Draft expense reports aggregated across workspaces.
  • Drive it from a new flaggedExpenses Onyx derived value + flaggedExpensesReviewSelector; Begin navigates to the first flagged expense's parent report (RHP on wide, full route on narrow) with backTo: ROUTES.HOME.

Fixed Issues

$ #91704
PROPOSAL:

Tests

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

  1. As an employee, create two expenses on Draft reports across two workspaces with missing categories so each is policy-flagged.
  2. Open Home and verify For you shows Review 2 expenses above Submit/Approve/Pay/Export with the exclamation icon and Begin button.
  3. Tap Begin and verify it opens the first flagged expense's parent report (RHP on wide, full screen on narrow) with backTo=/home.
  4. Resolve one violation and verify the row updates to Review 1 expense immediately; resolve the last one and verify the row disappears.
  5. As a user with no flagged expenses on Draft reports, verify the Review row is not rendered.

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
    • 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

Pending capture — to be attached before review.

Android: mWeb Chrome

Pending capture — to be attached before review.

iOS: Native

Pending capture — to be attached before review.

iOS: mWeb Safari

Pending capture — to be attached before review.

MacOS: Chrome / Safari

Pending capture — to be attached before review.

@adamgrzybowski adamgrzybowski requested review from a team as code owners May 28, 2026 15:16
@melvin-bot melvin-bot Bot requested a review from ZhenjaHorbach May 28, 2026 15:16
@melvin-bot

melvin-bot Bot commented May 28, 2026

Copy link
Copy Markdown

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

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

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

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

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

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

@melvin-bot melvin-bot Bot requested review from heyjennahay and removed request for a team May 28, 2026 15:16
@melvin-bot

melvin-bot Bot commented May 28, 2026

Copy link
Copy Markdown

@ZhenjaHorbach 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]

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0700258610

ℹ️ About Codex in GitHub

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

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

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

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

Comment thread src/pages/home/ForYouSection/index.tsx
Comment thread src/libs/actions/OnyxDerived/configs/flaggedExpenses.ts
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

@dubielzyk-expensify

Copy link
Copy Markdown
Contributor

Hey, sorry last minute change, but can we change the icon and color?

image

Here's the icon, though it might be checked in already. Maybe @Expensify/design know

receipt-search.svg.zip

@JmillsExpensify

Copy link
Copy Markdown
Contributor

Thanks! @adamgrzybowski let me know when we're ready for another round of adhoc testing.

@adamgrzybowski adamgrzybowski requested a review from a team as a code owner June 1, 2026 16:54
@adamgrzybowski

Copy link
Copy Markdown
Contributor Author

@JmillsExpensify Could you please run the parrot and take a second look at the PR?

@ZhenjaHorbach

Copy link
Copy Markdown
Contributor

@adamgrzybowski
Let's update the branch to the latest version of main!

@ZhenjaHorbach

ZhenjaHorbach commented Jun 2, 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
IMG_2430.MP4
Android: mWeb Chrome
2026-06-09.17.04.18.mov
iOS: HybridApp
IMG_2430.MP4
iOS: mWeb Safari
2026-06-09.17.04.18.mov
MacOS: Chrome / Safari
2026-06-09.17.02.19.mov

Comment thread src/hooks/useNavigateToTransactionThread.ts Outdated
@OSBotify

OSBotify commented Jun 2, 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 9a5d4384381..5f16a3ad188 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -1005,6 +1005,7 @@ const translations: TranslationDeepObject<typeof en> = {
                 f1FlagsTitle: 'Alles erledigt',
                 f1FlagsDescription: 'Sie haben alle offenen Aufgaben abgeschlossen.',
             },
+            reviewExpenses: ({count}: {count: number}) => `Überprüfen Sie ${count} ${count === 1 ? 'Ausgabe' : 'Spesen'}`,
         },
         upcomingTravel: 'Bevorstehende Reisen',
         upcomingTravelSection: {
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 9ed06f7e346..471f0899f1a 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -985,6 +985,7 @@ const translations: TranslationDeepObject<typeof en> = {
                 f1FlagsTitle: 'Todo al día',
                 f1FlagsDescription: 'Has completado todas las tareas pendientes.',
             },
+            reviewExpenses: ({count}: {count: number}) => `Revisa ${count} ${count === 1 ? 'gasto' : 'gastos'}`,
         },
         gettingStartedSection: {
             title: 'Primeros pasos',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index b6b2a780154..a4d1fd03f3c 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -1008,6 +1008,7 @@ const translations: TranslationDeepObject<typeof en> = {
                 f1FlagsTitle: 'Tout est à jour',
                 f1FlagsDescription: 'Vous avez terminé toutes les tâches en cours.',
             },
+            reviewExpenses: ({count}: {count: number}) => `Examiner ${count} ${count === 1 ? 'dépense' : 'dépenses'}`,
         },
         upcomingTravel: 'Voyages à venir',
         upcomingTravelSection: {
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 705ae2ec94d..d18c7039ba5 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -1006,6 +1006,7 @@ const translations: TranslationDeepObject<typeof en> = {
                 f1FlagsTitle: 'Tutto a posto',
                 f1FlagsDescription: 'Hai completato tutte le attività in sospeso.',
             },
+            reviewExpenses: ({count}: {count: number}) => `Esamina ${count} ${count === 1 ? 'spesa' : 'spese'}`,
         },
         upcomingTravel: 'Prossimi viaggi',
         upcomingTravelSection: {
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 22dff193299..230674aef9a 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -989,6 +989,7 @@ const translations: TranslationDeepObject<typeof en> = {
                 f1FlagsTitle: 'すべて確認済みです',
                 f1FlagsDescription: 'すべての未処理の To-do が完了しました。',
             },
+            reviewExpenses: ({count}: {count: number}) => `${count} 件の${count === 1 ? '経費' : '経費'}を確認`,
         },
         upcomingTravel: '今後の出張',
         upcomingTravelSection: {
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index b6f95c44ed3..477ce90bbae 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -1004,6 +1004,7 @@ const translations: TranslationDeepObject<typeof en> = {
                 f1FlagsTitle: 'Helemaal bij',
                 f1FlagsDescription: "Je hebt alle openstaande to-do's afgerond.",
             },
+            reviewExpenses: ({count}: {count: number}) => `Beoordeel ${count} ${count === 1 ? 'uitgave' : 'uitgaven'}`,
         },
         upcomingTravel: 'Aankomende reizen',
         upcomingTravelSection: {
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 1fe87f4ec8c..75b68ef8090 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -1006,6 +1006,7 @@ const translations: TranslationDeepObject<typeof en> = {
                 f1FlagsTitle: 'Wszystko nadrobione',
                 f1FlagsDescription: 'Ukończyłeś wszystkie zaległe zadania.',
             },
+            reviewExpenses: ({count}: {count: number}) => `Przejrzyj ${count} ${count === 1 ? 'wydatek' : 'wydatki'}`,
         },
         upcomingTravel: 'Nadchodząca podróż',
         upcomingTravelSection: {
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 394be17dc88..5fb2e3a69df 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -1004,6 +1004,7 @@ const translations: TranslationDeepObject<typeof en> = {
                 f1FlagsTitle: 'Tudo em dia',
                 f1FlagsDescription: 'Você concluiu todas as tarefas pendentes.',
             },
+            reviewExpenses: ({count}: {count: number}) => `Revisar ${count} ${count === 1 ? 'despesa' : 'despesas'}`,
         },
         upcomingTravel: 'Próximas viagens',
         upcomingTravelSection: {
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 8013eff5912..afe96f3cd94 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -972,6 +972,7 @@ const translations: TranslationDeepObject<typeof en> = {
                 f1FlagsTitle: '全部完成',
                 f1FlagsDescription: '你已完成所有未完成的待办事项。',
             },
+            reviewExpenses: ({count}: {count: number}) => `审核 ${count} ${count === 1 ? '费用' : '费用'}`,
         },
         upcomingTravel: '即将出行',
         upcomingTravelSection: {

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 Jun 3, 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/ONYXKEYS.ts 100.00% <ø> (ø)
...rc/components/Icon/chunks/expensify-icons.chunk.ts 0.00% <ø> (ø)
...rc/libs/actions/OnyxDerived/ONYX_DERIVED_VALUES.ts 100.00% <ø> (ø)
...actions/replaceOptimisticReportWithActualReport.ts 98.88% <100.00%> (+0.06%) ⬆️
src/pages/home/ForYouSection/index.tsx 100.00% <100.00%> (ø)
...ges/home/ForYouSection/useReviewFlaggedExpenses.ts 100.00% <100.00%> (ø)
src/selectors/Todos.ts 100.00% <100.00%> (ø)
...ibs/actions/OnyxDerived/configs/flaggedExpenses.ts 97.72% <97.72%> (ø)
...tView/MoneyRequestReportTransactionsNavigation.tsx 1.23% <0.00%> (-0.02%) ⬇️
...stReportView/MoneyRequestReportTransactionList.tsx 0.58% <0.00%> (+0.02%) ⬆️
... and 1 more
... and 16 files with indirect coverage changes

@adamgrzybowski

adamgrzybowski commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@ZhenjaHorbach PR is ready for next steps

@adamgrzybowski

Copy link
Copy Markdown
Contributor Author

In that case, it's probably ready to merge. The eslint problems aren't related to this PR

@ZhenjaHorbach

ZhenjaHorbach commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@ZhenjaHorbach I would say let's do it as a follow-up. Since we don't have a reliable repro, it may be hard for me to debug this, and it could hold this PR for some time. Also, it doesn't look like a deal breaker

cc: @JmillsExpensify

Hmmm
Okay then
I don't mind!

@ZhenjaHorbach

Copy link
Copy Markdown
Contributor

@ZhenjaHorbach I would say let's do it as a follow-up. Since we don't have a reliable repro, it may be hard for me to debug this, and it could hold this PR for some time. Also, it doesn't look like a deal breaker
cc: @JmillsExpensify

And it would be nice to fix this also
#91983 (comment)
Because the bug is still annoying 😁

@ZhenjaHorbach

ZhenjaHorbach commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

And actually this bug is more critical on native apps
#91983 (comment)

IMG_2430.MP4

@ZhenjaHorbach

ZhenjaHorbach commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

And I hope only I don't have an icon for the Review X expenses field for native apps? 😅
CC: @JmillsExpensify

Снимок экрана — 2026-06-09 в 17 10 23

@adamgrzybowski

adamgrzybowski commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

And I hope only I don't have an icon for the Review X expenses field for native apps? 😅

Yeah, this seems to be much worse on mobile. I will reach you on Slack so we can figure out the repro.

cc: @ZhenjaHorbach

@JmillsExpensify

Copy link
Copy Markdown
Contributor

Agreed, it's a fair point on native. Let's address that.

Copy link
Copy Markdown
Contributor

We coming back to this one soon?

@adamgrzybowski

Copy link
Copy Markdown
Contributor Author

@JmillsExpensify We bumped into some weird reproduction issues with @ZhenjaHorbach, but it was probably local setup / cache / something else broken.

Now we both can't reproduce the issues, so we should be good to go

@adamgrzybowski

Copy link
Copy Markdown
Contributor Author

@JmillsExpensify Okay, so It's not obvious. @ZhenjaHorbach just reproduced it again, but it's really not deterministic. I will continue investigating it

@ZhenjaHorbach

Copy link
Copy Markdown
Contributor

I think we can merge and see if QA team can reproduce it
But I think this is a hard-to-reproduce edge case

Copy link
Copy Markdown
Contributor

I like that idea.

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

Going to go ahead and approve

@melvin-bot melvin-bot Bot requested review from grgia and mountiny June 11, 2026 13:58
const currentUserEmail = session?.email ?? '';
const flaggedExpenses: FlaggedExpenseEntry[] = [];

for (const transactionKey of Object.keys(allTransactions)) {

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.

is this list sorted @adamgrzybowski

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.

Nope, should I sort it? If yes, what should I compare?

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.

Either transaction date or created by date. But I think we can leave as is for now. I'm going to merge

@grgia grgia merged commit d74c031 into Expensify:main Jun 12, 2026
39 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

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

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/grgia in version: 9.4.7-0 🚀

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

Bundle Size Analysis (Sentry):

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Reviewed this PR for help site impact.

Changes are required. This PR adds a new Review X expenses item to Home's For you section, which surfaces policy-flagged expenses on a submitter's draft reports. The existing Understanding the For you Section article lists the items that can appear (Submit, Approve, Pay, Export, Fix) but does not mention Review.

I created a draft help site PR documenting the new item: #93480

It adds Review to the list of items, lists it under the Submitter role, and notes where the item routes (the first flagged expense).

@adamgrzybowski, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review.

@lanitochka17

Copy link
Copy Markdown

Deploy Blocker ##93499 was identified to be related to this PR

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.

8 participants