Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.56k stars 2.9k forks source link

[$500] LHN - Created Split Bill Group chat in offline displays in bottom in LHN #30467

Closed izarutskaya closed 1 year ago

izarutskaya commented 1 year ago

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

Expensify/Expensify Issue URL:

Issue reported by: Applause-Internal Team

Slack conversation: @

Action Performed:

Precondition: user should be signed in to HT account with multiple chats in LHN

  1. Open https://staging.new.expensify.com/
  2. Disable internet connection
  3. Click on FAB
  4. Click on Request Money
  5. Enter amount and click Next button
  6. Select two or more attendees with non-existing account and Click next
  7. On final confirmation page click Split button
  8. Scroll down the LHN and find the created group chat position

Expected Result:

Created Split Bill group chat should be displayed on top in LHN

Actual Result:

Created split bill group chat displayed in bottom in LHN

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Safari https://github.com/Expensify/App/assets/115492554/fed4df60-08eb-4fc6-9981-53dcac6d0d74
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017ec1c10c1e85daae
  • Upwork Job ID: 1717647104275853312
  • Last Price Increase: 2023-11-02
Issue OwnerCurrent Issue Owner: @rushatgabhane
melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

melvin-bot[bot] commented 1 year ago

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

rojiphil commented 1 year ago

Proposal

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

When a money request is split with participants with whom there is no open IOU Report, the LHN displays the IOU Reports with such participants towards the end of the LHN.

What is the root cause of that problem?

When a split money request is created, the optimistic data of the IOU Report is set here. However, since this would be a new report lastVisibleActionCreated will not be set as seen in the optimistic creation of iou reports here. Since LHN sorts the reports based on lastVisibleActionCreated as shown here, the newly created IOU Reports will be displayed towards the end of LHN. This is the root cause.

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

To set lastVisibleActionCreated for newly created IOU Reports, we can set it to the report action like this here

                ...(isNewIOUReport ? {pendingFields: {createChat: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD}, lastVisibleActionCreated: iouAction.created} : {}),

What alternative solutions did you explore? (Optional)

melvin-bot[bot] commented 1 year ago

@twisterdotcom, @rushatgabhane Whoops! This issue is 2 days overdue. Let's get this updated quick!

twisterdotcom commented 1 year ago

Bump here @rushatgabhane.

melvin-bot[bot] commented 1 year ago

@twisterdotcom, @rushatgabhane Eep! 4 days overdue now. Issues have feelings too...

rojiphil commented 1 year ago

Dupe of #30472

melvin-bot[bot] commented 1 year ago

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

twisterdotcom commented 1 year ago

Okay, lets close.