Fix: Magic code error does not appear above Verify button when revealing details#73605
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 9 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.mp4Android: mWeb Chromeandroid.mweb.mp4iOS: HybridAppios.mp4iOS: mWeb Safariios.mweb.mp4MacOS: Chrome / Safariweb.mp4MacOS: Desktopdesktop.mp4 |
| clearValidateCodeActionError(validateCodeActionErrorField); | ||
| } | ||
| if (!isEmptyObject(validateCodeAction?.errorFields?.actionVerified)) { | ||
| clearValidateCodeActionError('actionVerified'); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
Seems like this PR implements the same logic for clearing the |
|
Oh, I think we can leave it as it is then. Thanks! |
|
✋ 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/danieldoglas in version: 9.2.42-0 🚀
|
|
@ryntgh PR failed with the original issue 1762110376375.Screen_Recording_2025-11-02_at_21.04.31.mp4 |
|
Hi @IuliiaHerets, could you please clarify which step is failing in this case? From what I can see in the attached video, the magic code error is displayed correctly above the Verify button |
|
@ryntgh The magic code error is still appearing on the previous page, under the Reveal details button. Shared one more video 1761954059388.73605-Web.mp4 |
|
@IuliiaHerets Isn’t the error message expected? In the original issue, the expected result only states that the magic code error should appear above the Verify button
cc @bernhardoj @danieldoglas for clarity |
|
Yeah, I think it's a different issue.
The error shown in the card page is from the error state set locally here, while the error on the magic code page is solely received from the BE. @danieldoglas do you think we should create a new issue for that or just let @ryntgh handle it on a new PR and increase the price? |
|
@bernhardoj Let's increase the price and fix the other issue. |
|
@bernhardoj @danieldoglas do we need to log a new issue? |
|
nope, it's fine to use the same one. |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.2.42-11 🚀
|
|
@danieldoglas to clarify, I think we don't need to show the (non-dismissable) error message on the card page, and instead show it on the magic code page, right? With the current code, if somehow the reveal details request fails, there won't be an error message on the magic code page, and the user needs to go back to see the error message. (I turned on simulate failing network request when entering the magic code) w.mp4 |
|
Based on @bernhardoj comment here, is this the expected behavior? Are we not going to use the error received from the BE on the magic code page? MacOS-Chrome.mp4RCAWhen the user enters a wrong magic code, the error gets stored in the card details context ( SolutionHandle the magic code validation error locally .catch((error: TranslationPaths) => {
setValidateError(getMicroSecondOnyxErrorWithTranslationKey(error));
})Then we can also set validateCodeActionErrorField="" |
|
@danieldoglas hi, can you confirm the expected behavior? The video on my previous comment shows the current behavior, while the video on @ryntgh comment above is the new behavior. |
Yes, that's what I expect in this case too. |
|
@ryntgh you can go create the new PR |
|
Sure, I'll raise the PR ASAP |


Explanation of Change
Fixed Issues
$ #73134
PROPOSAL: #73134 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Precondition:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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-Native.mp4
Android: mWeb Chrome
Android-mWeb.mp4
iOS: Native
iOS-Native.mp4
iOS: mWeb Safari
iOS-mWeb.mp4
MacOS: Chrome / Safari
MacOS-Chrome.mp4
MacOS: Desktop
MacOS-Desktop.mp4