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 2026-03-30] Expensify card - System message doesn't appear when there is a pending submit expense #85744
Preconditions:
Use a new Expensifail account.
Have a workspace with Expensify cards enabled.
Have a draft expense report in the Expensify cards workspace.
Open the Expensify app
Issue an Expensify virtual card to yourself
Go to workspace chat
Expected Result:
There's a system message indicating that the Expensify card was assigned to you.
Actual Result:
The system message doesn't appear when there is a draft expense report.
After deleting the expense report, the message appears.
👋 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: #85192 - "feat: deep link to report preview or message that caused GBR/RBR" by @aimane-chnaif (High confidence) Related Issues: None
Recommendation: REVERT
The PR #85192 introduces logic that filters report actions for display in the workspace chat based on specific criteria (Pay, Approve, Submit actions). However, CARD_ISSUED system messages are not being properly considered in this new filtering logic, causing them to not appear when draft expense reports exist.
Labels: Keeping DeployBlockerCash (App deploy is blocked), as this is a frontend bug requiring changes to the App repository.
Detailed Analysis
Evidence
The bug is reproducible only on staging (v9.3.40-0), not production
The PR modifies how system messages are filtered and displayed:
The getIOUReportActionWithBadge function only looks for REPORT_PREVIEW actions (expense report summaries)
CARD_ISSUED actions are a different action type (CONST.REPORT.ACTIONS.TYPE.CARD_ISSUED)
When a draft expense report exists, the new filtering logic focuses on expense-related actions and inadvertently filters out card issuance messages
Root Cause
PR #85192 introduced getReasonAndReportActionThatRequiresAttention changes that prioritize expense report actions (REPORT_PREVIEW) over other system messages. The getIOUReportActionWithBadge function specifically filters for actions where the user can pay, approve, or submit, which excludes CARD_ISSUED actions. When a draft expense report is present, the system focuses on these expense actions and the CARD_ISSUED message does not appear in the workspace chat.
The issue disappears after deleting the draft expense report because the filtering logic no longer has expense reports to prioritize, allowing the CARD_ISSUED system message to be displayed normally.
Please re-state the problem that we are trying to solve in this issue.
When a workspace has an Expensify card assigned and a pending/draft expense report exists, the CARD_ASSIGNED system message doesn't appear in the workspace chat. After deleting the expense report, the message appears. This is reproducible on staging but not on production, indicating a regression.
What is the root cause of that problem?
PR #85192 (merged March 18) introduced a new feature that deep-links to specific report actions when clicking a chat in the LHN sidebar. This feature is gated to staging only via an isProduction check:
When a draft expense report exists, the system computes an actionTargetReportActionID pointing to the REPORT_PREVIEW action (the one with the Submit badge). This flows through:
// If we are linked to an action in a gap return it by itselfif(!linkedPage&&resourceItem){return{data: [resourceItem.item],hasNextPage: false,hasPreviousPage: false, resourceItem};}
The REPORT_PREVIEW action for a draft expense was created optimistically (by the IOU action, not via OpenReport), so it's not in any server-fetched page. When the user clicks the workspace chat in the LHN:
Navigation deep-links to the REPORT_PREVIEW action ID (staging only)
getContinuousChain finds this action in a "pagination gap" (exists in Onyx but not in any page)
It returns only that single REPORT_PREVIEW action, hiding all other actions including CARD_ASSIGNED
When the expense report is deleted, actionTargetReportActionID is no longer set → navigation proceeds without a deep-link → getContinuousChain returns the first page with all actions → CARD_ASSIGNED becomes visible again.
What changes do you think we should make in order to solve the problem?
Fix getContinuousChain in src/libs/PaginationUtils.ts at lines 225-228. When the linked action is in a pagination gap and loaded pages already exist, fall back to the first page instead of returning the linked action in isolation. The resourceItem can still be returned so the UI can scroll to the target action.
This way, when the LHN deep-links to a REPORT_PREVIEW that was optimistically created (and therefore not in any page), the user still sees the full chat content rather than just that one action.
What alternative solutions did you explore? (Optional)
Fix at the navigation level (SidebarLinks.tsx): Only pass actionTargetReportActionID when the action is confirmed to be in a loaded page. Rejected because SidebarLinks doesn't have access to pagination data.
Fix in reportAttributes.ts: Don't set actionTargetReportActionID for optimistic/pending actions. This is more targeted but would miss the general case where any deep-linked action could be in a gap.
Fix in usePaginatedReportActions.ts: Detect when the chain has only one item in a gap and fall back. This is equivalent to the recommended fix but at the wrong abstraction layer.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
changed the title [-]Expensify card - System message doesn't appear when there is a pending submit expense[/-][+][Due for payment 2026-03-30] Expensify card - System message doesn't appear when there is a pending submit expense[/+]on Mar 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.41-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@hoangzinh / @aimane-chnaif 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]
Activity
melvin-bot commentedon Mar 19, 2026
Triggered auto assignment to @srikarparsi (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Mar 19, 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:
melvin-bot commentedon Mar 19, 2026
💬 A slack conversation has been started in #expensify-open-source
OSBotify commentedon Mar 19, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #85192 - "feat: deep link to report preview or message that caused GBR/RBR" by @aimane-chnaif (High confidence)
Related Issues: None
Recommendation: REVERT
The PR #85192 introduces logic that filters report actions for display in the workspace chat based on specific criteria (Pay, Approve, Submit actions). However, CARD_ISSUED system messages are not being properly considered in this new filtering logic, causing them to not appear when draft expense reports exist.
Labels: Keeping
DeployBlockerCash(App deploy is blocked), as this is a frontend bug requiring changes to the App repository.Detailed Analysis
Evidence
reportAttributes.ts,ReportUtils.ts,SidebarUtils.ts, and the core display logic for action badgesVerification
Files affected by the bug:
/home/runner/_work/App/App/src/libs/ReportUtils.ts(line 4346:getIOUReportActionWithBadgefunction)/home/runner/_work/App/App/src/libs/actions/OnyxDerived/configs/reportAttributes.ts(reportAttributes configuration)/home/runner/_work/App/App/src/libs/actions/IOU/index.ts(line 9809:getIOUReportActionWithBadgefunction)The PR modifies how system messages are filtered and displayed:
getIOUReportActionWithBadgefunction only looks for REPORT_PREVIEW actions (expense report summaries)Root Cause
PR #85192 introduced
getReasonAndReportActionThatRequiresAttentionchanges that prioritize expense report actions (REPORT_PREVIEW) over other system messages. ThegetIOUReportActionWithBadgefunction specifically filters for actions where the user can pay, approve, or submit, which excludes CARD_ISSUED actions. When a draft expense report is present, the system focuses on these expense actions and the CARD_ISSUED message does not appear in the workspace chat.The issue disappears after deleting the draft expense report because the filtering logic no longer has expense reports to prioritize, allowing the CARD_ISSUED system message to be displayed normally.
MelvinBot commentedon Mar 19, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a workspace has an Expensify card assigned and a pending/draft expense report exists, the
CARD_ASSIGNEDsystem message doesn't appear in the workspace chat. After deleting the expense report, the message appears. This is reproducible on staging but not on production, indicating a regression.What is the root cause of that problem?
PR #85192 (merged March 18) introduced a new feature that deep-links to specific report actions when clicking a chat in the LHN sidebar. This feature is gated to staging only via an
isProductioncheck:src/pages/inbox/sidebar/SidebarLinks.tsx:76:When a draft expense report exists, the system computes an
actionTargetReportActionIDpointing to theREPORT_PREVIEWaction (the one with the Submit badge). This flows through:reportAttributes.ts:246— derivesactionTargetReportActionIDfrom the GBR/RBR targetOptionRowLHNData→SidebarLinks→ navigation route paramsusePaginatedReportActions.ts:48— uses thereportActionIDfrom route as the pagination anchorThe critical issue is in
PaginationUtils.ts:225-228:The
REPORT_PREVIEWaction for a draft expense was created optimistically (by the IOU action, not via OpenReport), so it's not in any server-fetched page. When the user clicks the workspace chat in the LHN:REPORT_PREVIEWaction ID (staging only)getContinuousChainfinds this action in a "pagination gap" (exists in Onyx but not in any page)REPORT_PREVIEWaction, hiding all other actions includingCARD_ASSIGNEDWhen the expense report is deleted,
actionTargetReportActionIDis no longer set → navigation proceeds without a deep-link →getContinuousChainreturns the first page with all actions →CARD_ASSIGNEDbecomes visible again.What changes do you think we should make in order to solve the problem?
Fix
getContinuousChaininsrc/libs/PaginationUtils.tsat lines 225-228. When the linked action is in a pagination gap and loaded pages already exist, fall back to the first page instead of returning the linked action in isolation. TheresourceItemcan still be returned so the UI can scroll to the target action.This way, when the LHN deep-links to a
REPORT_PREVIEWthat was optimistically created (and therefore not in any page), the user still sees the full chat content rather than just that one action.What alternative solutions did you explore? (Optional)
SidebarLinks.tsx): Only passactionTargetReportActionIDwhen the action is confirmed to be in a loaded page. Rejected becauseSidebarLinksdoesn't have access to pagination data.reportAttributes.ts: Don't setactionTargetReportActionIDfor optimistic/pending actions. This is more targeted but would miss the general case where any deep-linked action could be in a gap.usePaginatedReportActions.ts: Detect when the chain has only one item in a gap and fall back. This is equivalent to the recommended fix but at the wrong abstraction layer.Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
aimane-chnaif commentedon Mar 19, 2026
We can demote this. The deep link for action badge is only available in staging.
cristipaval commentedon Mar 19, 2026
I think this is pretty bad even if on staging only
3 remaining items
IuliiaHerets commentedon Mar 19, 2026
Not repro on iOS app
iPhone 13 / iOS 18.7.1
v9.3.40-8
Android app is still pending validation
ecard.MP4
cristipaval commentedon Mar 19, 2026
thanks, closing
[-]Expensify card - System message doesn't appear when there is a pending submit expense[/-][+][Due for payment 2026-03-30] Expensify card - System message doesn't appear when there is a pending submit expense[/+]melvin-bot commentedon Mar 23, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.41-4 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 2026-03-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 23, 2026
@hoangzinh / @aimane-chnaif 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]
melvin-bot commentedon Mar 23, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)