App
App copied to clipboard
After editing split expense amount weird flash and reloads at the top
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.67-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: @roryabraham Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1714161321481359
Action Performed:
- Create a group
- Scan a receipt to split a bill in the group which has full screen of chat messages
- Manually set the amount on the bill split
Expected Result:
The amount should update, and nothing else should happen.
Actual Result:
The amount updates, then the report "flashes" and reloads at the top, then scrolls down to the bottom, without you touching anything.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android: Native
- [ ] Android: mWeb Chrome
- [x] iOS: Native
- [ ] iOS: mWeb Safari
- [ ] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/38435837/82bec8e2-0c90-42c9-9b47-4b398a09bc7f
Triggered auto assignment to @laurenreidexpensify (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.
Job added to Upwork: https://www.upwork.com/jobs/~0174f92c2a5d39efca
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eh2077 (External
)
Posted on slack to attract proposals
Not overdue, still waiting for proposals
Proposal
Please re-state the problem that we are trying to solve in this issue.
After editing split expense amount weird flash and reloads at the top
What is the root cause of that problem?
As shown in the attachment, the CompleteSplitBill returns data where the most recent previousReportActionID is 0. However, in the local data, this ID corresponds to the number of the previous order. This discrepancy causes the reportActions to refresh when the network response is received, leading to a page refresh.
As shown in the first code snippet, by adding debugging code on line 794, you will notice that the previousReportActionID changes from an initial value to 0 and then reverts back to the original value. The debugging line of code would look like this:
console.log(
'ReportScreen',
prevProps.sortedAllReportActions[0].previousReportActionID, nextProps.sortedAllReportActions[0].previousReportActionID);
https://github.com/Expensify/App/blob/ab1e924bf0d4f928a9006f5bdd6b9da60346b1df/src/pages/home/ReportScreen.tsx#L787-L815
Due to the changes in previousReportActionID, line 268 of the ReportActionsUtils.getContinuousReportActionChain function returns different values, causing changes in reportActions and subsequently triggering a redraw of the screen.
https://github.com/Expensify/App/blob/ab1e924bf0d4f928a9006f5bdd6b9da60346b1df/src/pages/home/ReportScreen.tsx#L264-L269
condition in Line 317
https://github.com/Expensify/App/blob/ab1e924bf0d4f928a9006f5bdd6b9da60346b1df/src/libs/ReportActionsUtils.ts#L290-L344
What changes do you think we should make in order to solve the problem?
Fix Backend return the expect value
What alternative solutions did you explore? (Optional)
Or add condition in ReportActionsUtils.ts#L317 except previousReportActionID equal 0
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@charles-liang Thanks for your proposal. Your RCA is correct and I agreed with you this issue should be fixed by the backend.
StartSplitBill
returns the correct previousReportActionID
While
CompleteSplitBill
returns wrong previousReportActionID
.
πππ C+ reviewed
Current assignee @roryabraham is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
ok, I keep seeing a number of issues with incorrect previousReportActionID
generated in the back-end
Current assignee @eh2077 is eligible for the Internal assigner, not assigning anyone new.
@roryabraham @laurenreidexpensify @eh2077 this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
I think @roryabraham will take care of this from the backend. Once the backend fix is done, we can retest it to determine if it's good to close the issue.
@roryabraham can you confirm if you're going to be working on this or if it needs a hot pick label?
I'm still working on this, though it won't necessarily be back-end. I'm writing up a thorough P/S in this doc
Requested retest: https://expensify.slack.com/archives/C9YU7BX5M/p1715988615903839
Bug is still able to reproduce.
https://github.com/Expensify/App/assets/43996225/6b0da52e-bf4a-458b-a4eb-6504d7c5dc77
@roryabraham moved the status of this bug to in progress since you are working on it. since the priority is high, i am gonna make this a daily!
I spent prettymuch the whole day working on this problem over here, lots and lots of context in there π
Going to put this on HOLD for https://github.com/Expensify/App/issues/41254 the sake of consolidation. This has been my top priority, and we've been actively working on it as you can see in the slack thread. But I have like 4 different GitHub issues under the same βοΈ and they haven't all been getting the same love
still "on HOLD", still prettymuch my top priority (along with all other issues in the same βοΈ)
Issue not reproducible during KI retests. (First week)
HOLDing, we have recent activity in https://github.com/Expensify/App/pull/41962
Current assignee @laurenreidexpensify is eligible for the Bug assigner, not assigning anyone new.
Triggered auto assignment to @sonialiap (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.
@sonialiap another parental leave one - there is no action on this required this week, it's on hold and @roryabraham is working on it. Thanks!
This issue has not been updated in over 15 days. @sonialiap, @roryabraham, @eh2077 eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
I'm OOO Aug 19-30, but this is monthly so not adding a BZ leave buddy
@sonialiap, @roryabraham, @eh2077, this Monthly task hasn't been acted upon in 6 weeks; closing.
If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.