Skip to content
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

Distance Rates - Disabling rate toggle triggers a brief on-off action after relogging #56173

Open
2 of 8 tasks
vincdargento opened this issue Jan 31, 2025 · 47 comments
Open
2 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@vincdargento
Copy link

vincdargento commented Jan 31, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Issue was found while executing QA for PR #55192

Version Number: 9.0.93-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: #55192
Email or phone of affected tester (no customers): applausetester+bm456@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: android
App Component: Workspace Settings

Action Performed:

  1. Open the app and log in
  2. Create a Workspace
  3. Enable Distance Rates
  4. Add a new rate
  5. Disable the rate added in step 4

Expected Result:

When disabling a rate it should remain off

Actual Result:

Disabling the toggle in Distance Rates triggers a brief on-off action the first time after relogging.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @JmillsExpensify
@vincdargento vincdargento added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 DeployBlockerCash This issue or pull request should block deployment labels Jan 31, 2025
Copy link

melvin-bot bot commented Jan 31, 2025

Triggered auto assignment to @JmillsExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Jan 31, 2025

Triggered auto assignment to @roryabraham (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Jan 31, 2025

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jan 31, 2025
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@vincdargento
Copy link
Author

@JmillsExpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@JmillsExpensify
Copy link

Looks right to me.

@melvin-bot melvin-bot bot added the Overdue label Feb 3, 2025
@roryabraham
Copy link
Contributor

ok, let me see if I can figure out how to build Android HybridApp

@melvin-bot melvin-bot bot removed the Overdue label Feb 3, 2025
@roryabraham
Copy link
Contributor

Got Android built, now having to rebuild the back-end bits

@roryabraham
Copy link
Contributor

Still just wrestling with my dev env, but making progress

@roryabraham
Copy link
Contributor

Finally was able to reproduce locally

@roryabraham
Copy link
Contributor

One thing I notice is that it only happens if you disable the rate right after adding it. If you wait a few moments before disabling it, the issue doesn't occur

@roryabraham
Copy link
Contributor

Using logs, I see that this is the value that's toggling in error

@roryabraham
Copy link
Contributor

Looking into this, I'm going to demote it for a few reasons:

  • It's inconsistently reproducible
  • You have to disable the distance rate soon after adding it (edge case for sure)
  • The end state is correct

@s77rt
Copy link
Contributor

s77rt commented Feb 3, 2025

Regarding inconsistency: this seems to occur only if OpenPolicyDistanceRatesPage (read) is queued before SetPolicyDistanceRatesEnabled (write)

Screen.Recording.2025-02-03.at.11.53.15.PM.mov

@abzokhattab
Copy link
Contributor

i am not able to reproduce it

Screen.Recording.2025-02-04.at.00.05.36.mov

@abzokhattab
Copy link
Contributor

@s77rt how should we avoid this queueing inconsistency?

@s77rt
Copy link
Contributor

s77rt commented Feb 14, 2025

Still working on this (testing if we can revert a previous PR)

@abzokhattab
Copy link
Contributor

abzokhattab commented Feb 16, 2025

Tested the same change on the pages changed in this pr https://github.com/Expensify/App/pull/38613/files and i dont see any regressions .. should we go ahead with that or what do you think?

@s77rt
Copy link
Contributor

s77rt commented Feb 16, 2025

@abzokhattab Yeah let's revert that PR then. Please raise a PR

@abzokhattab
Copy link
Contributor

PR is ready #56932

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 24, 2025
@melvin-bot melvin-bot bot changed the title Distance Rates - Disabling rate toggle triggers a brief on-off action after relogging [Due for payment 2025-03-03] Distance Rates - Disabling rate toggle triggers a brief on-off action after relogging Feb 24, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 24, 2025
Copy link

melvin-bot bot commented Feb 24, 2025

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Feb 24, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.4-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 2025-03-03. 🎊

For reference, here are some details about the assignees on this issue:

  • @s77rt requires payment through NewDot Manual Requests
  • @abzokhattab requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Feb 24, 2025

@s77rt @JmillsExpensify @s77rt 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]

@s77rt
Copy link
Contributor

s77rt commented Feb 26, 2025

Not due payment yet. Unfortunately the PR only fixed a specific case but the bug can still be reproducible in other similar flows as reported by QA here.

@roryabraham Let's add Help Wanted label and make this Daily

@abzokhattab Can you please post the minimal repro steps for #56932 (comment)

@abzokhattab
Copy link
Contributor

  1. Open the app and log in
  2. Create a Workspace
  3. Enable Distance Rates
  4. CMD + D to open the troubleshooting modal and switch the"Simulate poor internet connection toggle" button on.
  5. Add a new rate
  6. Navigate away from "DIstance rates" by clicking on "Workflows"
  7. Navigate to "Distance rates" again and quickly toggle off one of the distance rates
  8. Notice that the toggle briefly turns on and off

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Mar 3, 2025
@s77rt
Copy link
Contributor

s77rt commented Mar 4, 2025

@roryabraham Can you add Help Wanted label and update the title

@JmillsExpensify JmillsExpensify added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 5, 2025
@JmillsExpensify JmillsExpensify changed the title [Due for payment 2025-03-03] Distance Rates - Disabling rate toggle triggers a brief on-off action after relogging Distance Rates - Disabling rate toggle triggers a brief on-off action after relogging Mar 5, 2025
@JmillsExpensify JmillsExpensify removed the Awaiting Payment Auto-added when associated PR is deployed to production label Mar 5, 2025
@JmillsExpensify
Copy link

Updated for you!

@melvin-bot melvin-bot bot removed the Overdue label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

6 participants