Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v9.4.51-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: https://github.com/Expensify/Expensify/issues/644121
Email or phone of affected tester (no customers): -
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Windows 10 - Chrome
Action Performed:
- Log in with an account whose default currency is set to USD (User A).
- Go to the Inbox tab, click the FAB, and select Create Expense.
- Create a manual expense for an email address that does not yet have an Expensify account (Important step)
- In another browser, log in using the email address from step 3 (User B).
- For User B, set default currency to USD.
- As User B, navigate to the DM chat with User A and open the expense report.
- Click Pay and select Pay with business account.
- Cancel the bank account setup flow. Verify that the expense is moved to User B's workspace.
- As User A, navigate to the DM chat with User B (important: User A should not open the workspace chat).
Expected Result:
User A can see the following system message: moved this report to the [Workspace Name] workspace
Actual Result:
Workspace name is not visible in the system message. It appears after creating another expense in the chat
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
Screenshots/Videos
Bug7210575_1784279509262.bandicam_2026-07-17_11-58-18-501.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022086548970710506869
- Upwork Job ID: 2086548970710506869
- Last Price Increase: 2026-08-09
Issue Owner
Current Issue Owner: @mallenexpensifyMetadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
MelvinBot commentedon Aug 9, 2026
Proposal
Updated 2026-08-10 per feedback from
nyomanjyotisa: recommended fix now uses the stored action message as the fallback, covers both consumption paths, and scopesCHANGE_POLICYout.What is the root cause of that problem?
The workspace name in the "moved this report to the … workspace" system message is not read from the action — it is recomputed on every render from the current user's local Onyx policy collection, with a bare empty-string fallback:
(
ReportUtils.ts:7269-7281)User A is not a member of User B's workspace and never opened it, so
policy_<toPolicyID>isn't in their Onyx. The lookup returns''and the message renders with a blank name. It only appears later because creating another expense delivers that policy into User A'sCOLLECTION.POLICYviaonyxData, after which the message re-renders correctly.Evidence & data flow
?? ''fallback:ReportUtils.ts:7269-7281originalMessagecarries IDs only, no name:OriginalMessage.ts:1272-1284allPoliciesmirrors the local policy collection:ReportUtils.ts:1075-1083en.ts:1373-1378Flow: User B pays with a business account → backend moves report + creates the MOVED action → User A receives the action but not the destination policy → name resolves to
''→ blank. A later expense delivers the policy → name appears.What changes do you think we should make in order to solve the problem?
Make
getMovedActionMessagefall back to the server-rendered action message when the destination policy isn't available locally, instead of building the sentence with an empty name.In
getMovedActionMessage: whenallPolicies[policy_<toPolicyID>]is missing (sotoPolicyNamewould be empty), return the action's stored HTML viagetReportActionHtml(action)(ReportActionsUtils.ts:2123) rather than the freshly-built string. The broadcast action already carries the name the server rendered, so User A shows it immediately; when the policy is present locally, keep the current live-computed string so nothing else changes. This mirrors the existing pattern in the repo where messages fall back togetReportActionText(action)when their computed inputs aren't available (ReportActionsUtils.ts:2985,:2991).Both consumption paths are covered by returning the stored HTML —
getMovedActionMessage's output is used two ways:ActionContentRouter.tsx:345-350Parser.htmlToText(...):ReportNameUtils.ts:731,OptionsListUtils/index.ts:924,ContextMenuActions.tsx:1326Returning the stored
htmlserves both (the text callers run it throughhtmlToText), and it inherently covers bothshouldHideMovedReportUrlbranches of the template since the stored HTML is whatever the server already produced.Out of scope:
getPolicyChangeMessage(ReportUtils.ts:7283-7290) has the same live-lookup pattern forCHANGE_POLICY, but per this issue's scope it is not being changed here.What alternative solutions did you explore? (Optional)
Falling back to
report?.policyNamewon't help — the report the action is shown in is the A↔B DM, not the workspace, so it has no workspace name for User A.Related issues
Same area (system-message rendering) but distinct: #97328, #96687.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/98108)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
melvin-bot commentedon Aug 9, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @nyomanjyotisa (
External)melvin-bot commentedon Aug 9, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022086548970710506869
nyomanjyotisa commentedon Aug 10, 2026
@MelvinBot I verified that the MOVED action already stores the workspace name in
message[0].html/text. Please use it when the destination policy is unavailable, cover both paths, and keepCHANGE_POLICYout of scope.MelvinBot commentedon Aug 10, 2026
🤖 Draft PR created: #98112
What it does:
getMovedActionMessage(src/libs/ReportUtils.ts:7279) resolved the workspace name only from the local OnyxPOLICYcollection, so it rendered blank for participants who aren't members of the destination workspace. It now falls back to the workspace name already stored in the action's message (html, thentext) when the policy isn't in Onyx.CHANGE_POLICYwas left out of scope per your request.Checks run locally (all passed):
oxfmt, ESLint (0 errors),typecheck-tsgo, andReportUtilsTest.ts(1182 tests). I didn't run a live app repro because it needs a two-user business-account pay flow that a single signed-in session can't reproduce.Please add manual
Tests/QAsteps and mark it as "Ready for review" when it's ready.nyomanjyotisa commentedon Aug 10, 2026
@MelvinBot Please update your proposal to use the stored action message when the destination policy is unavailable, cover both paths, and keep
CHANGE_POLICYout of scope. Please do not implement it yet.nyomanjyotisa commentedon Aug 10, 2026
MelvinBot’s updated proposal LGTM.
🎀👀🎀 C+ reviewed
melvin-bot commentedon Aug 10, 2026
Triggered auto assignment to @aldo-expensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
aldo-expensify commentedon Aug 10, 2026
The proposal looks good to me 👍
11 remaining items
nyomanjyotisa commentedon Aug 17, 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: fix: <workspacename> workspace deeplink redirects to mWeb #68041 (comment)
Link to the comment on the Issue: [Will pay 09-02] [Due for payment 2025-08-29] [$250] iOS - Expense Report - "<username> workspace" deeplink redirects to mWeb #67577 (comment)
[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. This was not a critical regression.
[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 was caught by the existing regression test referenced in the issue (Expensify/Expensify#644121), so no new or updated regression test is needed.
melvin-bot commentedon Aug 20, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Aug 20, 2026
Payment Summary
Resolving PRs:
Fix: use server-rendered message for moved-report action when destination policy is unavailable locally #98238
Reviewer: @nyomanjyotisa owed $250 via NewDot
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Aug 21, 2026
Payment Summary
Contributor+: @nyomanjyotisa due $250 via NewDot
trjExpensify commentedon Aug 24, 2026
approved $250 for @nyomanjyotisa