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

[$500] Fab - Hidden not displayed on chat header & LHN when creating an IOU #36885

Closed
3 of 6 tasks
kbecciv opened this issue Feb 20, 2024 · 19 comments
Closed
3 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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

Comments

@kbecciv
Copy link

kbecciv commented Feb 20, 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: v1.4.43-0
Reproducible in staging?: y
Reproducible in production?: n
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Click on FAB > Request money > enter amount
  2. Select a new user that has ND account > Click on 'Request' button

Expected Result:

Hidden should be displayed in LHN & report header

Actual Result:

Hidden is not displayed in LHN & report header

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

Bug6385574_1708425964747.Screen_Recording_2024-02-20_at_3.44.04_at_night.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015ea497aa7819e170
  • Upwork Job ID: 1759944064634163200
  • Last Price Increase: 2024-02-20
@kbecciv kbecciv added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor labels Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

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

@melvin-bot melvin-bot bot changed the title Fab - Hidden not displayed on chat header & LHN when creating an IOU [$500] Fab - Hidden not displayed on chat header & LHN when creating an IOU Feb 20, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Feb 20, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 20, 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 Feb 20, 2024

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

@kbecciv
Copy link
Author

kbecciv commented Feb 20, 2024

We think that this bug might be related to #vip-bills
CC @davidcardoza

@flodnv flodnv added the Bug Something is broken. Auto assigns a BugZero manager. label Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

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

@flodnv
Copy link
Contributor

flodnv commented Feb 20, 2024

@greg-schroeder @DylanDylann are you able to reproduce? I am unable. I think something is missing from repro steps @kbecciv ?

@flodnv
Copy link
Contributor

flodnv commented Feb 20, 2024

Expected Result:
Hidden should be displayed in LHN & report header

I don't even get that -- @kbecciv can you share a screenshot of the expected outcome please? 😕

Pinged you on Slack: https://expensify.slack.com/archives/C01GTK53T8Q/p1708447801997469?thread_ts=1708438349.003729&cid=C01GTK53T8Q

@kbecciv
Copy link
Author

kbecciv commented Feb 20, 2024

I've noticed a discrepancy in behavior between production and staging. In production, the avatar of a user whom I've never chatted with before, but who has an ND account, is displayed in the header. However, in staging, the user's avatar is displayed as a skeleton in both the header and LHN.

Production

Recording.6036.mp4

Staging

Recording.6035.mp4

@dukenv0307
Copy link
Contributor

dukenv0307 commented Feb 22, 2024

Proposal

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

Hidden is not displayed in LHN & report header

What is the root cause of that problem?

When we create a money request with a new user, we have a report action is report preview action so OpenReport API isn't called in ReportScreen here

if (report.reportID && report.reportID === getReportID(route) && !isLoadingInitialReportActions) {

And after requestMoney API is complete, we don't update isOptimisticReport in successData as false so OpenReport API isn't called here

if (props.report.isOptimisticReport || !_.isEmpty(createChatError)) {

After all above, because OpenReport isn't called, personal detail of new user isn't returned that makes Header show skeleton and LHN doesn't show Hidden

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

We should update isOptimisticReport of all new report when we create a request money to false in successData so when requestMoney is complete, openReport API can be called.

{
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport.reportID}`,
    value: {
        isOptimisticReport: false,
        pendingFields: null,
        errorFields: null,
    },
},
{
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT}${chatReport?.reportID}`,
    value: {
        isOptimisticReport: false,
    },
},

successData.push(

And add props.report. isOptimisticReport as a dependency here

What alternative solutions did you explore? (Optional)

NA

@DylanDylann
Copy link
Contributor

@dukenv0307 Do you suggest applying isOptimisticReport to report or reportAction? It seems your permalink taking us to success data of reportAction

@dukenv0307
Copy link
Contributor

@DylanDylann I suggest to update the report data as the preview code in my proposal. The permalink is only linked to the successData.

@DylanDylann
Copy link
Contributor

But your permalink linked to success data or report action

Screenshot 2024-02-23 at 13 39 48

@dukenv0307
Copy link
Contributor

dukenv0307 commented Feb 23, 2024

@DylanDylann I updated #36885, sorry for the confusion.

@DylanDylann
Copy link
Contributor

DylanDylann commented Feb 23, 2024

@dukenv0307 Could you reproduce this issue on the latest main?
I can't reproduce anymore. This is my log, It is different from RCA in your proposal
Screenshot 2024-02-23 at 15 24 30

@dukenv0307
Copy link
Contributor

@DylanDylann Also can't reproduce on the latest main but I found another in the latest main:

Create money request in offline show skeleton instead of the grey out report.

cc @greg-schroeder

Screen.Recording.2024-02-23.at.16.40.45.mov

@DylanDylann
Copy link
Contributor

@chiragsalian @flodnv we can't reproduce the original issue anymore, so I think we should remove deployBlocker label in this issue. And we also should consider to fix above bug that is mentioned by @dukenv0307

@chiragsalian
Copy link
Contributor

Sounds good, removing the blocker label and checking it off the checklist. I'd suggest to create another issue to tackle the bug that @dukenv0307 brought up.

@chiragsalian chiragsalian added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Feb 23, 2024
@DylanDylann
Copy link
Contributor

@chiragsalian Reported bug here. Let's close this one

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 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
Projects
None yet
Development

No branches or pull requests

6 participants