-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Due for payment 2025-05-22] [$125] Do not create optimistic transaction thread report on RequestMoney #58828
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
Comments
Re-posting updates for today: |
Today, during testing, I have found some issues related to not creating optimistic transaction threads. Example, of side effects:
bug_example1.mp4I'll need to look through every case in the app where it checks for one-transaction-thread and think about the alternative, maybe checking for transactions on its own. |
Another thing is offline behavior. When I test my updates over the PR that creates a transaction thread when needed , in the offline opening, the transaction thread gives endless loading. offline_example2.mp4 |
The OpenApp will definitely not return all the transactions for you, it probably should not return any once we have all the violations migrated to Auth. OpenReport will load those you need for the report. |
Okay, that means the app doesn't have information about report transactions before the report is opened. Right now, the app uses transaction threads to identify the number of transactions in the report and what logic to apply. For example, 3 weeks ago some updates were merged, they includes checking for one-transaction-tread reports from the LHN level. |
No.
I don't think I am following, I see that |
I mean since we won't create transaction threads right away, all of the checks that use |
Maybe we can assume that if there are no actions is because we will optimistically create the transaction thread? |
Okay, it seems like I was able to fix the one-thread-transactions checks just by suppressing the action.childReportID checks inside @iwiznia What about the offline flow expected behaviour? What should users see if they are offline -> create expense -> try to open a transaction thread? |
They should see the correct page, same as if they were online (but greyed out like in your video) |
Hm, so should I generate it optimistically? User didn't open it before online, so it wasn't generated on the BE. |
Yeah, it should be created optimistically when the user opens the report and ensure we pass the correct parameters when the API call is done so that the backend creates it. I think some of that is already being done in #58097 so we can probably reuse some of that code. |
Got it! just to confirm, does the |
Yeah, I think we are using the same mechanism as thread creation, so the BE will handle duplicate reports as long as you pass the same |
Also, to be considered, in the linked PR I didn't create the offline state, currently it will just keep in a loading state until you go online, so if we could create the optimistic state here it would be great |
Updates:
Yep, I can handle it in the PR I'm working on! I have already stashed the necessary updates! @rlinoz Just one thing I have noticed. Your PR doesn't handle the case when there is only one expense in the 1-1 chat, so when a user taps For the next steps (final PR polishing and preparing for the review), we need to wait till #58097 is merged! |
Ah yes, I am mainly fixing the cases for the selfDM, thanks for covering it! |
Note: I'll be OOO 1-5th of May 🌴 |
Triggered auto assignment to @abekkala ( |
I will be OOO from May 5 - 16, so I have added another BZ member to watch over the issue while I'm out. Notes: This was completed, but there was a regression, so I halved the price, and we are waiting for a follow-up PR. |
@VickyStash Can you catch me up on this issue status? Thanks! |
The follow-up is up (#60292). I'm still working on it |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
Hi, coming from [$250] Expense - Expense report does not show transaction details and it only shows the total which was also regression from the reverted PR. |
UPD: I've started to prepare a new PR with fixes! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.45-21 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 2025-05-22. 🎊 For reference, here are some details about the assignees on this issue:
|
@hungvu193 @sakluger / @abekkala @hungvu193 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
The issue shouldn't be closed as the PR was reverted! cc @iwiznia |
UPD: I needed to switch to another issue today, I'm going to focus on this one on Monday! |
Related to https://github.com/Expensify/Expensify/issues/433103
Conversation https://expensify.slack.com/archives/C08CZDJFJ77/p1742395185178209
The main goal of the project is to stop creating the transaction thread reports optimistically and instead have those be created when they are needed.
I have already deployed the PRs in the backend that make it so that we do not create the report in RequestMoney api request if we don't pass a transactionThreadReport and have this draft PR #58523 that stops sending it.
Issue Owner
Current Issue Owner: @sakluger / @abekkalaThe text was updated successfully, but these errors were encountered: