Remove SearchTransaction > isActionLoading#74404
Remove SearchTransaction > isActionLoading#74404luacmartins merged 20 commits intoExpensify:mainfrom
Conversation
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.
|
This reverts commit 3687c4d.
|
@mananjadhav 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] |
| let shouldShow = true; | ||
| if (queryJSON && isActionLoadingSet?.has(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${reportItem.reportID}`)) { | ||
|
|
||
| const isActionLoading = isActionLoadingSet?.has(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${reportItem.reportID}`); |
There was a problem hiding this comment.
❌ Logic Error (context)
Critical bug: The condition logic was inverted incorrectly. The original code checked if the report IS loading:
if (queryJSON && isActionLoadingSet?.has(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${reportItem.reportID}`))But the refactored code checks if it's NOT loading:
if (queryJSON && !isActionLoading)This reverses the intended behavior and will cause reports to be hidden when they're loading, and shown when they shouldn't be filtered.
Fix: Change line 1543 from:
if (queryJSON && !isActionLoading) {to:
if (queryJSON && isActionLoading) {There was a problem hiding this comment.
The original logic actually checked if not loading. It was changed here but I think it was a mistake cc @DylanDylann
| if (queryJSON && !transactionItem.isActionLoading) { | ||
|
|
||
| const isActionLoading = isActionLoadingSet?.has(`${ONYXKEYS.COLLECTION.REPORT_METADATA}${transactionItem.reportID}`); | ||
| if (queryJSON && !isActionLoading) { |
There was a problem hiding this comment.
❌ Logic Error (context)
Critical bug: The condition logic was inverted incorrectly. The original code checked if the transaction IS loading (if (queryJSON && !transactionItem.isActionLoading)), meaning it would apply status filtering when the transaction is NOT loading.
The refactored code also checks if (queryJSON && !isActionLoading), but the logic differs from the original in the getReportSections function at line 1543. To maintain consistency with the original behavior:
- If the original intent was to filter while loading, then line 1543 should be
if (queryJSON && isActionLoading) - If the original intent was to filter when NOT loading, then line 1543 is wrong
Based on the original getReportSections code checking isActionLoadingSet?.has(...) (meaning IS loading), there's an inconsistency that needs clarification. Please verify the intended behavior across both functions.
There was a problem hiding this comment.
The original condition checked if not loading and that's still the case with the new logic.
|
@mananjadhav Yes! Let me know if anything is not clear (please check linked issue for context) |
|
I'll start with the review Monday. Thanks. |
trjExpensify
left a comment
There was a problem hiding this comment.
PR for a #whatsnext project, all good. 👍
|
@mananjadhav all yours |
mananjadhav
left a comment
There was a problem hiding this comment.
Reviewed the code, testing it.
|
@s77rt conflicts |
|
Resolved conflicts |
|
I tested on web. Will finish the checklist today. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid-search-transaction.mp4Android: mWeb Chromemweb-chrome-search-transaction.moviOS: HybridAppios-search-transaction.moviOS: mWeb Safarimweb-safari-search-transaction.movMacOS: Chrome / Safariweb-search-transaction.movMacOS: Desktopdesktop-search-transaction.mov |
|
@luacmartins Both my native builds are taking unexpectedly longer. Is it possible to trigger adhoc builds? I've uploaded screencasts for the other 4 platforms. |
|
🚧 @luacmartins 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, Desktop, and Web. Happy testing! 🧪🧪
|
|
Got the native builds. Going to quickly test them now. |
|
@luacmartins All yours. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.2.62-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.2.62-5 🚀
|
Explanation of Change
Fixed Issues
$ #73956
PROPOSAL:
Tests
Approveon the right, click on itPayafterwardsPayScreen.Recording.2025-11-16.at.3.05.38.AM.mov
Offline tests
Same as Tests
QA Steps
Same as Tests
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
MacOS: Desktop