Repository navigation
[HOLD for payment 2024-04-15] IOU - Skeleton IOU preview appears in IOU details page when there is one request #39403
Description
Activity
- addedDeployBlockerCashThis issue or pull request should block deploymentThis issue or pull request should block deployment
on Apr 2, 2024 Triggered auto assignment to @puneetlath (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.We think that this bug might be related to #wave-collect - Release 1
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
- Identify the pull request that introduced this issue and revert it.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The empty skeleton report action is added for a one-transaction IOU Report view.
What is the root cause of that problem?
This was caused by #36934 which introduced the one-transaction view.
The reason is that we filter out the IOU Report Action from the list if it's a single-transaction report.But later here, we build an optimistic report preview action (the skeleton one) if the amount of filtered transactions is less than
reportPreviewAction?.childMoneyRequestCount:App/src/pages/home/report/ReportActionsView.tsx
Lines 503 to 521 in 1aac6e0
if (report.total && moneyRequestActions.length < (reportPreviewAction?.childMoneyRequestCount ?? 0)) { const optimisticIOUAction = ReportUtils.buildOptimisticIOUReportAction( CONST.IOU.REPORT_ACTION_TYPE.CREATE, 0, CONST.CURRENCY.USD, '', [], NumberUtils.rand64(), undefined, report.reportID, false, false, {}, false, DateUtils.subtractMillisecondsFromDateTime(actions[actions.length - 1].created, 1), ) as OnyxTypes.ReportAction; moneyRequestActions.push(optimisticIOUAction); actions.splice(actions.length - 1, 0, optimisticIOUAction); } What changes do you think we should make in order to solve the problem?
We need to count for the special one-transaction case now, and change the condition to:
if (report.total && !isOneTransactionView && moneyRequestActions.length < (reportPreviewAction?.childMoneyRequestCount ?? 0)) { ...
Where the
isOneTransactionViewmight bereportPreviewAction?.childMoneyRequestCount === 1(need to verify this deeper into the original PR).What alternative solutions did you explore? (Optional)
Oh, yep - definitely introduced by #36934. We should be using
combinedReportActionsthere and also if we've passed atransactionThreadReportwe know that the report is a one-transaction report and should skip the optimistic preview.@puneetlath I'll spin up a PR to handle the couple blockers that #36934 introduced, so i can take this over if you'd like
⚠️ Looks like this issue was linked to a Deploy Blocker hereIf 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.
⚠️ Looks like this issue was linked to a Deploy Blocker hereIf 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.
No skeleton on staging 🎊
Screen.Recording.2024-04-02.at.15.13.01.mov
- addedWeeklyKSv2KSv2Awaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to productionand removedWeeklyKSv2KSv2
on Apr 8, 2024 - changed the title
[-]IOU - Skeleton IOU preview appears in IOU details page when there is one request[/-][+][HOLD for payment 2024-04-15] IOU - Skeleton IOU preview appears in IOU details page when there is one request[/+]on Apr 8, 2024 Reviewinglabel has been removed, please complete the "BugZero Checklist".The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 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 2024-04-15. 🎊
- removedDeployBlockerCashThis issue or pull request should block deploymentThis issue or pull request should block deployment
on Apr 11, 2025
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.59-0
Reproducible in staging?: y
Reproducible in production?: n
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
There will no be preview in transaction thread.
Actual Result:
A skeleton preview is shown in transaction thread.
Workaround:
n/a
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6435479_1712058056237.IOU.mp4
View all open jobs on GitHub