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.29k stars 2.73k forks source link

[$250] CRITICAL: [UX Reliability] Old messages show up as most recent, and the new messages didn't load for several minutes #43656

Open muttmuure opened 2 months ago

muttmuure commented 2 months 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: v1.4.82-4 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: @kevinksullivan Slack conversation: https://expensify.slack.com/archives/C05LX9D6E07/p1717013309521369

Action Performed:

Break down in numbered steps

~As part of the OpenApp, we load a parent reportAction for all reports stored locally. When the app executes OpenReport, if present, we load the parent reportAction first.~ OpenApp command now returns the last report action for each chat in the LHN. We want to show it instantly when the user opens a report from the LHN, and the loading skeleton above it.

  1. Alice texts message A to Bob in their DM
    1. Bob replies in a thread to the message A, which creates a new chat in their LHN
    2. Alice and Bob then continue to chat in their DM and end the conversation with the message B
    3. Bob signs out and then signs in again
    4. Bob now sees the DM and the thread of the message A in the LHN
    5. The DM has the preview of the message B in the LHN
    6. Bob opens the DM

Expected Result:

Bob should see the message B as the last message on the report page and a loading skeleton above it, indicating that the report actions are being fetched

Actual Result:

Bob sees the message A on the report page, with no loading spinner, until the OpenReport command returns the report actions. Sometimes Bob sees no message but a full page loading skeleton.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019999ccc983033009
  • Upwork Job ID: 1803425149604648150
  • Last Price Increase: 2024-08-26
  • Automatic offers:
    • CyberAndrii | Contributor | 103753081
Issue OwnerCurrent Issue Owner: @Kureev
melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @CortneyOfstad (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @cristipaval (AutoAssignerNewDotQuality)

muttmuure commented 2 months ago

From @mountiny -

We need to explore what is the consequence of not returning the parent report actions in the OpenApp for the app. It should solve this issue but I am not sure about its side effects

cristipaval commented 2 months ago

Just started to look into this one. I'll first start with the Slack convo about the issue.

cristipaval commented 2 months ago

Yes, I agree with @mountiny's suggested solution. I'll investigate if it is feasible not to return the parent report action in the parent report.

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

Upwork job price has been updated to $500

cristipaval commented 2 months ago

The bounty for the Critical issues is $500, correct?

cristipaval commented 2 months ago

Yes, I agree with @mountiny's suggested solution. I'll investigate if it is feasible not to return the parent report action in the parent report.

Unfortunately, this doesn't seem feasible. I added the External label to get the contributors' help checking if we could update the existing logic around the loading spinner showing at the bottom of the chat when the App fetches report actions.

CortneyOfstad commented 2 months ago

Sounds good and thank you for looking at @cristipaval!

cristipaval commented 2 months ago

FYI @CortneyOfstad, we're discussing more about this issue here

cristipaval commented 2 months ago

Status: I'm trying to get some more engineering consensus here before I start implementing the changes in Auth.

melvin-bot[bot] commented 2 months ago

@CortneyOfstad, @cristipaval, @fedirjh Huh... This is 4 days overdue. Who can take care of this?

cristipaval commented 2 months ago

We got an engineering consensus on the internal solution. I'll start the implementation.

CortneyOfstad commented 2 months ago

@cristipaval any update on the implementation? Thanks!

cristipaval commented 2 months ago

I started working on it. I'm trying to avoid making the already slow query even slower. I'm still looking to see if I can use the data already pulled from the DB here to build the reportAction data needed in Onyx.

melvin-bot[bot] commented 2 months ago

@CortneyOfstad @cristipaval this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

cristipaval commented 2 months ago

Update: Draft Auth and Web-E PRs open.

cristipaval commented 2 months ago

Draft PRs in review, we're discussing about them here

cristipaval commented 2 months ago

The PRs are ready for review.

cristipaval commented 2 months ago

Ok, so after more discussions, I'll have to spend some more time on the PRs to avoid making the OpenApp command get slower.

melvin-bot[bot] commented 2 months ago

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

cristipaval commented 2 months ago

We're still discussing the best solution.

melvin-bot[bot] commented 1 month ago

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

cristipaval commented 1 month ago

I am working on the PRs to make them pass Travis. Then I'll prepare the queries to time and make them ready for review.

cristipaval commented 1 month ago

The Auth and Web-E PRs are under review.

cristipaval commented 1 month ago

I need to rework the Auth PR a bit due to some real performance concerns

cristipaval commented 1 month ago

Almost there, the Auth PR is in good shape and we might merge it soon

cristipaval commented 1 month ago

I'm addressing some more feedback on the Auth PR. We might merge the Auth PR today.

cristipaval commented 1 month ago

Auth PR is deployed. Web-E PR is merged, when it hits staging, we can work on the App code.

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

Upwork job price has been updated to $500

cristipaval commented 1 month ago

I made it $500, given that it is a CRITICAL issue. Web-E PR hit staging today, so the backend is ready for the contributors

FitseTLT commented 1 month ago

@cristipaval When I debug it, I see that now Open App is returning the first report actions of the reports instead of the last, but if I understood the current issue correctly it is supposed to return the last one; isn't it ?? Can you pls give some clarification regarding the BE changes U made? Thx. Currently if you go offline and open a firstly loading report it will show the first action as the last one and a loading indicator above it, so IMO if we correctly return the last report action ion open app we won't even need FE change to fix the current issue.

cristipaval commented 1 month ago

@FitseTLT Thanks for looking into it! It shows the last report action when you are offline, but when you have slow internet and it is waiting for OpenReport command to finish, the last report action from Onyx is not shown.

cristipaval commented 1 month ago

Update: The Web-E PR was reverted due to an App crash in some conditions.

cristipaval commented 1 month ago

Melvin?

cristipaval commented 1 month ago

I'm fixing the tests on the PR for other #newdot-quality issue on my plate and then jump again into this one

cristipaval commented 1 month ago

The new Web-E PR is ready again for review.

melvin-bot[bot] commented 1 month ago

Triggered auto assignment to @kadiealexander (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

CortneyOfstad commented 1 month ago

@kadiealexander I am heading OoO so reassigned this to keep eyes on it. Thank you!

melvin-bot[bot] commented 1 month ago

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

cristipaval commented 1 month ago

@Expensify/design, Could you please help us decide on the expected result? Should we show the prefetched last report action and the loading skeleton above it, or should we show a small loading spinner above the prefetched last report action, indicating that the prior actions are being fetched?

shawnborton commented 1 month ago

I think we want the skeleton above the last message, right? This is what I see from the expected result at least: CleanShot 2024-08-01 at 08 18 25@2x

cristipaval commented 1 month ago

I wrote the expected result and wanted you to confirm from the design standpoint.

shawnborton commented 1 month ago

Ah okay cool, consider it confirmed on my end then :)

cristipaval commented 1 month ago

Ah okay cool, consider it confirmed on my end then :)

Thank you!

cristipaval commented 1 month ago

We might have a contributor working on it soon.

Kureev commented 1 month ago

Hi, I am Alexey from Margelo and I can work on this issue.