Add messageKey handling as fallback#81223
Conversation
|
@bernhardoj 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] |
This PR adds support for the new messageKey format for ReportNextStep updates while maintaining backward compatibility with the deprecated message array format. This is part of the migration effort to move NextStep update logic from PHP (Web-Expensify) to Auth (C++). Changes: - Updated MoneyReportHeaderStatusBar to handle both old format (message array) and new format (messageKey) - Added type guard isDeprecatedFormatNextStep to detect deprecated format - Modified MoneyReportHeader to check for both formats when determining if the NextStep bar should be shown - Prioritized old format first for backward compatibility
1820695 to
0ed2218
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 164b221705
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safariweb.mp4 |
|
I followed the QA Steps but the next step returned by the BE is still in the old format. Do we need to wait for some BE changes? |
|
We need this PR to support the new format before we can send it from backend, (to not break prod. behaviour) so if you like you can user my Local dev BE via ngrok to test this, Please DM me on slack whenever you are available to test this |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
its part of https://github.com/Expensify/Expensify/issues/570443 which i am working on this which is moving php onyx updates to Auth |
|
We still want to use the PHP old format. The new format is not ready yet because |
|
@s77rt do you mean that auth not send updates for report.nextStep? if yes i created these PRs https://github.com/Expensify/Auth/pull/19685, https://github.com/Expensify/Auth/pull/19691 to move all nextStep updates from onyx updates from php to auth, Also in this PR we are checking new format only as fallback, let me knw if there is any other concern? |
|
Yeah at the moment we're not sending any onyx updates for next steps, just getting the data from OpenReport/other calls. I think there are a couple exceptions to this but that's the current state of things. We are eventually, though, going to send the onyx updates from Auth, once we've confirmed that the new code in Auth matches the old code in PHP exactly. It seems like this App side of things can move forward with no risk, but I think we should hold on the actual updates until later, does that feel right to you @s77rt ? Let me know if I'm missing anything. |
|
As long as we are using the new next step only as fallback then I think it's fine. As for the onyx updates I think it's fine too, the only concern is about performance of |
|
🎯 @bernhardoj, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #81621. |
chuckdries
left a comment
There was a problem hiding this comment.
Works like a charm, tests pass
|
🚧 @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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/chuckdries in version: 9.3.16-0 🚀
|
|
This PR failing because of the issue |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.16-9 🚀
|
|
🚀 Deployed to staging by https://github.com/chuckdries in version: 9.3.17-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.17-9 🚀
|
Explanation of Change
This PR adds support for the
messageKeyformat for ReportNextStep updates while maintaining backward compatibility with the deprecatedmessagearray format.Why this is needed:
messageKeyformatmessagearray formatFixed 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
Uploading Screen Recording 2026-02-03 at 3.11.43 AM.mov…