Skip to content

[HOLD for payment 2023-09-07] [$1000] Chat - Opened chat does not show up in LHN when LHN is loading #24596

Closed

Description

@lanitochka17

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 found when executing PR #24204

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in with account with many conversations
  3. Copy link to any chat
  4. Log out
  5. Navigate to the link in Step 1
  6. Log in
  7. Right after the chat is loaded, return to LHN

Expected Result:

The opened chat in Step 6 will appear in LHN while the rest of the chats is loading

Actual Result:

The opened chat in Step 6 does not appear in LHN even though it is opened prior

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.54.7

Reproducible in staging?: Yes

Reproducible in production?: No

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

Bug6165912_24204_mweb__1_.1.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~013d3358a3bd902de6
  • Upwork Job ID: 1691926354859388928
  • Last Price Increase: 2023-08-16
  • Automatic offers:
    • s-alves10 | Contributor | 26165190

Activity

  1. added
    DeployBlockerCash
    on Aug 15, 2023
  2. OSBotify commented on Aug 15, 2023

    @OSBotify
    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.
  3. dummy-1111 commented on Aug 15, 2023

    @dummy-1111
    Contributor

    Proposal

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

    Opened chat doesn't show up in LHN when LHN is loading

    What is the root cause of that problem?

    Please check the below code

    {this.props.isLoading ? (
    <>
    {lodashGet(this.props.report, 'reportID') && (
    <OptionRowLHNData
    reportID={this.props.currentReportID}
    viewMode={viewMode}
    shouldDisableFocusOptions={this.props.isSmallScreenWidth}
    onSelectRow={this.showReportPage}
    />
    )}
    <OptionsListSkeletonView shouldAnimate />
    </>
    ) : (
    <LHNOptionsList
    contentContainerStyles={[styles.sidebarListContainer, {paddingBottom: StyleUtils.getSafeAreaMargins(this.props.insets).marginBottom}]}
    data={this.props.optionListItems}
    onSelectRow={this.showReportPage}
    shouldDisableFocusOptions={this.props.isSmallScreenWidth}
    optionMode={viewMode}
    />
    )}

    As you can see, we show skeleton when props.isLoading is true, or show report list. Before this PR, props.isLoading is false when reports are not empty, so if any report was loaded, we don't show skeleton. We show preloaded report list while loading all reports. But now, isLoading is true and this.props.report is also empty because currentReportID is undefined. So skeleton is shown full page.

    image

    This is the root cause

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

    When we open a report and navigate to the LHN, this.props.optionListItems is not empty. We should use this

    Solution 1

    Replacing the this.props.isLoading condition here with the this.props.isLoading && !this.props.optionListItems.length would give the exactly same result as production

    Solution 2
    I think it would be good to show existing reports with skeleton while loading. In order to do this, we can use the following code

            {this.props.isLoading ? (
                <>
                    <LHNOptionsList
                        style={[styles.flexShrink1]}
                        contentContainerStyles={[styles.sidebarListContainer, {paddingBottom: StyleUtils.getSafeAreaMargins(this.props.insets).marginBottom}]}
                        data={this.props.optionListItems}
                        onSelectRow={this.showReportPage}
                        shouldDisableFocusOptions={this.props.isSmallScreenWidth}
                        optionMode={viewMode}
                    />
                    <OptionsListSkeletonView shouldAnimate />
                </>
            ) : (
                <LHNOptionsList
                    contentContainerStyles={[styles.sidebarListContainer, {paddingBottom: StyleUtils.getSafeAreaMargins(this.props.insets).marginBottom}]}
                    data={this.props.optionListItems}
                    onSelectRow={this.showReportPage}
                    shouldDisableFocusOptions={this.props.isSmallScreenWidth}
                    optionMode={viewMode}
                />
            )}
    

    Here we need to add additional props style to the LHNOptionList component. Its default value is styles.flex1 and this code

    <View style={[styles.flex1]}>

    will be replaced with

        style={props.style}
    
    Solution 1
    solution_1.mp4
    Solution 2
    solution_2.mp4

    What alternative solutions did you explore? (Optional)

  4. melvin-bot commented on Aug 15, 2023

    @melvin-bot

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

  5. added
    Daily
    and removed
    Hourly
    on Aug 15, 2023
  6. aldo-expensify commented on Aug 15, 2023

    @aldo-expensify
    Contributor

    cc @tienifr @ArekChr the PR #24204 seems to have caused this regression according to @s-alves10 , can you help confirm that?

    Thanks @s-alves10 for the help investigating.

  7. ArekChr commented on Aug 16, 2023

    @ArekChr
    Contributor

    cc @tienifr @ArekChr the PR #24204 seems to have caused this regression according to @s-alves10 , can you help confirm that?

    Thanks @s-alves10 for the help investigating.

    @aldo-expensify Yes, this PR caused regression

  8. tienifr commented on Aug 16, 2023

    @tienifr
    Contributor

    yes, it's my regression. I'll fix it asap

  9. yuwenmemon commented on Aug 16, 2023

    @yuwenmemon
    Contributor

    @tienifr any ETA on when you expect to have a PR up? If it's not going to be within the next few hours then should we revert the offending PR?

  10. dummy-1111 commented on Aug 16, 2023

    @dummy-1111
    Contributor

    I can create a PR according to #24596 (comment) in 2~3 hours

  11. yuwenmemon commented on Aug 16, 2023

    @yuwenmemon
    Contributor

    @s-alves10 great - you're hired.

  12. 42 remaining items

  13. aldo-expensify commented on Aug 24, 2023

    @aldo-expensify
    Contributor

    Agreed, I tested and seems to be solving both issues (commented with more details here).

    Let's wait for @s-alves10 to update the PR with main and resolve conflicts, then we can do a final review.

  14. melvin-bot commented on Aug 29, 2023

    @melvin-bot

    Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

    • when @s-alves10 got assigned: 2023-08-16 21:35:15 Z
    • when the PR got merged: 2023-08-29 17:56:11 UTC
    • days elapsed: 8

    On to the next one 🚀

  15. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on Aug 31, 2023
  16. changed the title [-][$1000] Chat - Opened chat does not show up in LHN when LHN is loading[/-] [+][HOLD for payment 2023-09-07] [$1000] Chat - Opened chat does not show up in LHN when LHN is loading[/+] on Aug 31, 2023
  17. removed
    Reviewing
    on Aug 31, 2023
  18. melvin-bot commented on Aug 31, 2023

    @melvin-bot

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

  19. melvin-bot commented on Aug 31, 2023

    @melvin-bot

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

    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:

    • @narefyev91 does not require payment (Contractor)
    • @s-alves10 requires payment offer (Contributor)

    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
  20. added
    Daily
    and removed
    Weekly
    on Sep 12, 2023
  21. sakluger commented on Sep 12, 2023

    @sakluger
    Contributor

    Summarizing payouts for this issue:

    Reporter: Applause (contractor, no payment)
    Contributor: @s-alves10 $1000 (hired on Upwork)
    Contributor+: @narefyev91 (contractor, no payment)

    Above payments include efficiency bonus 🎉
    Upwork job: https://www.upwork.com/jobs/~0137e6674165abf18a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentDailyEngineeringExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions