Remove getPersonalDetailsByIDs usage from OptionsListUtils#95888
Remove getPersonalDetailsByIDs usage from OptionsListUtils#95888bernhardoj wants to merge 6 commits into
Conversation
|
@shubham1206agra Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
| // When the last report action has unknown mentions (@Hidden), we want to consistently show @Hidden in LHN and report screen | ||
| // so we reconstruct the last message text of the report from the last report action. | ||
| if (!lastMessageTextFromReport && lastReportAction && hasHiddenDisplayNames(getMentionedAccountIDsFromAction(lastReportAction), translate)) { | ||
| lastMessageTextFromReport = Parser.htmlToText(getReportActionHtml(lastReportAction)); |
There was a problem hiding this comment.
This was added by this PR: #59551
It's to fix an issue where the last message of the LHN shows the mentioned email, but the report action message shows Hidden.
This is because for the report action message, we render the message.html, which is a mention tag with an accountID attribute. And because after we do "Clear cache & restart", the personal details for that accountID is not available yet.
But for the LHN last message, we render the report.lastMessageText, which is plain text. But that's not the case anymore. Now, we first get the message from the last action html by parsing the html.
App/src/libs/OptionsListUtils/index.ts
Lines 1086 to 1089 in e6cc804
getLastVisibleMessage
App/src/libs/ReportActionsUtils.ts
Line 1530 in e6cc804
App/src/libs/ReportActionsUtils.ts
Line 2598 in e6cc804
App/src/libs/ReportActionsUtils.ts
Lines 2104 to 2106 in e6cc804
The problem is that the accountIDToNameMap keeps the removed personal details. So, when we do Clear cache & restart, all personal details are removed, but accountIDToNameMap keeps it. That causes the inconsistency.
Lines 61 to 64 in e6cc804
Line 9 in e6cc804
Lines 32 to 43 in e6cc804
So, I cleared it following the same pattern we already had for reportIDToNameMap.
Lines 11 to 17 in e6cc804
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-07-12.at.8.13.45.AM.mov |
Explanation of Change
Fixed Issues
$ #66391
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
@unexistingperson@gmail.com)(You can use Inspect element to see the text in case the subtitle is too long)
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