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-06-01] [$250] WS Chat - Reacting to Expensify card system message causes it to disappear #89140
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Card system messages (e.g. CARD_ISSUED_VIRTUAL) have an empty message array by design — their display text is computed client-side from originalMessage via getCardIssuedMessage.
When a user adds an emoji reaction, the server response can merge updated report action data back into Onyx. Because the message field is [], isDeletedAction treats it as a deleted comment (line 222: message.length === 0), and shouldReportActionBeVisible returns false, hiding the message.
Other action types with empty messages by design are already exempted at lines 206-212 (REIMBURSEMENT_DIRECTOR_INFORMATION_REQUIRED, CREATED_REPORT_FOR_UNAPPROVED_TRANSACTIONS, REASSIGN_APPROVER), but card action types are not.
What changes do you think we should make in order to solve the problem?
Add card-issued action types to the exemption in isDeletedAction in ReportActionsUtils.ts. The existing isCardIssuedAction helper (line 4320) already groups the relevant types (CARD_ISSUED, CARD_ISSUED_VIRTUAL, CARD_MISSING_ADDRESS, CARD_ASSIGNED, CARD_REPLACED_VIRTUAL, CARD_REPLACED), so the fix is to add isCardIssuedAction(reportAction) to the early-return block alongside the other exemptions.
What alternative solutions did you explore? (Optional)
An alternative would be to ensure the server populates the message field for card actions, but that would be a backend change and these actions are intentionally designed to compute display text client-side. The exemption approach is consistent with how other empty-message action types are already handled.
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 [-]WS Chat - Reacting to Expensify card system message causes it to disappear[/-][+][$250] WS Chat - Reacting to Expensify card system message causes it to disappear[/+]on May 13, 2026
Please re-state the problem that we are trying to solve in this issue.
Reacting to an Expensify Card system message in a workspace chat makes that system message disappear from the report timeline.
What is the root cause of that problem?
The card system action is rendered by its actionName, not by a normal comment body: PureReportActionItem routes card-issued actions to IssueCardMessage, and that component builds the visible text from getCardIssuedMessage(...) using the action's originalMessage fields.
After adding the emoji reaction, the action is re-evaluated for timeline visibility. shouldReportActionBeVisible() hides any non-pending action when isDeletedAction() returns true, and isDeletedAction() currently treats message.length === 0 as a legacy deleted comment. That works for normal comments, but it is wrong for Expensify Card system actions whose display text is derived from originalMessage instead of message.
The existing empty-message allowlist already exempts several system actions that intentionally have no normal message body, but it does not include the card-issued action family even though isCardIssuedAction() already groups those action names.
What changes do you think we should make in order to solve the problem?
Update isDeletedAction() so card-issued system actions are not classified as deleted solely because their message array is empty. Reuse the existing isCardIssuedAction(reportAction) helper in the same early-return block that already handles other intentionally empty-message system actions.
Add a regression test in tests/unit/ReportActionsUtilsTest.ts for a CARD_ISSUED_VIRTUAL (and/or one representative card-issued action from isCardIssuedAction) with message: [] and an originalMessage containing assigneeAccountID and cardID, asserting that isDeletedAction() is false and shouldReportActionBeVisible() remains true.
Platforms: all platforms using the shared report-action visibility pipeline.
Code paths / callers explicitly NOT touched: emoji reaction optimistic writes in src/libs/actions/Report/index.ts, IssueCardMessage rendering, getCardIssuedMessage, backend AddEmojiReaction response handling.
API contracts or backend behavior changes: no.
What alternative solutions did you explore? (Optional)
MelvinBot proposed the same client-side exemption. I agree with that direction because it fixes the visibility predicate at the shared boundary where the action is incorrectly treated as deleted.
I also considered forcing the emoji reaction flow or backend response to preserve/populate message, but that would make card system actions depend on duplicated display text even though the existing client rendering intentionally derives their copy from originalMessage via getCardIssuedMessage().
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: N/A. No clear offending PR was identified. The root cause appears to be BE, but we're applying a FE fix since the BE behavior is correct and the issue stems from a mismatch with FE expectations.
Link to the comment on the Issue: N/A.
[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 discussion: N/A
[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.
This is a straightforward fix, so I don’t think we need a regression test here.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
MelvinBot commentedon May 13, 2026
Proposal
What is the root cause of that problem?
Card system messages (e.g.
CARD_ISSUED_VIRTUAL) have an emptymessagearray by design — their display text is computed client-side fromoriginalMessageviagetCardIssuedMessage.When a user adds an emoji reaction, the server response can merge updated report action data back into Onyx. Because the
messagefield is[],isDeletedActiontreats it as a deleted comment (line 222:message.length === 0), andshouldReportActionBeVisiblereturnsfalse, hiding the message.Other action types with empty messages by design are already exempted at lines 206-212 (
REIMBURSEMENT_DIRECTOR_INFORMATION_REQUIRED,CREATED_REPORT_FOR_UNAPPROVED_TRANSACTIONS,REASSIGN_APPROVER), but card action types are not.What changes do you think we should make in order to solve the problem?
Add card-issued action types to the exemption in
isDeletedActioninReportActionsUtils.ts. The existingisCardIssuedActionhelper (line 4320) already groups the relevant types (CARD_ISSUED,CARD_ISSUED_VIRTUAL,CARD_MISSING_ADDRESS,CARD_ASSIGNED,CARD_REPLACED_VIRTUAL,CARD_REPLACED), so the fix is to addisCardIssuedAction(reportAction)to the early-return block alongside the other exemptions.What alternative solutions did you explore? (Optional)
An alternative would be to ensure the server populates the
messagefield for card actions, but that would be a backend change and these actions are intentionally designed to compute display text client-side. The exemption approach is consistent with how other empty-message action types are already handled.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.melvin-bot commentedon May 13, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (
External)[-]WS Chat - Reacting to Expensify card system message causes it to disappear[/-][+][$250] WS Chat - Reacting to Expensify card system message causes it to disappear[/+]melvin-bot commentedon May 13, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022054385395514586352
KJ21-ENG commentedon May 13, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Reacting to an Expensify Card system message in a workspace chat makes that system message disappear from the report timeline.
What is the root cause of that problem?
The card system action is rendered by its
actionName, not by a normal comment body:PureReportActionItemroutes card-issued actions toIssueCardMessage, and that component builds the visible text fromgetCardIssuedMessage(...)using the action'soriginalMessagefields.App/src/pages/inbox/report/PureReportActionItem.tsx
Lines 792 to 798 in d6a8779
App/src/components/ReportActionItem/IssueCardMessage.tsx
Lines 52 to 54 in d6a8779
App/src/libs/ReportActionsUtils.ts
Lines 4363 to 4414 in d6a8779
After adding the emoji reaction, the action is re-evaluated for timeline visibility.
shouldReportActionBeVisible()hides any non-pending action whenisDeletedAction()returns true, andisDeletedAction()currently treatsmessage.length === 0as a legacy deleted comment. That works for normal comments, but it is wrong for Expensify Card system actions whose display text is derived fromoriginalMessageinstead ofmessage.App/src/libs/ReportActionsUtils.ts
Lines 196 to 225 in d6a8779
App/src/libs/ReportActionsUtils.ts
Lines 1282 to 1287 in d6a8779
The existing empty-message allowlist already exempts several system actions that intentionally have no normal message body, but it does not include the card-issued action family even though
isCardIssuedAction()already groups those action names.App/src/libs/ReportActionsUtils.ts
Lines 205 to 212 in d6a8779
App/src/libs/ReportActionsUtils.ts
Lines 4320 to 4338 in d6a8779
What changes do you think we should make in order to solve the problem?
Update
isDeletedAction()so card-issued system actions are not classified as deleted solely because theirmessagearray is empty. Reuse the existingisCardIssuedAction(reportAction)helper in the same early-return block that already handles other intentionally empty-message system actions.Add a regression test in
tests/unit/ReportActionsUtilsTest.tsfor aCARD_ISSUED_VIRTUAL(and/or one representative card-issued action fromisCardIssuedAction) withmessage: []and anoriginalMessagecontainingassigneeAccountIDandcardID, asserting thatisDeletedAction()is false andshouldReportActionBeVisible()remains true.Scope boundaries:
src/libs/ReportActionsUtils.ts—isDeletedAction()empty-message exemption;tests/unit/ReportActionsUtilsTest.ts— card system action visibility regression coverage.src/libs/actions/Report/index.ts,IssueCardMessagerendering,getCardIssuedMessage, backend AddEmojiReaction response handling.What alternative solutions did you explore? (Optional)
MelvinBot proposed the same client-side exemption. I agree with that direction because it fixes the visibility predicate at the shared boundary where the action is incorrectly treated as deleted.
I also considered forcing the emoji reaction flow or backend response to preserve/populate
message, but that would make card system actions depend on duplicated display text even though the existing client rendering intentionally derives their copy fromoriginalMessageviagetCardIssuedMessage().24 remaining items
melvin-bot commentedon May 29, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon May 31, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
melvin-bot commentedon Jun 1, 2026
@mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
mallenexpensify commentedon Jun 2, 2026
Payment Summary
Contributor+: @ahmedGaber93 due $250 via NewDot
@ahmedGaber93 plz complete the BZ checklist and tag me in a post once you have. Thx
ahmedGaber93 commentedon Jun 3, 2026
BugZero Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: N/A. No clear offending PR was identified. The root cause appears to be BE, but we're applying a FE fix since the BE behavior is correct and the issue stems from a mismatch with FE expectations.
Link to the comment on the Issue: N/A.
[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 discussion: N/A
[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.
This is a straightforward fix, so I don’t think we need a regression test here.
ahmedGaber93 commentedon Jun 3, 2026
@mallenexpensify checklist have been completed, sorry for the delay.
mallenexpensify commentedon Jun 3, 2026
Came from a regression test, no update needed.
flaviadefaria commentedon Jul 31, 2026
Approved: @ahmedGaber93 due $250 via NewDot
melvin-bot commentedon Oct 13, 2026
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.