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
Expense - Retracted message with RBR does not appear in expense report when retracting fails #80312
"retracted" message with RBR error "Unexpected error. Please try again later." will appear in the expense report.
Actual Result:
"retracted" message with RBR error "Unexpected error. Please try again later." does not appear in the expense report.
"retracted" message appears briefly then disappears.
👋 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.
Classification: Frontend bug Causing PR: #78634 - "new Onyx Derived Value VISIBLE_REPORT_ACTIONS" by @BartekObudzinski (High confidence) Related Issues: None
Recommendation: REVERT
PR #78634 introduced a performance optimization that pre-computes report action visibility using a derived value. However, this optimization breaks the visibility logic for actions that fail with errors, causing the retracted message with RBR error to disappear instead of remaining visible.
Labels: Keeping DeployBlockerCash (App deploy blocked); Removing DeployBlocker if present (not a backend issue)
📋 Detailed Analysis
Evidence
The bug reproduces when retracting a report with simulated failing network requests. The "retracted" message appears briefly then disappears, instead of remaining visible with the RBR error message.
PR #78634 was merged on 2026-01-22 and is included in the 9.3.7-1 staging deploy. The issue was reported in regression testing and is reproducible only on staging (where this PR is deployed), not production (where it is not yet deployed).
Verification
I examined the changes in PR #78634 and confirmed it modifies the exact code path responsible for filtering visible report actions in MoneyRequestReportActionsList.tsx:
This uses a PRE-COMPUTED derived value that caches visibility.
Root Cause
When retractReport is called:
An optimistic RETRACTED action is added with pendingAction: ADD (line 9958 in src/libs/actions/IOU/index.ts)
The derived value computes and caches this action as visible
When the API call fails, failureData adds errors to the action (line 10030-10032)
However, the failureData does NOT set pendingAction: null, leaving the action in a state with both pendingAction: ADD and errors
The issue is that the derived value (src/libs/actions/OnyxDerived/configs/visibleReportActions.ts) caches visibility based on shouldReportActionBeVisible, which checks for pendingAction at line 1116 of ReportActionsUtils.ts:
The problem appears to be a timing or state management issue where the cached visibility value doesn't properly reflect the runtime state when an action has both a pending action and errors, particularly in offline/simulated failure scenarios.
The old code called shouldReportActionBeVisible on every render with the current action state, but the new code relies on a cached value that may not update correctly for this edge case.
Activity
melvin-bot commentedon Jan 23, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #78634
melvin-bot commentedon Jan 23, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Jan 23, 2026
Triggered auto assignment to @stephanieelliott (
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.github-actions commentedon Jan 23, 2026
👋 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:
OSBotify commentedon Jan 23, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #78634 - "new Onyx Derived Value VISIBLE_REPORT_ACTIONS" by @BartekObudzinski (High confidence)
Related Issues: None
Recommendation: REVERT
PR #78634 introduced a performance optimization that pre-computes report action visibility using a derived value. However, this optimization breaks the visibility logic for actions that fail with errors, causing the retracted message with RBR error to disappear instead of remaining visible.
Labels: Keeping
DeployBlockerCash(App deploy blocked); RemovingDeployBlockerif present (not a backend issue)📋 Detailed Analysis
Evidence
The bug reproduces when retracting a report with simulated failing network requests. The "retracted" message appears briefly then disappears, instead of remaining visible with the RBR error message.
PR #78634 was merged on 2026-01-22 and is included in the 9.3.7-1 staging deploy. The issue was reported in regression testing and is reproducible only on staging (where this PR is deployed), not production (where it is not yet deployed).
Verification
I examined the changes in PR #78634 and confirmed it modifies the exact code path responsible for filtering visible report actions in
MoneyRequestReportActionsList.tsx:BEFORE PR #78634:
This called
shouldReportActionBeVisibleat RUNTIME for each action.AFTER PR #78634:
This uses a PRE-COMPUTED derived value that caches visibility.
Root Cause
When
retractReportis called:pendingAction: ADD(line 9958 insrc/libs/actions/IOU/index.ts)failureDataaddserrorsto the action (line 10030-10032)failureDatadoes NOT setpendingAction: null, leaving the action in a state with bothpendingAction: ADDanderrorsThe issue is that the derived value (
src/libs/actions/OnyxDerived/configs/visibleReportActions.ts) caches visibility based onshouldReportActionBeVisible, which checks forpendingActionat line 1116 ofReportActionsUtils.ts:The problem appears to be a timing or state management issue where the cached visibility value doesn't properly reflect the runtime state when an action has both a pending action and errors, particularly in offline/simulated failure scenarios.
The old code called
shouldReportActionBeVisibleon every render with the current action state, but the new code relies on a cached value that may not update correctly for this edge case.m-natarajan commentedon Jan 23, 2026
Issue is not reproducible onMac-Chrome, Samsung S23FE/ Android 16 and iPhone 15 in v9.3.7-3
80312.mp4
Retest.4.MP4
Screen.Recording.2026-01-23.at.20.41.29.mp4