-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Chat - Green line is not present correctly on the first unread system message #37082
Conversation
@eVoloshchak Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
@ikevin127, I tested this yesterday and it wasn't working properly sometimes, but there seemed to be some problems with the BE, which I thought were the cause. But it seems like this does work incorrectly for some cases, I've been able to reliably reproduce one of them
Screen.Recording.2024-02-28.at.16.29.48.mov |
@eVoloshchak Looking into it, will let you know the outcome soon! |
@eVoloshchak I did some digging and I realized that my initial RCA / solution was wrong. Turns out the root cause is different, good thing we caught it here and nothing really changes from the PR description in terms of testing steps. I tested extensively and all scenarios pass now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ikevin127, this is looking good!
Tests good using these steps, but there's still a small bug:
- User A request money from User B
- User B open chat with user A
- User B open the money request, navigate back (this step is the key to reproducing this bug, it isn't present is you don't visit the newly created money report)
- User A edit the description and the amount
- User B open the detail IOU page
- Green indicator is above "changed amount" message, where it should be above "changed description"
Screen.Recording.2024-03-04.at.14.49.02.mov
@eVoloshchak Will look into it today or tomorrow and get back to you, thanks! |
@eVoloshchak I looked into it and I was able to reproduce your scenario about 3 times in 40+ attempts (really hard to reproduce since it's based on how fast you perform the actions one right after the other, at a specific interval). What happens behind the scene when the line appears above the amount instead of description (this only happens when description and amount are changed really fast one right after the other at a specific interval), we correctly compare Here’s a screenshot where the amount action change is performed after the description just like in your steps, at the very bottom that date is the lastReadTime of the report, as you can see the description date is before the lastReadTime which in that specific edge case makes the amount action only be new and unread. Not exactly sure how or why this happens (the description action created date being before the report.lastReadTime), but I merged w/ main and was not able to reproduce your scenario anymore, tried a bunch and it seems to work 100% for me right now. Please give it a try and hopefully we can move forward with the merge! Otherwise I'm out of ideas as to how to tackle this edge case scenario as to me it seems BE (pusher event) related, and I don't think we should hold this issue for that specific edge case if it's still going to be reproducible after this merge w/ main. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ikevin127, testing this right now and seems like something has changed, I'm getting invalid results 100% times, no matter if I edit the description or any other fields
I'm testing this by cherry-picking this PR to the latest main, but there aren't any changes compared to this branch
Screen.Recording.2024-03-12.at.20.48.38.mov
Could you merge the latest main and double check if the issue is present for you?
@eVoloshchak After thorough testing I came to the conclusion that none of my proposed solutions work in actually fixing the issue, also I was not able to find any other solution to fix the issue. I think the PR can be closed at this point and the issue should get back to looking for other proposals. The context here can be used by other Contributors which would like to take on the issue. |
Details
Chat - Green line is not present correctly on the first unread system message. This PR makes sure we always show the new unread message marker above the first unread report action.
In addition we make sure to maintain the manual Mark as unread functionality added by PR #29314 which sets the new unread message marker accordingly.
For this I added the testing steps below (6-11) and also demonstrated in the below videos on all platforms.
Fixed Issues
$ #36399
PROPOSAL: #36399 (comment)
Tests
Current issue steps:
Additional steps covering #29314 case:
Offline tests
TLDR: Same as Tests.
Current issue steps:
Additional steps covering #29314 case:
QA Steps
TLDR: Same as Tests.
Current issue steps:
Additional steps covering #29314 case:
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android-native.mp4
Android: mWeb Chrome
android-mweb.mp4
iOS: Native
ios-native.MP4
iOS: mWeb Safari
ios-mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4