Repository navigation
[Insights: Violations][R2]: Add the date filter any-approval - #101058
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 bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
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.
|
Reviewer Checklist
Screenshots/VideosiOS: HybridAppios.movMacOS: Chrome / SafariScreen.Recording.2026-09-29.at.16.58.48.mov |
|
@neil-marcellini could you please help to run the Generate static translations GitHub workflow here? |
|
@nkdengineer please resolve conflict |
|
Done. |
|
@neil-marcellini I updated the test steps and screen recording on web. |
|
Test is failing on main. |
neil-marcellini
left a comment
There was a problem hiding this comment.
AI has pointed out some problems relating to some of our existing limitations for using multiple filters. I'm sorry this is getting so messy. I started thinking more about it, and I think this limitation that we must have the has:approved-violation filter to use the any approval filter is overly restricting and unnecessary. I actually think that we should hold this until we fix the backend and remove the restriction. Here's the issue for it [Insights: Violations][R2] Allow the any-approval date filter without restrictions.
You should be able to revert this PR to the commit before I brought up handling the restriction and the tooltip.
Here's the problem I'm talking about with the PR currently that AI found. Due to limitations with multiple filters that we don't plan on changing, I don't think there's a great solution and it would be better to remove the restriction.
(Neil's AI agent)
- The auto-applied Has value means AND in one path and OR in the other
Observed (I ran both paths in a throwaway jest test at the PR head):
- Typed
type:expense has:receipt any-approval:last-monthbecomes... has:receipt anyApproval:last-month has:approved-violation.applyRequiredApprovedViolationToQueryappends a separatehas:term, which Auth ANDs. - Loading that query into the form gives
has: ['approved-violation'].receiptis gone, becausebuildFilterFormValuesFromQueryoverwritesfiltersForm.hasfor eachhasgroup, so the last one wins. Rebuilding from the form giveshas:approved-violation anyApproval:last-month. - From the form (filter bar or advanced filters), Has = Receipt + any-approval becomes
has:receipt,approved-violationviaensureHasApprovedViolation. The PR's own test expects this.
Failure scenarios:
- Filter bar: Any approval = last month, Has = Receipt (approved-violation is locked on). Results include every expense with a receipt from any date, plus approved-violation expenses from last month.
- Typed
has:receipt any-approval:last-monthgives correct results at first. The Has chip shows only "Approved violation". Changing any other filter from the bar dropshas:receiptwithout telling the user.
neil-marcellini
left a comment
There was a problem hiding this comment.
(Neil's AI agent, human reviewed)
The last conflict merge kept an old Mobile-Expensify pointer. This PR now moves it from 01c8999 (9.5.13-0, on main) back to c15d05c (9.5.7-3). Can you reset it to main's pointer? For example git checkout origin/main -- Mobile-Expensify (or git update-index --cacheinfo 160000,01c8999192c60d2883b6a93e8c28d4b9ee9db7af,Mobile-Expensify) and commit, so Mobile-Expensify no longer shows in the PR diff.
|
@codex Review. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b713c2518b
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
neil-marcellini
left a comment
There was a problem hiding this comment.
Great work thanks!
|
🚧 neil-marcellini has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.5.14-0 🚀
|
|
🚀 Deployed to production by https://github.com/grgia in version: 9.5.14-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Auth already accepts
anyApprovalfortype:expense(alongsidehas:approved-violationorviolationApprover), but App had no way to express that date range. This PR wires the key end to end the same wayapprovedis wired: parser, autocomplete, advanced filters, and query round-trip. It is expense-only, and the date picker does not offerneverbecause every matching expense has an approval action.Fixed Issues
$ #99930
PROPOSAL:
Tests
any-approval:oranyApproval:in the search bar and verify the date presets autocompleteOffline tests
QA Steps
Same as test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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
Screen.Recording.2026-10-16.at.20.27.07.mov
Android: mWeb Chrome
Screen.Recording.2026-10-16.at.20.22.43.mov
iOS: Native
Screen.Recording.2026-10-16.at.20.27.46.mov
iOS: mWeb Safari
Screen.Recording.2026-10-16.at.20.24.02.mov
MacOS: Chrome / Safari
Screen.Recording.2026-10-16.at.20.20.32.mov