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

[$250] Web - Reimburse expenses - Offline save changes are not reflected immediately #11845

Closed
kbecciv opened this issue Oct 14, 2022 · 17 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Oct 14, 2022

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


Action Performed:

  1. Go to URL https://staging.new.expensify.com/
  2. Login with any account
  3. Go to Settings->Workspace-Reimburse expenses
  4. Kill the internet connection
  5. Change the parameters for Rate and Unit
  6. Turn on the internet connection

Expected Result:

Offline save changes should be reflected immediately

Actual Result:

It flashes to old values for a second, then the value remains unchanged

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.2.15.2

Reproducible in staging?: Yes

Reproducible in production?: Yes

Email or phone of affected tester (no customers): any

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Bug5775963_Recording__2365.mp4
198854259-e9e48603-dae1-4992-a5ee-e75809ac5b4a.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

@melvin-bot
Copy link

melvin-bot bot commented Oct 14, 2022

Triggered auto assignment to @chiragsalian (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@chiragsalian
Copy link
Contributor

Shall investigate today

@melvin-bot melvin-bot bot removed the Overdue label Oct 17, 2022
@chiragsalian
Copy link
Contributor

I can reproduce the issue on staging but not on dev. From the network request it looks like the issue is something related to persisted requests and may not necessarily be an issue with the code around rate and unit. Either way, I'm thinking of waiting to see if the next deploy just solves this issue. Demoting it to weekly till then.

@chiragsalian chiragsalian added Weekly KSv2 and removed Daily KSv2 labels Oct 17, 2022
@puneetlath puneetlath added the Bug Something is broken. Auto assigns a BugZero manager. label Oct 19, 2022
@melvin-bot melvin-bot bot added the Overdue label Oct 26, 2022
@chiragsalian
Copy link
Contributor

I retested and it looks like its not an issue anymore. Can you retest and confirm @kbecciv?

@melvin-bot melvin-bot bot removed the Overdue label Oct 26, 2022
@kbecciv
Copy link
Author

kbecciv commented Oct 26, 2022

@puneetlath Checking, will update you shortly

@kavimuru
Copy link

@chiragsalian It flashes to old values for a second, then the value remains unchanged. Please check this video.

Recording.817.mp4

@puneetlath puneetlath added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Oct 31, 2022
@melvin-bot
Copy link

melvin-bot bot commented Oct 31, 2022

Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Oct 31, 2022
@chiragsalian
Copy link
Contributor

Ah yes, i see that problem. @kavimuru, could you update this issue or create another one to reflect the issue you just mentioned with steps. Then I can apply the external label so someone else can also reproduce and tackle.

@melvin-bot melvin-bot bot removed the Overdue label Oct 31, 2022
@kavimuru
Copy link

kavimuru commented Nov 1, 2022

@chiragsalian I have edited the steps, as per this new issue.

@chiragsalian
Copy link
Contributor

Sounds good. I'm like 90% sure the problem is front end and it might be an issue with how PersistedRequests and reconnectApp works. Either way, adding the appropriate labels for people to investigate.

@chiragsalian chiragsalian added External Added to denote the issue can be worked on by a contributor Weekly KSv2 and removed Daily KSv2 labels Nov 1, 2022
@melvin-bot
Copy link

melvin-bot bot commented Nov 1, 2022

Triggered auto assignment to @MitchExpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 1, 2022
@melvin-bot
Copy link

melvin-bot bot commented Nov 1, 2022

Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (External)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 1, 2022
@melvin-bot
Copy link

melvin-bot bot commented Nov 1, 2022

Current assignee @chiragsalian is eligible for the External assigner, not assigning anyone new.

@melvin-bot melvin-bot bot changed the title Web - Reimburse expenses - Offline save changes are not reflected immediately [$250] Web - Reimburse expenses - Offline save changes are not reflected immediately Nov 1, 2022
@jliexpensify jliexpensify removed their assignment Nov 1, 2022
@MitchExpensify
Copy link
Contributor

Upwork Job

@tienifr
Copy link
Contributor

tienifr commented Nov 2, 2022

Proposal

Problem

Currently, in offline mode when the user edits the init rate and clicks save, this action will add in networkRequestQueue and will be called back if back online.
When comeback online, firstly api?command=OpenWorkspaceReimburseView will be called to refresh data (old data) and then api?command= UpdateWorkspaceCustomUnitRate to update Workspace Custom Unit Rate. So when saving changes in offline are not reflected immediately

Solution

In Expensify/App/src/libs/actions/Policy.js
we'll change the read method to the write method to add api?command= OpenWorkspaceReimburseView to SequentialQueue to call synchronous

- API.read('OpenWorkspaceReimburseView', {policyID});
+ API.write('OpenWorkspaceReimburseView', {policyID});

Before

Screen-Recording-2022-11-02-at-11.27.10.mp4

After

Screen-Recording-2022-11-02-at-11.23.24_1.mp4

@melvin-bot melvin-bot bot added the Overdue label Nov 4, 2022
@chiragsalian chiragsalian added Weekly KSv2 and removed Daily KSv2 labels Nov 4, 2022
@melvin-bot melvin-bot bot removed the Overdue label Nov 4, 2022
@parasharrajat
Copy link
Member

I think we prioritized write operations before Reading in some PR. So this should be fixed by that.

I will discuss this on slack on Monday(when the team is active).

@jasperhuangg
Copy link
Contributor

This issue is solved by #12219, closing

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. Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants