-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2025-01-02] [$250] Search - App redirects to DM when submitting expense in Search after deleting expense #52477
Comments
Triggered auto assignment to @abekkala ( |
Edited by proposal-police: This proposal was edited at 2024-11-13 14:46:43 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Search - App redirects to DM when submitting expense in Search after deleting expense What is the root cause of that problem?When we
Although we correctly update the lastVisibleActionCreated and lastAction this code is executed too quickly and by that time we don't have the correct updated values for both. So if we had any report action in the report then both values would be the same old values but as they will be equal this navigate code is not called (that's why we don't reproduce it on non-empty chats) but if we have a empty report before creating the expense the lastVisibleActionCreated will have a different value than the lastAction.created which is the created action. BTW this navigate code is unnecessarily being called even when you submit expense from the report screen, the effect only became visible for this current issue because we were in search page. What changes do you think we should make in order to solve the problem?We need to give it a time before
_This root cause should be fixed but in parallel to that we can avoid notifying new Action when Lines 3684 to 3685 in 4d9be4e
But we should do the same change in other cases such as sendInvoice trackExpense splitBill here createDistanceRequest ... cases in IOU.ts too. Or centralize the check inside Report.notifyNewAction
What alternative solutions did you explore? (Optional)As need to check if the current report screen is focused before executing it
but if we don't want the scrollToBottom to be called we can add it here
|
ProposalPlease re-state the problem that we are trying to solve in this issue.In Step 11, app redirects to DM when submitting expense to user after deleting an expense in Search. What is the root cause of that problem?We call Line 3685 in f23a5f0
In the new action event listener, we navigate to the DM report
What changes do you think we should make in order to solve the problem?If the topmost central pane screen is |
@abekkala Huh... This is 4 days overdue. Who can take care of this? |
@abekkala Still overdue 6 days?! Let's take care of this! |
@abekkala 10 days overdue. Is anyone even seeing these? Hello? |
Job added to Upwork: https://www.upwork.com/jobs/~021861529064896018849 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann ( |
@DylanDylann we do have some proposals above 😄 |
@abekkala @DylanDylann this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
I am reviewing |
This comment was marked as outdated.
This comment was marked as outdated.
@FitseTLT After checking I don't think your RCA is correct in this case
We should go with @gijoe0295 proposal. If we are on Search page, we don't need to notify new action, it is only necessary if we are in chat screen 🎀 👀 🎀 C+ Reviewed |
Triggered auto assignment to @danieldoglas, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Nope not for the BE but we need to wait the addition of the report action in onyx takes effect on our report action list and lastVisibleAction of the report
@DylanDylann My RCA is correct and the problem is only being visible here because we are being navigated away from search page but the problem also happens for report screen on an empty chat (I have explained why it happens for empty chats in my RCA) and we are unnecessarily navigating to the same report here
Here is the debugging demo of navigating happening even in report screen and you can easily debug it. Please re-review it we should solve the problem from the root cause because as I have explain in my proposal it is not happening for most cases because both values we are comparing lastVisibleActionCreated and the lastAction created timestamp are in most cases compared with their old values so the problem only gets visible in empty chats where the lastVisibleActionCreated will be different. Thx 2024-11-29.12-11-46.mp4 |
@FitseTLT Could you please detail this additional bug including steps, actual behavior, and expected behavior? |
As I understand, lastVisibleActionCreated shouldn't be updated in this case because the user created the request on the search page, the lastVisibleActionCreated only should be updated if the user comes back to the chat screen. So using runAfterInteractions as in your proposal seems like a workaround to me. In the scope of this issue, I think the selected proposal is enough to fix this issue |
@DylanDylann You are mixing up lastVisibleActionCreated with lastVisitTime, lastVisibleActionCreated is updated whenever a new visible action is created with App/src/pages/home/report/ReportActionsList.tsx Lines 429 to 433 in 64eaf2f
When we are linked to an old reportAction (comment linking) in a chat with many report actions and the most recent actions haven't been fetched/available and scrollToBottom is called we will check if we have the newest report action and if we don't we will navigate to the chat (without the report action link) to fetch the most recent actions. So now if you think runAfterInteraction is a workaround we can apply my alternative solution of only navigating when isFocused is true which will solve the problem from the root cause that will solve similar problems too because we only want to navigate (and even to scrollToBottom) to (fetch latest actions) when the screen is focused. Just like we are early returning when the action is not from the current user hereApp/src/pages/home/report/ReportActionsList.tsx Lines 426 to 427 in 64eaf2f
that will ensure similar problems will not occur for other cases like sendInvoice trackExpense splitBill here createDistanceRequest. |
@FitseTLT I overlooked that 😄. Thanks for your explanation
Anyway, I still think the selected proposal is a good approach in this case. Let's leave the final decision to the internal engineer |
📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @FitseTLT 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@FitseTLT Please prioritize creating PR before posting new proposal App/contributingGuides/CONTRIBUTING.md Line 143 in c1454f7
|
Issue not reproducible during KI retests. (Second week) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi @FitseTLT @DylanDylann can you tell if this blocker is from this PR |
No @Christinadobrzyn It can not be related to this 👍 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.78-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2025-01-02. 🎊 For reference, here are some details about the assignees on this issue:
|
@DylanDylann @abekkala @DylanDylann The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
@DylanDylann can you complete the checklist above? |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalTest:
Do we agree 👍 or 👎 |
@FitseTLT and @DylanDylann payments sent and contracts ended - thank you! 🎉 |
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.0.61-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
In Step 11, app should remain in Search page when submitting expense to user after deleting an expense in Search.
Actual Result:
In Step 11, app redirects to DM when submitting expense to user after deleting an expense in Search.
This issue also happens with Submit expense option in FAB, and only happens when an expense is deleted in Search and submitting another expense.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6663547_1731490307345.20241113_172050.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @abekkalaThe text was updated successfully, but these errors were encountered: