-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$500] Task details are not immediately removed after navigating back to a task using the back button browser #27728
Comments
Triggered auto assignment to @dylanexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~01815b4d02dffa34d6 |
Current assignee @dylanexpensify is eligible for the External assigner, not assigning anyone new. |
Current assignee @mollfpr is eligible for the External assigner, not assigning anyone new. |
@thienlnam |
@thienlnam |
Added some more details |
@thienlnam Screencast.from.19-09-2023.09.38.54.webm |
But I saw we have another bug: the last message in LHN of cancelled task report is different when offline and online. Do you think we should fix it here or it is in progress? |
Is it that one shows cancelled and the other shows deleted? We're aligning task system messages in a different issue |
Yes. |
ProposalPlease re-state the problem that we are trying to solve in this issue.When we navigate using the browser back button task details are not removed. What is the root cause of that problem?In the memo function, we do not trigger a re-render when we cancel a task report. As a result, when we navigate using the browser's back button, the component does not re-render, and we continue to see the old data. App/src/pages/home/report/ReportActionItem.js Line 687 in 015cfb2
An additional approach to verify whether the issue is associated with the memoization HOC is to temporarily remove the memoization HOC and check if the problem persists which, in this case, does not persist. What changes do you think we should make to solve the problem?We can add another condition in the Memo function to check if the task report is canceled.
Sample code to test
Works as expected Screen.Recording.2023-09-19.at.8.43.08.AM.movWhat alternative solutions did you explore? (Optional)As |
I am still able to reproduce the issue in the latest main. Screen.Recording.2023-09-19.at.21.39.22.mov |
@mollfpr mind giving a review on above proposal? |
@Nodebrute Why |
Hey, yeah, @mollfpr , you are right. It was a mistake. We can do it like this
And then we can use this to trigger re-render. |
@mollfpr It has also come to my attention that App/src/libs/ReportActionsUtils.js Lines 120 to 127 in 4969433
|
@Nodebrute I think it might work. Please update your proposal when you are ready. |
@mollfpr Updated. Please consider reviewing. |
The issue is not reproduced on staging and DEV. |
Just reproduced on |
ProposalPlease re-state the problem that we are trying to solve in this issue.Task details are not immediately removed after navigating back to a task using the back button browser What is the root cause of that problem?When deleting task, isDeletedParentAction of task report will be true. But when isDeletedParentAction changed we don't re-render ReportActionItem What changes do you think we should make in order to solve the problem?App/src/pages/home/report/ReportActionItem.js Lines 691 to 693 in e52f21a
In here we should add
What alternative solutions did you explore? (Optional) |
@mollfpr let's confirm reproducibility comment here, and if valid review @DylanDylann's proposal! |
I still couldn't reproduce it on |
Couldn't reproduce |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Thank you all - I'll go ahead and close since we can't seem to reproduce anymore |
Found as part of #24137
Expected:
The task details show show [Canceled Task] without having to refresh the page
Actual:
The task details are shown, and require a refresh before [Cancel Task] is shown
Platform:
Web
OFFLINE
Untitled.mov
ONLINE
Screen.Recording.2023-09-12.at.21.15.30.mov
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: