-
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 2024-10-17] [$250] Distance - Invalid waypoints aren't cleared when a request fails #48631
Comments
Triggered auto assignment to @johncschuster ( |
We think this issue might be related to the #collect project. |
Edited by proposal-police: This proposal was edited at 2024-09-05 11:08:41 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Distance - Invalid waypoint stays on suggestion list What is the root cause of that problem?We don't filter out the invalid waypoint from What changes do you think we should make in order to solve the problem?Filter out the invalid waypoint (the waypoint with lat and long equal to 0). Add the following filter to this selector
if we need to prevent selecting invalid waypoints when the network is offline we can change this and this to the following
What alternative solutions did you explore? (Optional)Or we can just don't add the invalid waypoint to the recent waypoints here
|
@johncschuster Eep! 4 days overdue now. Issues have feelings too... |
Job added to Upwork: https://www.upwork.com/jobs/~021833644939720857104 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox ( |
@nyomanjyotisa Thank you for your proposal, but we also need to prevent selecting invalid waypoints when the network is slow or offline. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Invalid waypoints stay on the suggestion list What is the root cause of that problem?Here we only check the waypoint is empty or not to decide to save this waypoint to recent list App/src/libs/actions/Transaction.ts Lines 127 to 130 in 1e8d80e
What changes do you think we should make in order to solve the problem?We can use the
App/src/libs/actions/Transaction.ts Lines 127 to 130 in 1e8d80e
What alternative solutions did you explore? (Optional) |
@johncschuster I’d like to confirm should we prevent selecting invalid waypoints in offline mode? (currently, we don’t validate waypoints in offline mode) to maintain consistency with the online flow. RPReplay_Final1726056389-1.MP4 |
Why so? Don't we do that validation when you come back online? 🤔 CC: @neil-marcellini for vis on this issue. |
I think we should only prevent saving invalid waypoints to the recent list because if we prevent selecting invalid waypoint in offline, the user that doesn't have recent waypoints list can't create distance request in offline. |
@trjExpensify Currently, when submitting an expense with an invalid waypoint, the backend does not accept it. Therefore, I think we should also prevent selecting an invalid waypoint in offline mode to ensure consistency. RPReplay_Final1726131672_2.mp4 |
I agree. We shouldn't save invalid waypoints to recents, they're useless. But we shouldn't prevent selecting invalid waypoints, because we don't know if they are valid or not when you're offline, so then you couldn't create a distance request when offline. |
Based on the expected result @nyomanjyotisa alternative proposal LGTM 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @neil-marcellini, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
I believe my alternative solution is works as the expected results and the selected solution won't works since App/src/libs/TransactionUtils/index.ts Lines 610 to 612 in 00bc167
|
I’d like to clarify that the selected solution is to prevent saving an invalid waypoint, rather than filtering out the invalid waypoints in the list. The implementation details can be addressed during the code review process. The alternative solution proposed by @nyomanjyotisa is the same as @nkdengineer solution, which is to prevent saving an invalid waypoint. However, I selected @nkdengineer proposal because it was posted before @nyomanjyotisa notify an update. But I just double-checked, and it turns out that the updated proposal (at 2024-09-11T03:14:11Z) was actually submitted before the new proposal (at 2024-09-11T03:14:32Z). Sorry everyone, this was my mistake for not checking the detailed update times, so I’ve updated the selected proposal accordingly. |
Instead of identify recentValidatedWaypoints using pending action, we can filter it using item => item.lat !== 0 && item.lng !== 0 && !isEmpty(item.name) |
@neil-marcellini Based on the latest expected behavior, we can proceed with the updated alternative proposal from @wildan-m. |
Ok sweet, I'm glad we've landed on a solution! I like @wildan-m's proposal too. I keep changing my mind, but I like the main solution with the pendingAction approach. Either way could work but that's slightly more clear, and I forgot in my last comment that we need a way to identify the current waypoints that have been saved by the server vs offline. Hiring 🚀 |
📣 @suneox 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @wildan-m 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@neil-marcellini Thanks for the assignment, please confirm that we'll go with adding pendingAction? If so, we'll need backend modification as mentioned here #48631 (comment) and explained more here #48631 (comment) |
@johncschuster @wildan-m @suneox @neil-marcellini this issue is now 4 weeks old, please consider:
Thanks! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.47-4 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 2024-10-17. 🎊 For reference, here are some details about the assignees on this 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:
|
Checklist
|
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.29-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4919784
Email or phone of affected tester (no customers): [email protected]
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
Invalid waypoints should be removed from suggestion list
Actual Result:
Invalid waypoints stay on the suggestion list
Workaround:
Submit a distance expense with valid waypoints, which will clear any invalid recent waypoints. Or. sign out and back in, since the invalid recent waypoints are only on the frontend.
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Screen.Recording.2024-10-01.at.11.48.15.AM.mov
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @johncschusterThe text was updated successfully, but these errors were encountered: