Repository navigation
Read the added-expense violations snapshot for the Search Violations column - #99979
Conversation
An expense added to a report that is already awaiting its first approval is not in that report's submit snapshot. Auth records its violations on their own hidden ADDEXPENSEONSUBMITTED action instead, and the Search response returns that action, but getSubmittedViolationsForTransaction only read submit and submit-and-closed actions, so the Violations column stayed empty for those expenses.
🦜 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 diffNote You can apply these changes to your branch by copying the patch to your clipboard, then running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…ubmitted-violations-column
|
Jest test failures are unrelated due to this |
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. |
|
@cristipaval 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: e1aa88ece2
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Fixing a bug in a feature PR, so I don't think it needs product review. Also this has a very narrow scope so I think we can skip C+ review. |
|
🚧 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.4.73-0 🚀
|
|
No help site changes are required for this PR, so I did not create a docs PR. This is a data-read bug fix, not a behavior or copy change. What I checkedThe diff is internal only. No new user-facing setting, button, tab, or copy string:
Docs searched. I grepped
Since no article makes a claim this PR invalidates, editing one would mean writing net-new feature documentation rather than updating the PR's change. One adjacent gap worth flagging separately: the violations Search work as a whole — the @neil-marcellini, there is no linked help site PR to review — this fix needs no |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.73-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
(Neil's AI agent)
Builds on [Insights: Violations]: Expanding group & Suggested search v2, now merged.
An expense added to a report that is already awaiting its first approval is not covered by that report's submit snapshot, so the Auth side of this work records its violations on their own hidden
ADDEXPENSEONSUBMITTEDaction, and the Search response returns that action alongside the submit actions.getSubmittedViolationsForTransactiononly readSUBMITTEDandSUBMITTEDCLOSEDactions, so the snapshot on the new action was skipped and the Violations column stayed empty for those expenses — even though the row itself matchedhas:submitted-violationand the snapshot was sitting in the search data. An expense that was on the report before submission worked, because its violations live in theSUBMITTEDaction's snapshot.This adds the action to
CONST.REPORT.ACTIONS.TYPE, gives it the sameviolationsoriginal-message shape asSUBMITTED, and lets the loop read it. The same function backs the column-availability check ingetColumnsToShow, so this both shows the column and fills it.Related Issues
#98253
PROPOSAL: N/A
Tests
(Neil's AI agent)
The backend half ships in https://github.com/Expensify/Auth/pull/23988, so these steps need that branch running locally.
See the test video in the backend PR linked above.
Offline tests
N/A
QA Steps
No QA, we will request a retest of the linked issue once frontend and backend changes are deployed.
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
See above. Changes should be platform independent, but C+ will test all.
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop