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 2023-09-06] [$1000] Web - App displays single report in LHN for some time on login with that report link #23735

Closed
1 of 6 tasks
kbecciv opened this issue Jul 27, 2023 · 32 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Jul 27, 2023

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. Open the app
  2. Open any report and pin it
  3. Copy the URL
  4. Logout and paste the URL and press enter
  5. Login and observe that app displays report open in step 2 for some time before displaying all the results

Expected Result:

App should load all the LHN reports together and display the URL report in focus on login with report URL

Actual Result:

App only loads URL report for some time and displays only that report before loading all other reports on login with report URL

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.45-7
Reproducible in staging?: y
Reproducible in production?: y
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

only.one.report.loaded.login.mov
Recording.3939.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690386361860209

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018345473985202219
  • Upwork Job ID: 1686430262619181056
  • Last Price Increase: 2023-08-08
  • Automatic offers:
    • tienifr | Contributor | 26019546
    • dhanashree-sawant | Reporter | 26019547
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 27, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 27, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@tienifr
Copy link
Contributor

tienifr commented Jul 28, 2023

Proposal

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

Web - App displays single report in LHN for some time on login with that report link

What is the root cause of that problem?

In

const isLoading = _.isEmpty(chatReports) || isPersonalDetailsLoading;

We're checking isLoading to show the skeleton. It would be true if chatReports is not empty or isPersonalDetailsLoading is true.

When we open App from deeplink like /r/:reportID the draft report is added to onyxData => _.isEmpty(chatReports) is false
Beside, the OpenReport API is called before OpenApp so one report can be loaded first, that why we can see the only one report in LHN.

Screenshot 2023-07-28 at 17 46 33

After API OpenApp returns data, isPersonalDetailsLoading is updated to false, but the chatReports hasn't been updated yet

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

We should show the skeleton only when users login successfully and the API OpenApp returns data.

I suggest change this line

const isLoading = _.isEmpty(chatReports) || isPersonalDetailsLoading;

to const isLoading = SessionUtils.didUserLogInDuringSession() && isLoadingReportData

We subscribe isLoadingReportData in withOnyx

        isLoadingReportData: {
            key: ONYXKEYS.IS_LOADING_REPORT_DATA
        },

the default isLoadingReportData is true

isLoadingReportData===false means the chatReports is updated and isPersonalDetailsLoading is false so we don't need to check isPersonalDetailsLoading here

What alternative solutions did you explore? (Optional)

Solution 1: We can show the single report within skeleton below if isLoading is true but the current report is loaded

Screenshot 2023-07-28 at 18 22 29

Solution 2: We can show the skeleton in ReportScreen until isLoadingReportData is false

@melvin-bot melvin-bot bot added the Overdue label Jul 31, 2023
@stephanieelliott
Copy link
Contributor

I agree, the report loads for too long upon login. Adding External label so we can get this worked on

@melvin-bot melvin-bot bot removed the Overdue label Aug 1, 2023
@stephanieelliott stephanieelliott added External Added to denote the issue can be worked on by a contributor Overdue labels Aug 1, 2023
@melvin-bot melvin-bot bot changed the title Web - App displays single report in LHN for some time on login with that report link [$1000] Web - App displays single report in LHN for some time on login with that report link Aug 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

Job added to Upwork: https://www.upwork.com/jobs/~018345473985202219

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

melvin-bot bot commented Aug 1, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

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

@ArekChr
Copy link
Contributor

ArekChr commented Aug 2, 2023

We should show the skeleton only when users login successfully and the API OpenApp returns data.

@tienifr I assume in your proposal, the outcome of the solution is that the first report (from the URL) in the LHN will be hidden until the data is loaded, and instead, the skeleton will be displayed?

The first alternative solution, where the report from the URL is displayed along with the skeleton until all reports are loaded, seems interesting. What do you think, @stephanieelliott?

@stephanieelliott
Copy link
Contributor

The first alternative solution, where the report from the URL is displayed along with the skeleton until all reports are loaded, seems interesting. What do you think, @stephanieelliott?

I like it, @ArekChr ! I think that solution will feel more premium, we should show the first report as soon as it is loaded.

@ArekChr
Copy link
Contributor

ArekChr commented Aug 4, 2023

Great! Let's go then with the first alternative solution @tienifr

Solution 1: We can show the single report within skeleton below if isLoading is true but the current report is loaded.

Proposal approved 👌
🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Aug 4, 2023

Triggered auto assignment to @aldo-expensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@stephanieelliott
Copy link
Contributor

Bump on this, @aldo-expensify

@melvin-bot melvin-bot bot removed the Overdue label Aug 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 8, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@aldo-expensify
Copy link
Contributor

The proposal looks good to me too.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 9, 2023
@melvin-bot melvin-bot bot added the Weekly KSv2 label Aug 16, 2023
@stephanieelliott
Copy link
Contributor

Just noting here that this caused a regression, being worked on in #24596.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 17, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - App displays single report in LHN for some time on login with that report link [HOLD for payment 2023-08-24] [$1000] Web - App displays single report in LHN for some time on login with that report link Aug 17, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.54-13 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-24. 🎊

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.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

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:

  • [@ArekChr] The PR that introduced the bug has been identified. Link to the PR:
  • [@ArekChr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@ArekChr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@ArekChr] Determine if we should create a regression test for this bug.
  • [@ArekChr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@stephanieelliott] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@marcaaron
Copy link
Contributor

I think we have a production regression for this one. See comment here.

@stephanieelliott
Copy link
Contributor

Hey @tienifr, can you please share the PR that addresses the regression mentioned above? I'm not seeing that PR anywhere

@melvin-bot melvin-bot bot removed the Overdue label Aug 25, 2023
@aldo-expensify
Copy link
Contributor

@stephanieelliott we are considering the PR as an alternative: #25159 it is in review process, it seems like it is not handling all cases 100% well yet

@melvin-bot melvin-bot bot added the Overdue label Aug 28, 2023
@aldo-expensify
Copy link
Contributor

PR still under review, seems like some conflicts were incorrectly resolved.

@melvin-bot melvin-bot bot removed the Overdue label Aug 29, 2023
@stephanieelliott
Copy link
Contributor

Cool, thanks @aldo-expensify! Will keep an eye in #25159

@stephanieelliott
Copy link
Contributor

Deployed to production 8/30, updating payment date in issue title.

@stephanieelliott stephanieelliott changed the title [HOLD for payment 2023-08-24] [$1000] Web - App displays single report in LHN for some time on login with that report link [HOLD for payment 2023-09-06] [$1000] Web - App displays single report in LHN for some time on login with that report link Aug 31, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

@ArekChr, @stephanieelliott, @aldo-expensify, @tienifr Whoops! This issue is 2 days overdue. Let's get this updated quick!

@stephanieelliott
Copy link
Contributor

Summarizing payment on this issue:

  • Issue reporter: @dhanashree-sawant $250, paid via Upwork
  • Contributor: @tienifr $500, paid via Upwork ($1000 w/ 50% reduction for regression)
  • Contributor+: @ArekChr N/A (expert contrib, no payment due)

Upwork job is here, no speed bonus due to regression

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 Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

6 participants