-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Send mostRecentReportActionLastModified
with ReconnectApp
#18807
Conversation
mostRecentReportActionLastModified
with ReconnectApp
mostRecentReportActionLastModified
with ReconnectApp
This reverts commit ec5a796.
@mananjadhav 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] |
Still holding on Web-E deploy, but ready for review and I will run through the testing on all platforms now. |
Oh hmm @mananjadhav this won't be ready to test until the API is updated, but we can use some help after it is. |
Yes I will. I can see some lint issues now? |
Updated |
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.
Filling up the checklist now.
🎯 @mananjadhav, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #21797. |
Reviewer Checklist
Screenshots/VideosWebweb-reconnect-app_onsikUWX.mp4Mobile Web - Chromemweb-chrome-reconnect-app_HojGqr0I.mp4Mobile Web - Safarimweb-safari-reconnect-app_2zHZbT9p.mp4Desktopdesktop-reconnect-app.movAndroidandroid-reconnect-app_YnFg50do.mp4@flodnv All yours. Took sometime to compress the video. But tests well. 🎀 👀 🎀 C+ reviewed |
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.
Thanks!
@@ -150,11 +136,9 @@ function cancelPendingRequests() { | |||
// We create a new instance because once `abort()` is called any future requests using the same controller would | |||
// automatically get rejected: https://dom.spec.whatwg.org/#abortcontroller-api-integration | |||
cancellationController = new AbortController(); | |||
cancelPendingReconnectAppRequest(); |
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.
Can you clarify why you removed this?
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.
More context here: #18807 (comment)
Lmk if you want to discuss further? I am going to cause a regression with this - but the original solution is a hack.
Updated. |
Conflicts 😞 |
/** | ||
* @returns {boolean} | ||
*/ | ||
function didUserLogInDuringSession() { |
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.
Looking at this again, would it make more sense / be better to have some other system, like "isOnyxDataEmpty"? Maybe not?
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.
It's a good question since all sorts of data could be "empty" and any could be used to signify that we have not yet called OpenApp
yet. On the one hand, it's a bit arbitrary, but on the other hand it is easy to reason about the "when" and "why" we would call OpenApp (post sign in) over ReconnectApp (all other times).
Looking whether Onyx data is entirely empty or not would present a new challenge. This gets pretty complicated, but the gist of it is that Onyx can initialize with various default states and when cleared we will reapply those default states. So, there really is no way for Onyx data to ever truly be "empty" as far as the App code is concerned.
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.
Thanks for the explanation, makes sense 👍
Conflicts fixed and retested! |
✋ 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 staging by https://github.com/flodnv in version: 1.3.37-0 🚀
|
@marcaaron We will only be able to run Web and Desktop for console verification in Staging. Can you pls check mWeb/Native Apps internally? |
@mvtglobally Of course, thanks for letting me know. I will look into it right now. |
Just going to post requestID for the testing logs as I go through the various platforms (if anyone is curious). And grabbed a before/after timing for my marc@expensifail.com account to confirm the speed improvement. iOS Safari: 7e21b64e4e15f4cc-HNL
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.37-7 🚀
|
Related to: https://github.com/Expensify/Auth/pull/7902
Details
This is the final PR that will implement fast ReconnectApp by sending the
mostRecentReportActionLastModified
.It is holding on:
All must be deployed to production before we merge this...
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/282035
Tests
OpenApp
API call is functioning normally and loads the LHN correctlyOpenApp
API call takes and check the response to see how many reports are returned inonyxData
update with a key ofreport_
.ReconnectApp
and verify that there are many less reports (really should be just one unless there are pinned reports) returned and that the request is faster thanOpenApp
Offline tests
This is covered above as there are
QA Steps
Same as tests
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)/** 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)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android