Repository navigation
Conversation
When the destination policy isn't in Onyx for a viewer (e.g. a participant who isn't a member of the workspace the report was moved to), getMovedActionMessage resolved an empty workspace name. Fall back to the name already stored in the action's message (html/text) so the system message renders correctly. Co-authored-by: Nyoman Jyotisa <nyomanjyotisa@users.noreply.github.com>
Co-authored-by: Nyoman Jyotisa <nyomanjyotisa@users.noreply.github.com>
|
Fixed the failing check. 🎯 What was failing: Why it broke: The test creates a Fix: Seed I couldn't execute Jest in this environment to confirm locally, but the change is deterministic — with |
|
All the code checks are green now. ✅ The earlier failure ( The only two remaining red checks are |
|
@MelvinBot Please close this PR. The proposal has not been approved by a CME yet. |
|
Closing this PR as requested — the underlying proposal hasn't been approved by a CME yet. Feel free to reopen once the proposal is approved. 👍 |
Explanation of Change
The moved-report system message ("moved this report to the [Workspace name] workspace") resolved the workspace name only from the current user's local Onyx
POLICYcollection (getMovedActionMessageinReportUtils.ts). For a viewer who isn't a member of the destination workspace (e.g. the DM participant in the linked issue who never opened that workspace), the policy isn't in Onyx, so the name resolved to an empty string and the message rendered a blank workspace name. It only appeared later once an unrelated action delivered the policy into Onyx.This change makes
getMovedActionMessagefall back to the workspace name already baked into the action's stored message (message[0].html, thentext) when the destination policy isn't available locally, so the name renders correctly for all participants.CHANGE_POLICYis intentionally left out of scope.Fixed Issues
$ #98108
PROPOSAL: #98108 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari