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.49k stars 2.84k forks source link

[HOLD for payment 2023-08-24] Show chats in the LHN that have at least 1 ADDComment action, or 1 draft message #14523

Closed JmillsExpensify closed 1 year ago

JmillsExpensify 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!


Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Login with any account
  3. Search for a user that you don't have any messages with, open the chat but don't send any message

Expected Result:

Chat should not show in the LHN as there is not at least 1 ADDComment action, or 1 draft message.

Actual Result:

Empty chat shows in the LHN and remains in the LHN after simply navigating to it.

Workaround:

None

Platforms:

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

Version Number: 1.2.58-3 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 Notes/Photos/Videos: Any additional supporting documentation Expensify/Expensify Issue URL: Issue reported by: Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fbd874b8451c4608
  • Upwork Job ID: 1618016837618089984
  • 2023-01-24
  • Automatic offers:
    • | | 0
PauloGasparSv commented 1 year ago

I drafted the P.R. and the changes seem to work! Still need to test more + add evidences and QA/Test steps before it is ready for reviews, will try do that today!

PauloGasparSv commented 1 year ago

I drafted the https://github.com/Expensify/App/pull/19321 and the changes seem to work! Still need to test more + add evidences and QA/Test steps before it is ready for reviews, will try do that today!

Couldn't find time to get back to this but I'm finishing the P.R. before EOW.

PauloGasparSv commented 1 year ago

Couldn't find time to get back to this but I'm finishing the P.R. before EOW.

Getting back to this Today!

PauloGasparSv commented 1 year ago

Still in progress, latest updates here

PauloGasparSv commented 1 year ago

Still making progress in the P.R. and still have some travis errors to fix, latest updates here

PauloGasparSv commented 1 year ago

No new updates yet since Friday, I'm getting back to this in a couple of hours to finish the P.R.

PauloGasparSv commented 1 year ago

Found some bugs and fixed them while testing. Right now there is 1 bug left that I'm aware when you send a message and exit the chat really quickly before Onyx sends data back.

I'll try to fix that tomorrow.

PauloGasparSv commented 1 year ago

Found some bugs and fixed them while testing. Right now there is 1 bug left that I'm aware when you send a message and exit the chat really quickly before Onyx sends data back.

I'll try to fix that tomorrow.

Trying to reproduce this reliably to fix it, this is not always happening!

I managed to reproduce this a couple of times by deleting multiple comments inside the report and then going to the concierge chat really quickly.

I think we are not clearing lastMessageText somewhere correctly and that is generating the behaviour.

Still trying to understand how force that behavior to replicate this

![image](https://github.com/Expensify/App/assets/6564265/4e87adf4-e38a-48d2-aa80-9a8812e10b15) https://github.com/Expensify/App/assets/6564265/cd57b85d-70a0-4071-b9bb-10fbb6d12137

Edit: Sorry, meant to post this on the P.R.!

PauloGasparSv commented 1 year ago

Was focused on a Manual Requests issue but will shift focus back to this tomorrow.

PauloGasparSv commented 1 year ago

Was focused on a https://github.com/Expensify/Expensify/issues/278892 but will shift focus back to this tomorrow.

Still focused on that and this Tasks bug that is close to breaking WAQ too. Will get back to this ASAP on Monday

PauloGasparSv commented 1 year ago

Back to working on this later Today!

PauloGasparSv commented 1 year ago

P.R. still in progress and I'm fixing bugs, more details there!

I think I may need a couple of days to finish this but I'm aiming to make the P.R. ready for reviews tomorrow.

PauloGasparSv commented 1 year ago

Latest updates in the P.R., that bug I mentioned affected another P.R. that was discussed yesterday and we found a fix.

I'll apply the fix to this issue's P.R. and go back to testing asap

PauloGasparSv commented 1 year ago

Latest update here!

PauloGasparSv commented 1 year ago

No updates today but I'll shift focus back to this tomorrow. (Focusing on https://github.com/Expensify/App/issues/19098 right now to get it done in time for SNH)

PauloGasparSv commented 1 year ago

No updates today but I'll shift focus back to this tomorrow. (Focusing on https://github.com/Expensify/App/issues/19098 right now to get it done in time for SNH)

Was still focused on finishing that issue today, will shift focus back to this tomorrow and try to get the P.R. in review.

PauloGasparSv commented 1 year ago

I made a small progress on the P.R. today after merging with main and adding the currentReportId fix mentioned here but since I focused most of my time these past 3 days on https://github.com/Expensify/App/issues/19098 and https://github.com/Expensify/Expensify/issues/290894 (for SNH and Manual Requests) I'll have to push putting the P.R. in review for tomorrow

PauloGasparSv commented 1 year ago

Pushing this for tomorrow once again.

I focused most of the day on this NS problem and now I'm focusing on the bug https://github.com/Expensify/App/issues/21609 where new users can't sign into newDot.

I'll go back to finish this issue's P.R. ASAP

PauloGasparSv commented 1 year ago

No updates today, will focus on this first thing in the morning tomorrow.

PauloGasparSv commented 1 year ago

Hey, I finish fixing the bugs I had reported last time and fixing the unit tests.

I re-tested everything in Web and only found a couple of issues, I described both here and I'm a little worried about the second problem so I'll describe it briefly:

When we create a new empty chat with someone, newDot generates a random reportID for that chat. Because of that and the fact we are hiding empty report from LNH now, if someone goes offline they can spam a bunch ofOpenReportcalls to differentreportID`'s by re-creating the same chat over and over.

I'll investigate both issues further tomorrow.

melvin-bot[bot] commented 1 year ago

@JmillsExpensify, @PauloGasparSv, @bernhardoj, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

PauloGasparSv commented 1 year ago

Hey, I made no progress here since last Thursday because I focused on some bugs and deploy blockers.

Will pick this back up later today so I'll have an update by tomorrow.

PauloGasparSv commented 1 year ago

I prioritized Manual Requests and addressing some existing P.R. comments today over this so I didn't make any progress with the bugs I mentioned.

Will try to make progress tomorrow and will report here

PauloGasparSv commented 1 year ago

Still working on the bugs in that P.R., I managed to make some progress today but also introduced some new errors.

Will continue to prioritize this tomorrow

PauloGasparSv commented 1 year ago

Had no updates on Friday because I focused on https://github.com/Expensify/Expensify/issues/296893 and https://github.com/Expensify/Expensify/issues/297100, will try to focus on this again on Monday

PauloGasparSv commented 1 year ago

Focused on https://github.com/Expensify/Expensify/issues/296893 (discussed here), P.R. reviews + addressing over this.

I don't think I'll have time to look into this today so doing it tomorrow.

PauloGasparSv commented 1 year ago

Forgot to give this update here!

Had to focus on Manual Requests + Deploy Blockers. I accumulated some newDot reviews from this week, once I'm done with those I'll work on this again.

PauloGasparSv commented 1 year ago

Not overdue!

PauloGasparSv commented 1 year ago

Hey team, I'm going OOO for 2 weeks (starting on July 17th, back on July 31st) so I won't be updating this issue until then!

cc @JmillsExpensify

melvin-bot[bot] commented 1 year ago

@JmillsExpensify, @PauloGasparSv, @bernhardoj, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

JmillsExpensify commented 1 year ago

We need to find a volunteer for this, going to float internally

roryabraham commented 1 year ago

Said another way: "hide empty chats from the LHN". Is that correct?

thesahindia commented 1 year ago

Said another way: "hide empty chats from the LHN". Is that correct?

Yep!

melvin-bot[bot] commented 1 year ago

@JmillsExpensify, @PauloGasparSv, @bernhardoj, @thesahindia Huh... This is 4 days overdue. Who can take care of this?

JmillsExpensify commented 1 year ago

Agreed. Floated this with an expert agency today. Should hear back in the coming days.

pac-guerreiro commented 1 year ago

Hey, I'm Pedro Guerreiro, an expert from Callstack, and I can take a look into this 😄

melvin-bot[bot] commented 1 year ago

📣 @thesahindia Please request via NewDot manual requests for the Reviewer role ($1000)

luacmartins commented 1 year ago

Thanks for picking this up @pac-guerreiro. Assigned you to the issue.

pac-guerreiro commented 1 year ago

Sorry for the delay, I'll start working on this issue today 😄

PauloGasparSv commented 1 year ago

Hey I got back from OOO today!

@pac-guerreiro do you have any updates on this issue?

pac-guerreiro commented 1 year ago

@PauloGasparSv

Hey, I didn't make any advance with this issue since I had other issues in my plate sadly 😓

I did review your changes and noticed these issues:

  1. Going back/forward in browser history will show empty chats that were removed
  2. Money request flow is broken
  3. Empty chat report actions will remain persisted in local storage
PauloGasparSv commented 1 year ago

@PauloGasparSv

Hey, I didn't make any advance with this issue since I had other issues in my plate sadly 😓

I did review your changes and noticed these issues:

  1. Going back/forward in browser history will show empty chats that were removed
  2. Money request flow is broken
  3. Empty chat report actions will remain persisted in local storage

Awesome, thks so much for the help here!

Btw, I also noticed we are now discussing this issue in this slack thread so latest updates are there.

PauloGasparSv commented 1 year ago

As discussed here I'll pick this back up from @pac-guerreiro

PauloGasparSv commented 1 year ago

Focused on other P.R.'s today so I'll pick this back up on Monday

PauloGasparSv commented 1 year ago

Hey, I've made a little bit of progress today, picked the P.R. back up, solved conflicts and started testing again to remember the errors I was getting before going OOO.

I'm still focusing on the fact ReportId's are generated randomly in newDot and how to avoid duplicate reports and how to clear them from storage, I don't think that alone will be the solution).

I also did a quick investigation of this issue that was holding on this issue's P.R..

PauloGasparSv commented 1 year ago

I'm still focusing on the fact ReportId's are generated randomly in newDot and how to avoid duplicate reports and how to clear them from storage, I don't think that alone will be the solution).

Made more progress Today, turns out the duplicate report problem is not happening anymore! I fixed a couple of unrelated bugs and managed to re-test the chat/report creation correctly.

Now I'm investigating the Money Request flow if a user has an empty chat as that is causing the a There is a previously existing chat between these users. API error. (also investigating Tasks flow for similar reason)

PauloGasparSv commented 1 year ago

Will continue working on this tomorrow

The money request error is coming from here because, I just need to finish debugging the logic that makes the request in App to check if I have the correct reportID there to decide where to fix this in App or Auth.

PauloGasparSv commented 1 year ago

Will continue working on this tomorrow

The money request error is coming from here because, I just need to finish debugging the logic that makes the request in App to check if I have the correct reportID there to decide where to fix this in App or Auth.

I re-tested this and the issue is unrelated to my changes! The Money Request flow is also broken on main.

Now I'll test all possible chats here to see if there are any other bugs then put the P.R. for reviews

PauloGasparSv commented 1 year ago

P.R. is under review!

melvin-bot[bot] commented 1 year ago

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.