refactor: remove deprecatedAllTransactions in getReportActionWithSmartscanError#87129
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…ons-in-getReportActionWithSmartscanError
|
@DylanDylann 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] |
|
@linhvovan29546 can you fix the conflicts? |
…ons-in-getReportActionWithSmartscanError
| reportActions, | ||
| transactionViolations, | ||
| isReportArchived, | ||
| allTransactions: transactions, |
There was a problem hiding this comment.
How about this place? Should we filter the transactions?
There was a problem hiding this comment.
No need, transactions is an object, so we don’t need to filter it.
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-04-10.at.14.52.25.mov |
|
🚧 @Valforte 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/Valforte in version: 9.3.59-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This is a purely internal code refactoring that replaces |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.3.59-4 🚀
|
Explanation of Change
This PR removes the usage of
deprecatedAllTransactions(a module-level cached variable populated via Onyx.connect()) from the SmartScan error detection chain in ReportUtils.ts. Instead,allTransactionsis now passed explicitly as a parameter from callers that already have it available (via useOnyx hooks or Onyx derived values).Fixed Issues
$ #66418
PROPOSAL: N/A
Tests
Test 1:
Open workspace chat
Create a new expense by scanning a receipt (use any image to force the scan to fail or result in missing fields).
Wait for the receipt scanning to complete and confirm that some fields are missing (e.g., date or merchant).
Verify that the report shows an RBR indicator.
Fill in the missing fields in the transaction.
Verify that the RBR indicator disappears
Test 2:
Create a split bill expense by scanning a receipt
While the receipt has missing SmartScan fields (empty date/merchant), navigate to the chat
Verify the split bill action shows an RBR error
Complete the missing fields
Verify the error clears
Offline tests
Same as tests above
QA Steps
Same as tests above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
Android: mWeb Chrome
iOS: Native
Screen.Recording.2026-04-08.at.10.14.24.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-04-08.at.09.40.06.mov