Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$250] Chat - New message button is not responsive when marking expense as unread #42144

Closed
2 of 6 tasks
izarutskaya opened this issue May 14, 2024 · 29 comments
Closed
2 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@izarutskaya
Copy link

izarutskaya commented May 14, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.73-1
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to an empty chat.
  3. Submit an expense.
  4. Send enough messages so that the page is scrollable. Send many many messages.
  5. Long press on the expense preview in Step 1 .
  6. Tap Mark as unread
  7. Do not scroll down the chat
  8. Scroll up until New message button appears.
  9. Tap New message button.

Expected Result:

Chat will scroll down.

Actual Result:

New message button is not responsive and chat does not scroll down.

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

Bug6480166_1715656021016.RPReplay_Final1715655998.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f043b0188c500d20
  • Upwork Job ID: 1791011091276996608
  • Last Price Increase: 2024-06-07
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 14, 2024
Copy link

melvin-bot bot commented May 14, 2024

Triggered auto assignment to @Christinadobrzyn (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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #vip-vsb.

@Christinadobrzyn
Copy link
Contributor

This is a little hard to reproduce consistently but I can get it on the iOS and Android app if you don't scroll down on step 6.

I'm not sure if this can be external but we'll start there.

@Christinadobrzyn Christinadobrzyn added the External Added to denote the issue can be worked on by a contributor label May 16, 2024
@melvin-bot melvin-bot bot changed the title Chat - New message button is not responsive when marking expense as unread [$250] Chat - New message button is not responsive when marking expense as unread May 16, 2024
Copy link

melvin-bot bot commented May 16, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01f043b0188c500d20

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 16, 2024
Copy link

melvin-bot bot commented May 16, 2024

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

@nkdengineer
Copy link
Contributor

Proposal

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

New message button is not responsive and chat does not scroll down.

What is the root cause of that problem?

When we add a comment, lastVisibleActionCreated of the report and created of the optimistic action are not sync because both of them are DateUtils.getDBTimeWithSkew() at the different times

const currentTime = DateUtils.getDBTimeWithSkew();
const lastComment = lastAction?.message?.[0];
const lastCommentText = ReportUtils.formatReportLastMessageText(lastComment?.text ?? '');
const optimisticReport: Partial<Report> = {
lastVisibleActionCreated: currentTime,

That makes hasNewestReportAction is false and then New message doesn't not scroll to bottom when click on it.

const hasNewestReportAction = sortedVisibleReportActions?.[0]?.created === report.lastVisibleActionCreated;

if (!hasNewestReportAction) {

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

In here we should update lastVisibleActionCreated as lastAction.created instead of getting current time again. We should do the same when we add other actions like IOU, task, ...

lastVisibleActionCreated: currentTime,

What alternative solutions did you explore? (Optional)

NA

@Christinadobrzyn
Copy link
Contributor

@hungvu193 can you review the proposal when you have a moment? TY!

@hungvu193
Copy link
Contributor

@hungvu193 can you review the proposal when you have a moment? TY!

Yeah sure.

@tsa321
Copy link
Contributor

tsa321 commented May 19, 2024

Proposal

cross posting my proposal from other issue, because have similar Root cause:
proposal 1 & Proposal 2

@hungvu193
Copy link
Contributor

Thanks for cross posting here @tsa321.

@Christinadobrzyn Please put this one hold for #41188
I saw that issue was already assigned by agency engineer.

@Christinadobrzyn Christinadobrzyn changed the title [$250] Chat - New message button is not responsive when marking expense as unread [HOLD for #41188] [$250] Chat - New message button is not responsive when marking expense as unread May 20, 2024
@Christinadobrzyn Christinadobrzyn removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 20, 2024
@Christinadobrzyn
Copy link
Contributor

yes! Good call @hungvu193 and @tsa321 - added a hold to the subject. We'll watch #41188

@Christinadobrzyn Christinadobrzyn added Weekly KSv2 and removed Daily KSv2 labels May 21, 2024
@Christinadobrzyn
Copy link
Contributor

monitoring - #41188

moving to weekly while #41188 is worked on

@Christinadobrzyn
Copy link
Contributor

monitoring - #41188

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Jun 5, 2024

#41188 is deployed - let's test this again.

RPReplay_Final1717573431.MP4

@melvin-bot melvin-bot bot added the Overdue label Jun 5, 2024
@Christinadobrzyn Christinadobrzyn added Daily KSv2 and removed Weekly KSv2 labels Jun 5, 2024
@melvin-bot melvin-bot bot removed the Overdue label Jun 5, 2024
@Christinadobrzyn
Copy link
Contributor

This seems to be fixed - I can't reproduce based on the steps in the OP. Asking QA to test - https://expensify.slack.com/archives/C9YU7BX5M/p1717573508069289

@kbecciv
Copy link

kbecciv commented Jun 6, 2024

Issue is still reproducible on iPhone 15 pro max -iOS 17.5.1

Video.de.WhatsApp.2024-06-05.a.las.10.20.53_dca53069.1.mp4

@Christinadobrzyn Christinadobrzyn changed the title [HOLD for #41188] [$250] Chat - New message button is not responsive when marking expense as unread [$250] Chat - New message button is not responsive when marking expense as unread Jun 7, 2024
@Christinadobrzyn Christinadobrzyn added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 7, 2024
@Christinadobrzyn
Copy link
Contributor

Ah okay I was able to reproduce this by creating an insanely long chat thread - we'll keep this open. Adding Help Wanted

Copy link

melvin-bot bot commented Jun 7, 2024

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

@Christinadobrzyn
Copy link
Contributor

@hungvu193, can you continue reviewing the proposals? Thank you!

@hungvu193
Copy link
Contributor

Sure thing. I'll review it later today

@hungvu193
Copy link
Contributor

Latest main seems working fine. Can you still reproduce this one? @izarutskaya

Screen.Recording.2024-06-11.at.14.41.44.mov

@nkdengineer
Copy link
Contributor

I think it's fixed with my PR here #43021.

@hungvu193
Copy link
Contributor

Cool. We can re-verify this issue once #43021 is merged.

@nkdengineer
Copy link
Contributor

nkdengineer commented Jun 11, 2024

It was merged.

@hungvu193
Copy link
Contributor

My bad, seems it was also deployed to staging yesterday.
Please test again @izarutskaya, I think we can close this one.

Copy link

melvin-bot bot commented Jun 11, 2024

@hungvu193 @Christinadobrzyn this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@Christinadobrzyn
Copy link
Contributor

I'll ask QA to test again https://expensify.slack.com/archives/C9YU7BX5M/p1718156164448579

@isagoico
Copy link

Issue not reproducible on Staging build v1.4.82-0

RPReplay_Final1718180099.MP4

@Christinadobrzyn
Copy link
Contributor

QA confirmed it's not reproducible! closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
No open projects
Archived in project
Development

No branches or pull requests

7 participants