-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[$250] Reports-RHP loads infinitely after deleting expense in report that has deleted expense with reply #60624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Triggered auto assignment to @Christinadobrzyn ( |
@jponikarchuk I think you sent a video that is related to another bug |
@Eskalifer1 Just edited, sorry |
ProposalPlease re-state the problem that we are trying to solve in this issue.When a user deletes all expenses from a report—especially one where a previous expense had a message associated with it—the Right Hand Panel (RHP) does not dismiss as expected. Instead, it enters an infinite loading state. What is the root cause of that problem?After deleting the last remaining expense from a report, the This is especially problematic when:
What changes do you think we should make in order to solve the problem?We should monitor changes to
const [reportOnyx, reportOnyxResult] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reportIDFromRoute}`, {allowStaleData: true}); const handleBackButtonPress = useCallback(() => {
if (isInNarrowPaneModal && backTo !== SCREENS.SEARCH.REPORT_RHP) {
Navigation.dismissModal();
return;
}
if (backTo) {
Navigation.goBack(backTo as Route, {shouldPopToTop: true});
return;
}
Navigation.goBack(undefined, {shouldPopToTop: true});
}, [isInNarrowPaneModal, backTo]); Inside useEffect useEffect(() => {
if ((reportOnyx && Object.keys(reportOnyx).length > 0) ?? reportOnyxResult.status === 'loading') {
return;
}
handleBackButtonPress();
}, [reportOnyx, reportOnyxResult]); we should trigger dismissal of the RHP. This will ensure that the user isn’t left staring at a loading spinner for a report that no longer exists. What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional) |
I can reproduce based on the steps in the OP - I'm not sure if this needs to be internal - we'll start external |
Job added to Upwork: https://www.upwork.com/jobs/~021914766250605962251 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
if (!isFocused && !isReportDetailOpenInRHP) {
return;
}
if (isInNarrowPaneModal) {
if (isExpenseReport(prevReport)) { // Can be updated so that it can handle other report types)
Navigation.dismissModal();
return;
} else {
return;
}
} What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
|
🚨 Edited by proposal-police: This proposal was edited at 2025-04-23 10:47:57 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Reports-RHP loads infinitely after deleting expense in report that has deleted expense with reply What is the root cause of that problem?When the report will delete it sets to empty and we show the loading state in case of report is not present here. We already have logic to navigate away from the report page when we delete the report but that will not execute for the narrowPanelModal. Because we early return from here What changes do you think we should make in order to solve the problem?To fix this issue we should close the modal if the report is deleted. We need to do following changes.
if (isInNarrowPaneModal) {
if (isRemovalExpectedForReportType) {
Navigation.dismissModal();
}
return;
} We already have logic to check if
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA UI changes What alternative solutions did you explore? (Optional)If we don't want to change the existing placement of logic then we can add below code after this line here so all unnecessary code will not execute. if (isInNarrowPaneModal) {
if (isRemovalExpectedForReportType) {
Navigation.dismissModal();
}
return;
} Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
@alitoshmatov, can you please review these proposals when you have a moment? TY! |
ProposalPlease re-state the problem that we are trying to solve in this issue. What is the root cause of that problem?
This early return prevents the modal dismissal logic from executing when viewing the report in a narrow pane modal. What changes do you think we should make in order to solve the problem?
By separating these conditions, we maintain the existing navigation behavior while adding special handling for the empty report case.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future? What alternative solutions did you explore? (Optional)
|
📣 @Nick4dawin! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
@alitoshmatov Eep! 4 days overdue now. Issues have feelings too... |
Reviewing |
Starting at LOW based on the below. Please update or comment if you think this should be a higher priority.
|
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
hi @alitoshmatov do you have an update? |
@techievivek, @Christinadobrzyn, @alitoshmatov Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Gentle bump @alitoshmatov, can you look at the above comments? |
Nudged @alitoshmatov in Slack DM in the C+ channel https://expensify.slack.com/archives/C02NK2DQWUX/p1747166268674319 |
Okay, this two proposals are very similar but I still think @ishakakkad 's proposal is better choice because it is isolated only to report deletion. I believe this eliminates potential regressions, since the conditions here cover other different cases. C+ reviewed 🎀 👀 🎀 |
Current assignee @techievivek is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@alitoshmatov Thanks for your review!
Could you clarify which specific regressions might be introduced by my proposed solution? From my perspective, choosing one solution over another solely because it’s “isolated to one case” isn’t a strong enough reason—unless we can clearly identify what regressions the other solution would cause. If you have any examples or scenarios in mind where my solution could lead to unintended behavior, I’d really appreciate it if you could share them. That would help ensure we're making the most robust choice. cc @techievivek |
I don't have one. My reasoning is that the other conditions like I do want to say that both solutions are correct and very similar and it is hard to choose one over another. The above is my subjective reasoning. @techievivek I would appreciate your input. I am not sure which is the best approach here. |
@techievivek I think in your case, the rule below would be considered and in this case, my solution comes first:
|
@techievivek I’d like to clarify that my approach is not the same as @thelullabyy’s proposal. Here are the key differences for your consideration:
|
@techievivek Whenever you get a chance, could you please take a look at this comment? Your feedback would be much appreciated. Thanks! @alitoshmatov Also, do you have any feedback on my response? It addresses your earlier question regarding the root cause of the issue. Let me know if anything is unclear or needs further clarification. I also think this is an important factor to consider when evaluating the selected proposal, especially since this other anwser appears to be incorrect in my opinion. |
@techievivek, @Christinadobrzyn, @alitoshmatov Whoops! This issue is 2 days overdue. Let's get this updated quick! |
I went through both proposals carefully, and I agree with @alitoshmatov’s assessment. @ishakakkad’s proposal stood out for me for having a clear RCA, along with a well-scoped solution that not only addresses the issue but also simplifies and refactors the code in a meaningful way, making it easier to follow and maintain. For example, in the RCA, @thelullabyy, your proposal mentioned:
But it wasn't entirely clear why the logic differs in that context. What specifically changes when accessing the report from the search page? On the other hand, @ishakakkad’s RCA clearly identified the root of the problem:
This level of specificity really helped in understanding both the problem and the fix. |
I really appreciate the time, thought, and effort you put into it. These kinds of head-to-head contributions are what make the review process so valuable. Please let me know if you have any other questions or if you would like to clarify anything, thanks. |
@techievivek You're right—that's my mistake for not clearly outlining what specifically changes when accessing the report from the search page. However, I believe it's explained more clearly via the code change in the "What changes do you think we should make in order to solve the problem?" section of my proposal. During the discussion, C+ raised a question about the root cause in this comment, specifically asking why App/src/pages/home/ReportScreen.tsx Lines 574 to 575 in c618014
In response, @ishakakkad provided an answer, but I believe it's incorrect. My answer is here, and I think it correctly identifies the PR where |
I don’t see As I mentioned before, we really appreciate the effort and quick turnaround you provided to help the C+. That said, after reviewing the proposals, we felt @ishakakkad's solution addressed the issue more precisely, so we decided to move forward with hers. |
📣 @ishakakkad 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@techievivek @Christinadobrzyn @alitoshmatov this issue is now 4 weeks old, please consider:
Thanks! |
@ishakakkad can you please provide an update on the PR when you have a moment? |
Just a heads up that I'm going to be ooo May 21st - May 27th. Back on the 28th. I'm not going to assign another BZ teammate but if you need someone while I'm gone, please remove and add the Bug label. |
@Christinadobrzyn PR will be created by tomorrow. |
@alitoshmatov I am not able to reproduced the issue. Are you able to reproduced the issue? Seems now we are not showing deleted messages when we open RHP. |
Let me confirm with the QA. |
This is no longer reproducible, just confirmed with the QA https://expensify.slack.com/archives/C9YU7BX5M/p1747886520835639?thread_ts=1747836381.235709&cid=C9YU7BX5M |
Based on our internal guidelines for handling bounties in situations like this, I believe both C/C+ would qualify for a 50% payout here. CC @Christinadobrzyn — more details here: https://stackoverflowteams.com/c/expensify/questions/8719 |
@techievivek Issue is not reproducible anymore 20250522_133900.mp4 |
Uh oh!
There was an error while loading. Please reload this page.
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.1.31-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Search
Action Performed:
Expected Result:
RHP will dismiss after the expense is deleted.
Actual Result:
RHP loads infinitely after deleting the expense.
Workaround:
Unknown
Platforms:
Screenshots/Videos
bandicam.2025-04-22.11-44-46-776.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @The text was updated successfully, but these errors were encountered: