Skip to content

IOU - Chat row with a red dot in LHN is not grayed out when money request fails #31639

Closed

Description

@kbecciv

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.1.5
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:

Action Performed:

  1. Navigate to staging.new.expensify.com.
  2. [User A] Go offline.
  3. [User A] Request money from User B and stay in the chat with User B.
  4. [User B] Request the same amount of money from User A.
  5. [User A] Go online.

Expected Result:

The chat row in LHN is grayed out when the red dot appears next to it.

Actual Result:

The chat row in LHN is not grayed out when the red dot appears next to it.

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

Bug6285583_1700576282155.20231121_134401.1.mp4

View all open jobs on GitHub

Activity

  1. github-actions commented on Nov 21, 2023

    @github-actions
    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.
  2. melvin-bot commented on Nov 21, 2023

    @melvin-bot

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

  3. melvin-bot commented on Nov 21, 2023

    @melvin-bot

    📣 @github-actions[bot]! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  4. kbecciv commented on Nov 21, 2023

    @kbecciv
    Author

    Issue is not reproducible on production

    20231121_165038.1.mp4
  5. bernhardoj commented on Nov 21, 2023

    @bernhardoj
    Contributor

    Proposal

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

    The chat is not grayed out when the chat creation is failed.

    What is the root cause of that problem?

    This is a regression from #31172 where we clear the pendingFields or pendingAction when optimistically creating the chat report.

    App/src/libs/actions/IOU.js

    Lines 299 to 339 in c6f9229

    const failureData = [
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT}${chatReport.reportID}`,
    value: {
    hasOutstandingIOU: chatReport.hasOutstandingIOU,
    iouReportID: chatReport.iouReportID,
    lastReadTime: chatReport.lastReadTime,
    pendingFields: null,
    ...(isNewChatReport
    ? {
    errorFields: {
    createChat: ErrorUtils.getMicroSecondOnyxError('report.genericCreateReportFailureMessage'),
    },
    }
    : {}),
    },
    },
    ...(isNewIOUReport
    ? [
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport.reportID}`,
    value: {
    pendingFields: null,
    errorFields: {
    createChat: ErrorUtils.getMicroSecondOnyxError('report.genericCreateReportFailureMessage'),
    },
    },
    },
    ]
    : []),
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.TRANSACTION}${transaction.transactionID}`,
    value: {
    errors: ErrorUtils.getMicroSecondOnyxError('iou.error.genericCreateFailureMessage'),
    pendingAction: null,
    pendingFields: null,
    },
    },

    There is actually a test case for this but it's adjusted to satisfy the new code.

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

    Don't clear both pendingFields and pendingAction.

    or simply revert the PR because it's in a regression period.

  6. luacmartins commented on Nov 21, 2023

    @luacmartins
    Contributor

    Demoting to NAB given this thread

  7. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Nov 21, 2023
  8. bondydaa commented on Nov 21, 2023

    @bondydaa
    Contributor

    I think we can close this out since as best we can tell this is how it's supposed to work now. I'll follow up on the issue linked to the other PR to make sure regressions are updated.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions