Add messageKey handling as fallback#82469
Conversation
…cated next step formats, improving backward compatibility. Update iconFill handling and ensure safe HTML rendering for actor names. Add validation for iconFill in report draft properties.
| const currentUserAccountID = currentUserPersonalDetails.accountID; | ||
| const currentUserEmail = currentUserPersonalDetails.login ?? ''; | ||
|
|
||
| const messageContent = useMemo(() => { |
There was a problem hiding this comment.
❌ PERF-6 (docs)
The messageContent is computed synchronously based on props/hook values and does not require useMemo for correctness. The computation is relatively lightweight (type checking and a single function call), and the memoization overhead may exceed the benefit.
Suggested fix: Remove useMemo and compute the value directly in the component body:
let messageContent = "";
if (nextStep) {
if (isDeprecatedFormatNextStep(nextStep)) {
messageContent = parseMessage(nextStep.message, currentUserEmail);
} else if ("messageKey" in nextStep && nextStep.messageKey) {
messageContent = buildNextStepMessage(nextStep, translate, currentUserAccountID);
}
}This ensures the value is always in sync with props without the extra render cycle or memoization complexity.
Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safariweb.mp4 |
|
🎯 @bernhardoj, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #82532. |
|
@chuckdries its ready for your review 🙏 |
|
Hi! Sorry for the delay, looking now |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @chuckdries has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/chuckdries in version: 9.3.22-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.22-4 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.22-4 🚀
|
Explanation of Change
redo of #81223
regressions #82000 and #82015 were not from #81223 but from #80715
This PR adds support for the
messageKeyformat for ReportNextStep updates while maintaining backward compatibility with the deprecatedmessagearray format.Why this is needed:
messageKeyformatmessagearray formatNote: these changes have no impact until we actually remove queueing next step updates in old format from Web-E
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/595924
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-02-14.at.2.28.11.AM.mov