[CP Staging] Fix not found page unreported expense for new account - #78451
Conversation
…itself can be filtered out and not available yet
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.
|
| if (selfDMReportID) { | ||
| reportToUse = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${selfDMReportID}`]; | ||
|
|
||
| // selfDMReportID may be set but the report is filtered out. |
There was a problem hiding this comment.
The root cause of this is in backend?
There was a problem hiding this comment.
Yes, the root cause is in the backend. The backend behavior is intentional; changing it might affect other processes. This fix handles the specific edge case where we need the selfDM to create a transaction thread.
There was a problem hiding this comment.
yes, edge case. The bug is not reproducible anymore after selfDM is created in frontend.
To reproduce again, need to create another account.
There was a problem hiding this comment.
To be fixed by https://github.com/Expensify/Auth/pull/18562
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariBefore: Screen.Recording.2025-12-25.at.12.31.16.PM.movAfter: Screen.Recording.2025-12-25.at.12.32.32.PM.mov |
|
@MonilBhavsar 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] |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…nreported-expense [CP Staging] Fix not found page unreported expense for new account (cherry picked from commit 54c7eb4) (cherry-picked to staging by marcaaron)
|
🚀 Cherry-picked to staging by https://github.com/marcaaron in version: 9.2.87-4 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.87-7 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/marcaaron in version: 9.2.88-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.88-7 🚀
|
Explanation of Change
The selfDMReportID is returned by OpenApp, but the actual selfDM report data may be filtered out from the response when it has no actions yet (due to
getHiddenReportsFilterlogic in the backend). This causes a mismatch where:ONYXKEYS.SELF_DM_REPORT_IDis set ✅When createTransactionThreadReport tries to build the transaction thread, it can't find the parent selfDM report and fails.
Fixed Issues
$ #77880
PROPOSAL:
Tests
Same as QA
Offline tests
QA Steps
Precondition:
Creating an unreported legacy transaction:
expensidemoaccountScreen.Recording.Dec.19.2025.mp4
Test the unreported legacy transaction can be view in the NewDot:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.Dec.25.2025.mp4