-
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
[HOLD for payment 2023-12-12] [hold for payment 2023-11-16] [$500] Chat - Skeleton placeholder flickers when opening chat with IOU in offline mode #30503
Comments
Triggered auto assignment to @joekaufmanexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~01caf37bfdd026bf43 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Chat: the top skeleton loader flickers when offline What is the root cause of that problem?The root cause is that we run into an infinite loop of App/src/pages/home/report/ReportActionsView.js Lines 151 to 165 in 7e06bd7
When the reproduction steps are met, the API call responds with the following error: {
"code": 666,
"jsonCode": 666,
"message": "No report actions returned in Auth response"
} This leads to the What changes do you think we should make in order to solve the problem?First, add the following variable: const isFetchedTillBeginning = useMemo(
() => _.last(props.reportActions).actionName === CONST.REPORT.ACTIONS.TYPE.CREATED,
[props.reportActions]
); Second, we should make the actual API call only if we are online: const loadOlderChats = () => {
// Only fetch more if we are not already fetching so that we don't initiate duplicate requests.
- if (props.isLoadingOlderReportActions) {
+ if (isOffline || props.isLoadingOlderReportActions) {
return;
}
// Don't load more chats if we're already at the beginning of the chat history
- const oldestReportAction = _.last(props.reportActions);
- if (oldestReportAction.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED) {
+ if (isFetchedTillBeginning) {
return;
}
// Retrieve the next REPORT.ACTIONS.LIMIT sized page of comments
+ const oldestReportAction = _.last(props.reportActions);
Report.getOlderActions(reportID, oldestReportAction.reportActionID);
}; Third, show the loader if either the actions are being loaded via API, or we are offline and should load the actions: return (
<>
<ReportActionsList
report={props.report}
onLayout={recordTimeToMeasureItemLayout}
sortedReportActions={props.reportActions}
mostRecentIOUReportActionID={mostRecentIOUReportActionID}
loadOlderChats={loadOlderChats}
loadNewerChats={loadNewerChats}
isLoadingInitialReportActions={props.isLoadingInitialReportActions}
- isLoadingOlderReportActions={props.isLoadingOlderReportActions}
+ isLoadingOlderReportActions={props.isLoadingOlderReportActions || isOffline && !isFetchedTillBeginning}
isLoadingNewerReportActions={props.isLoadingNewerReportActions}
policy={props.policy}
/>
<PopoverReactionList ref={reactionListRef} />
</>
); What alternative solutions did you explore? (Optional) |
@paultsimura do you have any explanation on why this issue is not happening on web but only on native? |
@getusha this happens on the Web as well, it's just more difficult to catch:
You need to make the screen on the web really short, so the Screen.Recording.2023-10-27.at.17.17.09.movAlso, I've updated my proposal with some extra details. |
Thanks @paultsimura! tried applying your solution seems like i have an outdated branch, could you please your branch so i can test it? |
Proposal from @paultsimura works well and looks good to me. |
Triggered auto assignment to @aldo-expensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Pending internal engineering sign off |
I've recently seen a PR pending a review from @aldo-expensify for a month already. Just wanted to confirm he's not OOO at the moment |
I was OOO for 3 weeks, but I just came back today. I'm catching up with pending stuff, I'll try to review the PR today |
TY! |
Thank you @aldo-expensify, would appreciate if you could give a look on this issue as well — it's waiting for your assignment 🙏🏼 |
Thanks for pinging me again, I thought that the linked PR was all there was left to do hahaha |
📣 @getusha 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
PR is out on production. Not sure why the automation didn't work. Payment is due (assuming no regressions) on 2023-11-16 |
Looks like a regression came up here, @paultsimura / @getusha could you take a look? |
Resolving regression in the above thread |
Same |
PR fixing regression is out on staging. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.7-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-12-12. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@getusha could you please complete the BZ checklist so we can issue payment tomorrow? |
Bumped in Slack |
BugZero Checklist:
|
Great, TY! BZ checklist is complete. All set to issue payment. |
We need to make the following payments here:
|
@paultsimura $250 sent and contract ended! |
@getusha $250 sent and contract ended! |
All set. TY everyone! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Issue found when executing: PR #29643
Version Number: v1.3.92-0
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
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation: @
Action Performed:
Precondition:
Expected Result:
Skeleton placeholder should not flicker.
Actual Result:
Skeleton placeholder flickers.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Bug6253007_1698395284540.Screen_Recording_20231027_094427_New_Expensify.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: