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-04-03] [$250] Expense - DEW submit actions show different content when copied #84037
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
Version Number: 9.3.28-1 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#83517 Email or phone of affected tester (no customers):applausetester+ndk80@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Mac 26.2 / Chrome App Component: Money Requests
Please re-state the problem that we are trying to solve in this issue.
When a user right-clicks a DEW (Dynamic External Workflow) submit/approve failure system message and selects "Copy to clipboard", the copied text is different from what is displayed on screen. The on-screen message shows a translated string like "failed to submit the report. Add at least one approver as an expense description", but the clipboard receives different (likely empty or raw backend) content.
What is the root cause of that problem?
PR #83517 changed how DEW_SUBMIT_FAILED and DEW_APPROVE_FAILED actions are displayed. Previously, these had explicit rendering in PureReportActionItem.tsx using ReportActionItemBasicMessage. The PR removed that explicit handling and moved message construction into getReportActionMessageFragments() in ReportActionsUtils.ts (lines 2306-2319), which builds a translated prefix + error reason from originalMessage.message.
However, the "Copy Message" handler in ContextMenuActions.tsx (lines 720-1078) was not updated to handle these action types. The copy handler reads from action.message via getActionHtml() (line 207-210), but for DEW actions, action.message is an empty array — the actual error data lives in originalMessage.message. Since there's no explicit DEW_SUBMIT_FAILED/DEW_APPROVE_FAILED case in the copy handler's if-else chain, it falls through to the generic fallback, which copies the raw (empty) action.message content instead of the translated display message.
Display path:ReportActionItemMessage → getReportActionMessageFragments(translate, action) → reads originalMessage.message → constructs translated message Copy path:getActionHtml(reportAction) → reads action.message (empty []) → falls through to generic handler → copies empty/wrong text
What changes do you think we should make in order to solve the problem?
Add explicit handlers for DEW_SUBMIT_FAILED and DEW_APPROVE_FAILED in the "Copy Message" if-else chain in ContextMenuActions.tsx (before the generic fallback at line 1067). These handlers should construct the same translated message that getReportActionMessageFragments() produces, using getOriginalMessage() to extract the error reason and translate() to build the full message. The result should be passed through Parser.htmlToText() before copying to strip any HTML tags (since the auto-submit/auto-approve translation strings contain <a> anchor tags).
What alternative solutions did you explore? (Optional)
An alternative would be to have the backend populate action.message with the correct text for DEW actions, but this would duplicate logic and still wouldn't produce the translated message. The better approach is to align the copy handler with the display path, as is done for many other action types in the same file.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.
changed the title [-]Expense - DEW submit actions show different content when copied[/-][+][$250] Expense - DEW submit actions show different content when copied[/+]on Mar 3, 2026
📣 @babata990725! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
But we don't handle these action types to return the custom message in ContextMenuActions, then by default it returns the original message/html of the action.
What changes do you think we should make in order to solve the problem?
Update this callback to handle DEW_SUBMIT_FAILED and DEW_APPROVE_FAILED actions. We can follow the same way here to get the message for these actions
OPTIONAL: We can create a util to get the custom message of DEW_SUBMIT_FAILED and DEW_APPROVE_FAILED action. And then use this util function in getReportActionMessageFragments, ContextMenuActions and computeReportNameBasedOnReportAction
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.
[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.
[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.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
[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:
Link to the comment on the Issue:
[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:
[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.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
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
melvin-bot commentedon Mar 3, 2026
Triggered auto assignment to @NicMendonca (
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.MelvinBot commentedon Mar 3, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user right-clicks a DEW (Dynamic External Workflow) submit/approve failure system message and selects "Copy to clipboard", the copied text is different from what is displayed on screen. The on-screen message shows a translated string like "failed to submit the report. Add at least one approver as an expense description", but the clipboard receives different (likely empty or raw backend) content.
What is the root cause of that problem?
PR #83517 changed how
DEW_SUBMIT_FAILEDandDEW_APPROVE_FAILEDactions are displayed. Previously, these had explicit rendering inPureReportActionItem.tsxusingReportActionItemBasicMessage. The PR removed that explicit handling and moved message construction intogetReportActionMessageFragments()inReportActionsUtils.ts(lines 2306-2319), which builds a translated prefix + error reason fromoriginalMessage.message.However, the "Copy Message" handler in
ContextMenuActions.tsx(lines 720-1078) was not updated to handle these action types. The copy handler reads fromaction.messageviagetActionHtml()(line 207-210), but for DEW actions,action.messageis an empty array — the actual error data lives inoriginalMessage.message. Since there's no explicitDEW_SUBMIT_FAILED/DEW_APPROVE_FAILEDcase in the copy handler's if-else chain, it falls through to the generic fallback, which copies the raw (empty)action.messagecontent instead of the translated display message.Display path:
ReportActionItemMessage→getReportActionMessageFragments(translate, action)→ readsoriginalMessage.message→ constructs translated messageCopy path:
getActionHtml(reportAction)→ readsaction.message(empty[]) → falls through to generic handler → copies empty/wrong textWhat changes do you think we should make in order to solve the problem?
Add explicit handlers for
DEW_SUBMIT_FAILEDandDEW_APPROVE_FAILEDin the "Copy Message" if-else chain inContextMenuActions.tsx(before the generic fallback at line 1067). These handlers should construct the same translated message thatgetReportActionMessageFragments()produces, usinggetOriginalMessage()to extract the error reason andtranslate()to build the full message. The result should be passed throughParser.htmlToText()before copying to strip any HTML tags (since the auto-submit/auto-approve translation strings contain<a>anchor tags).What alternative solutions did you explore? (Optional)
An alternative would be to have the backend populate
action.messagewith the correct text for DEW actions, but this would duplicate logic and still wouldn't produce the translated message. The better approach is to align the copy handler with the display path, as is done for many other action types in the same file.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.melvin-bot commentedon Mar 3, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (
External)[-]Expense - DEW submit actions show different content when copied[/-][+][$250] Expense - DEW submit actions show different content when copied[/+]melvin-bot commentedon Mar 3, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022028839454503753803
babata990725 commentedon Mar 3, 2026
@MelvinBot implement this
melvin-bot commentedon Mar 3, 2026
📣 @babata990725! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
nkdengineer commentedon Mar 3, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
The copied content is different from the system message.
What is the root cause of that problem?
We displayed a custom message for
DEW_SUBMIT_FAILEDandDEW_APPROVE_FAILEDactions.App/src/libs/ReportActionsUtils.ts
Lines 2306 to 2322 in c9cc9b0
But we don't handle these action types to return the custom message in
ContextMenuActions, then by default it returns the originalmessage/htmlof the action.What changes do you think we should make in order to solve the problem?
DEW_SUBMIT_FAILEDandDEW_APPROVE_FAILEDactions. We can follow the same way here to get the message for these actionsApp/src/pages/inbox/report/ContextMenu/ContextMenuActions.tsx
Line 753 in 55d0b33
computeReportNameBasedOnReportActionfunction to fix the thread report name when repling in the thread of the actionApp/src/libs/ReportNameUtils.ts
Line 381 in 55d0b33
OPTIONAL: We can create a util to get the custom message of
DEW_SUBMIT_FAILEDandDEW_APPROVE_FAILEDaction. And then use this util function ingetReportActionMessageFragments,ContextMenuActionsandcomputeReportNameBasedOnReportActionWhat 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.
47 remaining items
melvin-bot commentedon Apr 10, 2026
@sobitneupane Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Apr 14, 2026
@sobitneupane Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Apr 16, 2026
@sobitneupane 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
mallenexpensify commentedon Apr 17, 2026
@sobitneupane plz complete the BZ checklist and tag me in a post once you have.
melvin-bot commentedon Apr 20, 2026
@sobitneupane 12 days overdue. Walking. Toward. The. Light...
sobitneupane commentedon Apr 21, 2026
Sorry for the delay, @mallenexpensify I have been quite busy this week. If it's okay with you, I will try to get this done by EOW.
twisterdotcom commentedon Apr 22, 2026
@nkdengineer has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-30e0-a1ac-acb1-426eea9fb684sobitneupane commentedon Apr 27, 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: Update how DEW submit actions are displayed #83517 (comment)
Link to the comment on the Issue: Internal issue
[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.
[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/630173
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-68ae-a68d-9ade-bc09de777ae4mallenexpensify commentedon Apr 27, 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:
Link to the comment on the Issue:
[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:
[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.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
JmillsExpensify commentedon May 24, 2026
$250 approved for @sobitneupane