-
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
Sort reportActions by created instead of sequenceNumber #12626
Conversation
…ctionsByCreated # Conflicts: # src/libs/ReportActionsUtils.js
# Conflicts: # src/libs/ReportActionsUtils.js # src/pages/home/report/ReportActionsList.js
@sobitneupane @danieldoglas One of you needs to 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] |
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.
@sobitneupane any chance you can provide more details for those chats? Maybe their Onyx data? |
I can see a lot of "(edited)" message out of nowhere. But could not reproduce the issue where report welcome message appears in the middle. Screen.Recording.2022-11-24.at.00.18.30.mov |
If that is the case we are fine. I can help with the testing tomorrow morning if you wont get to ti, also @sobitneupane if you would be able to get to all platforms |
I will test it today. |
Brought up the bug in slack here. We can either put this on HOLD or merge and fix it in a follow up. I'd prefer to merge and fix in a follow-up |
I was able to reproduce the shuffling issue online as well. Screen.Recording.2022-12-01.at.11.54.59.mov |
On android, message sent offline, appear twice. I noticed similar behavior in mWeb/chrome as well. I was able to reproduce this on IOS as well. Screen.Recording.2022-12-01.at.11.43.14.mov |
Screenshots/VideosWebUntitled.movMobile Web - ChromeScreen.Recording.2022-12-01.at.12.12.57.movMobile Web - SafariUntitled.mp4DesktopScreen.Recording.2022-12-01.at.11.37.42.moviOSRPReplay_Final1669877515.mp4AndroidScreen.Recording.2022-12-01.at.11.43.14.mov |
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.
I have also experiences the reshuffling while being online which is odd
this is just picture but the order of messages sent was 1, 2, 3, 4, 5 as you would expect.
I agree in the slack thread that if this is only in Offline we can do nothing for now, the end state is fine, but this should not happen when being online.
My reproduction steps have been simple, create a new chat and sent the messages in order and then it started to reshuffle, in the end it settles to the correct order but it is not great UX
Not sure what is going on but getting this behaviour, things are just really slow but it might be my VM, however, it also could be something else since Sobit experiences the same issue and he points to staging/prod. |
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.
Alright, I have confirmed this exact behaviour is on staging/production as well 😬 try to type and send messages in quick succession and you will see they will shuffle and in general the requests wait for server response for a long time.
I feel like this must be something we probably already have reported somewhere but I will report in Slack just in case.
I have checked on the remaining boxes in checklist and I am approving as the issues I have found and Sobit found are on main and staging too so it is not related to this PR.
@roryabraham @cead22 Any reason why not to merge this?
The failing jobs are internal builds for testing because Rory is a mobile deployer, otherwise everything else is passing so we can merge this. |
Discussed with @AndrewGable to understand this better, and I agree |
@cead22 looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
As stated above, the builds that are failing are because of a bug that we're currently working to fix |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by @francoisl in version: 1.2.36-4 🚀
|
Created issue here @sobitneupane #13814 |
Details
Start sorting reportActions by their
created
timestamp, falling back onactionname
/ type as a secondary comparator in the event of same-millisecond reportActions, and finally falling back onreportActionID
as a last comparator in the event of same-millisecond reportActions AND sameactionname
.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/240894
Tests / QA Steps
PR Author Checklist
I linked the correct issue in the
### Fixed Issues
section aboveI wrote clear testing steps that cover the changes made in this PR
Tests
sectionOffline steps
sectionQA steps
sectionI included screenshots or videos for tests on all platforms
I ran the tests on all platforms & verified they passed on:
I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
I followed proper code patterns (see Reviewing the code)
toggleReport
and notonIconClick
)src/languages/*
filesWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedIf a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
I followed the guidelines as stated in the Review Guidelines
I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like
Avatar
, I verified the components usingAvatar
are working as expected)I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
I verified that if a function's arguments changed that all usages have also been updated correctly
If a new component is created I verified that:
/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)If a new CSS style is added I verified that:
StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like
Avatar
is modified, I verified thatAvatar
is working as expected in all cases)If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.
PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesWaiting 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
have been tested & I retested again)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Screenshots
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android