-
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 2023-08-07] [$1000] Preferences- Notification toggle updating inconsistently on devices #19640
Comments
Triggered auto assignment to @sakluger ( |
Bug0 Triage Checklist (Main S/O)
|
I was able to reproduce this bug. One other note is that after following the reproduction steps, I refreshed the secondary device, and it synced the notification setting back off to match the primary device. |
Job added to Upwork: https://www.upwork.com/jobs/~01240a84e969686e0b |
Current assignee @sakluger is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
Triggered auto assignment to @danieldoglas ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.The notifications toggle is synced on a primary and secondary device. What is the root cause of that problem?####Offline test: However, a problem occurs when the Notifications toggle is clicked three times, causing identical requests (number 1 and 3) to be queued into the persistedRequests array. Upon processing, the function PersistedRequests.remove(requestToProcess); is invoked, which results in the removal of both request 1 and 3 due to their similarity. Consequently, we lose one request in the process. App/src/libs/actions/PersistedRequests.js Lines 34 to 37 in 12d2f3c
####Onlie test: What changes do you think we should make in order to solve the problem?####Offline test:
Result: Screen.Recording.2023-05-28.at.01.20.39.mp4####Oneline test:
Result: Screen.Recording.2023-05-30.at.00.38.12.movWhat alternative solutions did you explore? (Optional)N/A |
@danieldoglas For the offline case as mentioned in this issue, @namhihi237's proposal has the correct root cause and solves the problem in a decent manner as well. However, while testing, I found out that for online mode, if you click the toggle quickly twice, the toggle on the desktop (testing device) goes out of sync. Screen.Recording.2023-05-29.at.3.33.21.AM.movDo we want to handle the above bug together with this one? If no, then @namhihi237's proposal works good. |
That root cause makes sense to me, but I'm curious if this change won't break anything else - We probably remove all of them for a reason. cc @marcaaron, can you confirm? If that's the case, we might need to create a new property in the queue object to confirm it is a unique request, and only delete the first if it is. |
@allroundexperts for the error you found, can you confirm if it's a concurrency error? IMO the second device should have received all 3 pusher updates, but it might be out of order. If that's the case, I'm not sure we can fix it the way our pusher updates work today. |
@danieldoglas The second device behaves correctly and all events are received in correct order there. It's just the main device on which the toggle gets set incorrectly. |
Oh no, I thought you had clicked 3 times. Yeah, I think we should fix it here as well. |
Awesome. Can you update the reproduction steps to include this as well? |
done. |
Hi @allroundexperts , I just checked the additional issue with the online, the issue happens when clicking a second time while the first API is not finished. I think we can use Debounce for this. What do you think? |
@namhihi237 Can you please update your proposal? |
Yes, @allroundexperts , I updated (#19640 (comment)) |
Hey @allroundexperts mind taking another look? |
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
Reminder when paying: this issue had a regression. |
The checklist for this bug is not needed here in my opinion. This was an issue since we implemented the http requests queue. |
Sounds good. Holding for payment and we can close, then. |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.47-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 2023-08-07. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Not overdue |
Will process today as we've reached new payment date |
The original upwork job is closed because it's so old, so I'll have to create a new one |
Issue Participants: Issue reported by: Applause - Internal Was this issue merged in time to be eligible for the speed bonus? ❌ Payment summary: Contributor: @namhihi237 - $500 |
Payments made in Upwork. Just need @JmillsExpensify to confirm payment for C+ and then we can close as checklist isn't required. |
Pending newdot payment |
Same as above |
Reviewed the details for @allroundexperts. Approved for payment in NewDot based on the BZ payment summary above. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Precondition - Login to the same account in Main device (Desktop) and secondary device (Web)
Offline test:
Online test:
Expected Result:
Notifications toggle is synced on main and secondary device.
Actual Result:
Notifications toggle differs on main and secondary device. When user goes online on main device - notification toggle blinks on the secondary device but then goes back to the previous state which differs from the main device state.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.18-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://platform.applause.com/services/links/v1/external/0875e549d85a3e7f06f3a10355369edfe2ef01dfd60007c73c53f56e5c845377
Screen.Recording.2023-05-29.at.3.33.21.AM.mov
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: