[Home Page] Add Review X expenses action to For you to surface expenses against company expense policy#91983
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
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 --helpTypically, you'd want to translate only what you changed by running |
|
@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] |
There was a problem hiding this comment.
💡 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".
| key: 'reviewExpenses', | ||
| count: flaggedExpensesCount, | ||
| icon: icons.Exclamation, | ||
| translationKey: 'homePage.forYouSection.reviewExpenses' as const, |
There was a problem hiding this comment.
Add reviewExpenses to every locale
When a user is running any non-English locale and has flagged expenses, this new translation key is looked up from that locale, but the commit only adds homePage.forYouSection.reviewExpenses to en.ts. IntlStore.get() does not fall back to English for missing locale keys, so this path throws in development and shows/logs the raw missing key in production/staging. Please add the matching key to the other src/languages/* files before rendering this row.
Useful? React with 👍 / 👎.
| if (!violation) { | ||
| return false; | ||
| } | ||
| if (violation.showInReview === false) { |
There was a problem hiding this comment.
Ignore non-review warnings without showInReview
For cached/server violations where type is warning or notice and showInReview is omitted, this check treats them as reviewable because it only excludes showInReview === false. Other review visibility logic in the app only considers warnings/notices actionable when showInReview is true, so users can get a Review X expenses row for warnings that are not actually shown in review. Please gate warnings/notices on showInReview === true while still allowing real violation types.
Useful? React with 👍 / 👎.
|
🚧 @JmillsExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
Explanation of Change
Review X expensesrow to Home'sFor youslot, above Submit/Approve/Pay/Export, that surfaces policy-flagged expenses on the user's Draft expense reports aggregated across workspaces.flaggedExpensesOnyx derived value +flaggedExpensesReviewSelector;Beginnavigates to the first flagged expense's parent report (RHP on wide, full route on narrow) withbackTo: ROUTES.HOME.Fixed Issues
$ #91704
PROPOSAL:
Tests
Offline tests
QA Steps
For youshowsReview 2 expensesabove Submit/Approve/Pay/Export with the exclamation icon andBeginbutton.Beginand verify it opens the first flagged expense's parent report (RHP on wide, full screen on narrow) withbackTo=/home.Review 1 expenseimmediately; resolve the last one and verify the row disappears.Reviewrow is not rendered.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA steps**** sectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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.