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

[HOLD for payment 2024-02-07] Private note - Private note opened from deeplink in offline shown empty #34270

Closed
3 of 6 tasks
lanitochka17 opened this issue Jan 10, 2024 · 18 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 10, 2024

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


Version Number: 1.4.24-0
Reproducible in staging?: Y
Reproducible in production?: N
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Issue found when executing PR #31257

Action Performed:

  1. Open any chat and select a Contact to view their details.
  2. Open a note and copy its link (URL) and paste and send to the chat
  3. Log out and login again
  4. Open the same chat and disconnect
  5. Open the deeplink of the note in edit mode
  6. Turn on the internet connection.

Expected Result:

The note is opened in edit mode and can be seen fully

Actual Result:

An empty note is opened in edit mode after the connection recovers

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6337960_1704907498398.BUG_in_staging_Recording__579.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Jan 10, 2024
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.

Copy link

melvin-bot bot commented Jan 10, 2024

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

@lanitochka17
Copy link
Author

Production:

Bug6337960_1704907498405.Production_Recording__583.mp4

@abzokhattab
Copy link
Contributor

abzokhattab commented Jan 10, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

when opening the deeplink in offline and connecting to the ne twork .. an empty private note appear

What is the root cause of that problem?

the loader indicator is not shown in case the isPrivateNotesFetchTriggered is false

const shouldShowFullScreenLoadingIndicator = !isPrivateNotesFetchTriggered || (isPrivateNotesEmpty && (report.isLoadingPrivateNotes || !isOtherUserNote));

here we can find the isPrivateNotesFetchTriggered var initialization:

const isPrivateNotesFetchTriggered = !_.isUndefined(report.isLoadingPrivateNotes);

as you can notice we only check the existence of the report.isLoadingPrivateNotes prop we dont check if the value is true or false

and since in the optimistic value we set the report.isLoadingPrivateNotes to true then the isLoadingPrivateNotes value will be defined and the isPrivateNotesFetchTriggered will be true in this case and thus the loader indicator disappears.

the issue here occurs because at the optimistic stage the data is not yet fetched from the database so the report data will not contain the privateNote
this happens

What changes do you think we should make in order to solve the problem?

we should remove the loader indicator only when the isLoadingPrivateNotes is false meaning that the fetching process is finished

thus we can introduce this new variable:

            const isPrivateNotesFetchFinished = isPrivateNotesFetchTriggered && !report.isLoadingPrivateNotes;

and update the loader indicator to:

            const shouldShowFullScreenLoadingIndicator = !isPrivateNotesFetchFinished || (isPrivateNotesEmpty && (report.isLoadingPrivateNotes || !isOtherUserNote));

Result

Screen.Recording.2024-01-10.at.9.21.48.PM.mov

@thienlnam
Copy link
Contributor

I don't think this needs to be a blocker - since the PR was merged recently, @hungvu193 and @jjcoffee can address

@thienlnam thienlnam added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jan 11, 2024
@jjcoffee
Copy link
Contributor

@hungvu193 Are you able to look into this?

@abzokhattab
Copy link
Contributor

Let me know what you think about the proposal above ... the PR can be ready once assigned.

@hungvu193
Copy link
Contributor

@hungvu193 Are you able to look into this?

let me take a look

Copy link

melvin-bot bot commented Jan 16, 2024

@stitesExpensify Huh... This is 4 days overdue. Who can take care of this?

@stitesExpensify
Copy link
Contributor

@hungvu193 any update?

@jjcoffee
Copy link
Contributor

@hungvu193 Friendly bump! Did you get a chance to look at this?

@melvin-bot melvin-bot bot added the Overdue label Jan 18, 2024
@hungvu193
Copy link
Contributor

@hungvu193 Friendly bump! Did you get a chance to look at this?

Sorry for late response, I'll draft a PR today.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review and removed Overdue Daily KSv2 labels Jan 22, 2024
@melvin-bot melvin-bot bot added the Weekly KSv2 label Jan 22, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 31, 2024
@melvin-bot melvin-bot bot changed the title Private note - Private note opened from deeplink in offline shown empty [HOLD for payment 2024-02-07] Private note - Private note opened from deeplink in offline shown empty Jan 31, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 2024

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

Copy link

melvin-bot bot commented Jan 31, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.33-5 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-02-07. 🎊

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 6, 2024
Copy link

melvin-bot bot commented Feb 7, 2024

Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

@melvin-bot melvin-bot bot added the Overdue label Feb 8, 2024
Copy link

melvin-bot bot commented Feb 9, 2024

@stitesExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@jjcoffee
Copy link
Contributor

jjcoffee commented Feb 9, 2024

@stitesExpensify We're good to close this!

@stitesExpensify
Copy link
Contributor

Great, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering
Projects
None yet
Development

No branches or pull requests

6 participants