You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-12-25] [$250] Hybrid - Red dot is displayed on report preview after dismissed the error messages #76522
Version Number: v9.2.67-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#75831 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: iPhone 16 pro/26.1 App Component: Money Requests
Action Performed:
Precondition: Owner creates a workspace and invite member and approver
Open app
Employee submits expense in workspace chat
Employee goes offline
Approver at other device approves the expense
Employee retract and delete the expense
Employee goes back online
Employee taps on the expense
Employee taps on X button of error message
Employee scroll down to the end and tap on X button of error message
Employee tap back button for return to report preview
Please re-state the problem that we are trying to solve in this issue.
When an employee deletes an expense that was approved while they were offline, and then dismisses the error messages that appear, a red dot indicator still remains on the report preview even though all visible errors have been dismissed.
What is the root cause of that problem?
The root cause is in the error dismissal logic in PureReportActionItem.tsx. When errors are dismissed via the X button, the dismissError function only clears:
However, it does not clear errors from the report's errorFields property.
The red dot indicator is determined by the shouldShowRedBrickRoad function, which uses getAllReportErrors to check for errors. The getAllReportErrors function combines errors from two sources:
report.errorFields - Report-level errors stored directly on the report object
reportAction.errors - Errors stored on individual report actions
When an expense is deleted offline and then synced online, conflicts can occur (e.g., the expense was approved while offline, then deleted). These conflicts can result in errors being stored in report.errorFields in addition to reportAction.errors.
When the user dismisses errors by clicking the X button, only the reportAction.errors are cleared, but report.errorFields remain. Since getAllReportErrors still finds errors in report.errorFields, the red dot indicator continues to be displayed even though the user has dismissed all visible error messages.
Errors stored in both reportAction.errors AND report.errorFields
User dismisses errors → only reportAction.errors cleared
report.errorFields still contains errors
getAllReportErrors finds errors in report.errorFields
shouldShowRedBrickRoad returns true → red dot displayed
What changes do you think we should make in order to solve the problem?
Update the dismissError function in App/src/pages/home/report/PureReportActionItem.tsx to also clear report-level errorFields when dismissing errors.
Specific changes:
Import necessary dependencies: Ensure Onyx, ONYXKEYS, and isEmptyObject are available in the file.
Update dismissError callback: After clearing transaction and report action errors, also check if the report has any errorFields and clear them:
constdismissError=useCallback(()=>{consttransactionID=isMoneyRequestAction(action) ? getOriginalMessage(action)?.IOUTransactionID : undefined;if(transactionID){clearError(transactionID);}clearAllRelatedReportActionErrors(reportID,action);// Also clear any report-level errorFields that might be related to this expense// This is needed when expenses are deleted offline and synced online, as errors// can be stored in report.errorFields in addition to reportAction.errorsif(report?.errorFields&&!isEmptyObject(report.errorFields)){constreportErrorFieldsToClear: Record<string,null>={};Object.keys(report.errorFields).forEach((key)=>{reportErrorFieldsToClear[key]=null;});Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`,{errorFields: reportErrorFieldsToClear,});}},[reportID,report,clearError,clearAllRelatedReportActionErrors,action]);
This ensures that when errors are dismissed, both report action errors AND report-level errorFields are cleared, which will remove the red dot indicator.
Why this approach:
It addresses the root cause by clearing all error sources
It's consistent with how errors are cleared elsewhere in the codebase (using null values in merge operations)
It's minimal and focused - only adds the missing error clearing logic
It doesn't affect other functionality since it only runs when errors are explicitly dismissed
What alternative solutions did you explore? (Optional)
Alternative 1: Clear errorFields in clearAllRelatedReportActionErrors
We could modify clearAllRelatedReportActionErrors to also clear report errorFields, but this would be too broad and might clear errors that shouldn't be cleared in other contexts. The dismissal action should be explicit about what it's clearing.
Alternative 2: Filter out errorFields in getAllReportErrors for deleted expenses
We could modify getAllReportErrors to ignore certain errorFields when an expense is deleted, but this would be a workaround that doesn't address the root cause. The errors should be properly cleared when dismissed, not just hidden.
Alternative 3: Clear errorFields when expense is deleted
We could clear errorFields in the delete expense logic, but this doesn't address the case where errors appear after deletion (during sync conflicts) and need to be dismissed by the user.
Please re-state the problem that we are trying to solve in this issue.
Red dot is displayed on report preview after dismissed the error messages
What is the root cause of that problem?
Currently getAllReportActionsErrorsAndReportActionThatRequiresAttention function iterates through all report actions to check for errors, filtering out only those that are deleted (!isDeletedAction(action)). It does not filter out retracted actions.
In a scenario "retract and delete", the action transitions to a RETRACTED state. But because the code doesn't explicitly exclude retracted actions, we still checks them for errors. If that retracted action retains any error data (which happens during the offline sync process), the function returns it as an "action requiring attention," causing the RBR (red dot) to persist on the report preview.
What changes do you think we should make in order to solve the problem?
we should explicitly adds !isRetractedAction(action) to the filter, to ensures that any RETRACTED action ignored during the error calculation, preventing it from triggering the red dot. This aligns the behavior of retracted actions with deleted actions, which is the correct expected behavior for this feature.
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-]Hybrid - Red dot is displayed on report preview after dismissed the error messages[/-][+][$250] Hybrid - Red dot is displayed on report preview after dismissed the error messages[/+]on Dec 2, 2025
Please re-state the problem that we are trying to solve in this issue.
Red dot is displayed on the report preview
What is the root cause of that problem?
When an employee submits an expense --> goes offline --> approver (on another device) approves the expense --> employee (offline) retracts and deletes the expense --> employee goes back online --> Sync conflicts occur, and errors get attached to report actions. When the user clears errors by tapping the X button, the errors on the retracted action may persist, causing the red brick road (RBR) indicator to continue showing.
What changes do you think we should make in order to solve the problem?
We should clear all report action errors when retraction succeeds
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
⚠️@lorretheboy Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
What alternative solutions did you explore? (Optional)
To prevent the action error from being cleared unexpectedly a second time, we can create clearedReportActionIDs param and check it before clearing the error
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.81-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@abzokhattab@twisterdotcom 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]
I am not around over Christmas. Please complete the checklist @abzokhattab but if anybody desperately needs this payout before Jan 5 when I return, please reassign the Bug label or ask in Slack.
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: NA
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to comment: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
@trjExpensify - as I, @twisterdotcom am already assigned to this issue as BZ, could you also check this box to confirm the Payment Summary above. Note that no single individual can both confirm the payment amounts and approve the payment itself due to SOX.
Activity
melvin-bot commentedon Dec 2, 2025
Triggered auto assignment to @twisterdotcom (
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.abbasifaizan70 commentedon Dec 2, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When an employee deletes an expense that was approved while they were offline, and then dismisses the error messages that appear, a red dot indicator still remains on the report preview even though all visible errors have been dismissed.
What is the root cause of that problem?
The root cause is in the error dismissal logic in
PureReportActionItem.tsx. When errors are dismissed via the X button, thedismissErrorfunction only clears:clearError(transactionID))clearAllRelatedReportActionErrors)However, it does not clear errors from the report's
errorFieldsproperty.The red dot indicator is determined by the
shouldShowRedBrickRoadfunction, which usesgetAllReportErrorsto check for errors. ThegetAllReportErrorsfunction combines errors from two sources:report.errorFields- Report-level errors stored directly on the report objectreportAction.errors- Errors stored on individual report actionsWhen an expense is deleted offline and then synced online, conflicts can occur (e.g., the expense was approved while offline, then deleted). These conflicts can result in errors being stored in
report.errorFieldsin addition toreportAction.errors.When the user dismisses errors by clicking the X button, only the
reportAction.errorsare cleared, butreport.errorFieldsremain. SincegetAllReportErrorsstill finds errors inreport.errorFields, the red dot indicator continues to be displayed even though the user has dismissed all visible error messages.Root Cause Chain:
reportAction.errorsANDreport.errorFieldsreportAction.errorsclearedreport.errorFieldsstill contains errorsgetAllReportErrorsfinds errors inreport.errorFieldsshouldShowRedBrickRoadreturns true → red dot displayedWhat changes do you think we should make in order to solve the problem?
Update the
dismissErrorfunction inApp/src/pages/home/report/PureReportActionItem.tsxto also clear report-levelerrorFieldswhen dismissing errors.Specific changes:
Import necessary dependencies: Ensure
Onyx,ONYXKEYS, andisEmptyObjectare available in the file.Update
dismissErrorcallback: After clearing transaction and report action errors, also check if the report has anyerrorFieldsand clear them:This ensures that when errors are dismissed, both report action errors AND report-level errorFields are cleared, which will remove the red dot indicator.
Why this approach:
nullvalues in merge operations)What alternative solutions did you explore? (Optional)
Alternative 1: Clear errorFields in
clearAllRelatedReportActionErrorsWe could modify
clearAllRelatedReportActionErrorsto also clear report errorFields, but this would be too broad and might clear errors that shouldn't be cleared in other contexts. The dismissal action should be explicit about what it's clearing.Alternative 2: Filter out errorFields in
getAllReportErrorsfor deleted expensesWe could modify
getAllReportErrorsto ignore certain errorFields when an expense is deleted, but this would be a workaround that doesn't address the root cause. The errors should be properly cleared when dismissed, not just hidden.Alternative 3: Clear errorFields when expense is deleted
We could clear errorFields in the delete expense logic, but this doesn't address the case where errors appear after deletion (during sync conflicts) and need to be dismissed by the user.
samranahm commentedon Dec 2, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Red dot is displayed on report preview after dismissed the error messages
What is the root cause of that problem?
Currently
getAllReportActionsErrorsAndReportActionThatRequiresAttentionfunction iterates through all report actions to check for errors, filtering out only those that are deleted (!isDeletedAction(action)). It does not filter out retracted actions.App/src/libs/ReportUtils.ts
Line 9233 in cb1fbb1
In a scenario "retract and delete", the action transitions to a RETRACTED state. But because the code doesn't explicitly exclude retracted actions, we still checks them for errors. If that retracted action retains any error data (which happens during the offline sync process), the function returns it as an "action requiring attention," causing the RBR (red dot) to persist on the report preview.
What changes do you think we should make in order to solve the problem?
we should explicitly adds
!isRetractedAction(action)to the filter, to ensures that any RETRACTED action ignored during the error calculation, preventing it from triggering the red dot. This aligns the behavior of retracted actions with deleted actions, which is the correct expected behavior for this feature.here
App/src/libs/ReportUtils.ts
Line 9233 in cb1fbb1
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
[-]Hybrid - Red dot is displayed on report preview after dismissed the error messages[/-][+][$250] Hybrid - Red dot is displayed on report preview after dismissed the error messages[/+]melvin-bot commentedon Dec 2, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021995869885087855082
melvin-bot commentedon Dec 2, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abzokhattab (
External)lorretheboy commentedon Dec 2, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Red dot is displayed on the report preview
What is the root cause of that problem?
When an employee submits an expense --> goes offline --> approver (on another device) approves the expense --> employee (offline) retracts and deletes the expense --> employee goes back online --> Sync conflicts occur, and errors get attached to report actions. When the user clears errors by tapping the X button, the errors on the retracted action may persist, causing the red brick road (RBR) indicator to continue showing.
What changes do you think we should make in order to solve the problem?
We should clear all report action errors when retraction succeeds
App/src/libs/actions/IOU.ts
Line 11010 in 6121fce
App/src/libs/actions/IOU.ts
Lines 11015 to 11019 in 6121fce
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
github-actions commentedon Dec 2, 2025
nkdengineer commentedon Dec 3, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Red dot is displayed on the report preview
What is the root cause of that problem?
The
IOUaction errors are cleared twiceApp/src/components/ReportActionItem/MoneyRequestReceiptView.tsx
Line 233 in 938fac5
The first time is this line which clears all errors
App/src/libs/actions/ReportActions.ts
Line 89 in 938fac5
The second time is this line which updates all
parentErrorKeyserrors tonullApp/src/libs/actions/ReportActions.ts
Line 96 in 938fac5
When merging, Onyx now keeps the null value key here, which causes the
IOUaction to have a key error withnullvaluehttps://github.com/Expensify/react-native-onyx/blob/ae1ec3f931ac74c56100f38d9f9269cf8e86596c/lib/OnyxMerge/index.native.ts#L22-L27
And the RBR is shown based on the function here
App/src/libs/ReportUtils.ts
Lines 11015 to 11025 in 938fac5
What changes do you think we should make in order to solve the problem?
Since the
nullvalue can appear in theerrorsobject now, we should check if it has the valid error insteadApp/src/libs/ReportUtils.ts
Lines 11015 to 11025 in 938fac5
What alternative solutions did you explore? (Optional)
To prevent the action error from being cleared unexpectedly a second time, we can create
clearedReportActionIDsparam and check it before clearing the errorApp/src/libs/actions/ReportActions.ts
Line 89 in 938fac5
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
16 remaining items
melvin-bot commentedon Dec 18, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Dec 18, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.81-5 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-12-25. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Dec 18, 2025
@abzokhattab @twisterdotcom 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]
twisterdotcom commentedon Dec 18, 2025
I am not around over Christmas. Please complete the checklist @abzokhattab but if anybody desperately needs this payout before Jan 5 when I return, please reassign the
Buglabel or ask in Slack.abzokhattab commentedon Dec 18, 2025
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: NA
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to comment: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/584584
Regression Test Proposal
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-4a5c-a198-7437-1b841b106c44melvin-bot commentedon Dec 31, 2025
@twisterdotcom Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Jan 2, 2026
@twisterdotcom Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
twisterdotcom commentedon Jan 6, 2026
Payment Summary:
twisterdotcom commentedon Jan 12, 2026
@nkdengineer has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-dbb5-abf9-9891-e82fedfbcdd4trjExpensify commentedon Jan 19, 2026
Confirming payment summary here is correct.