Skip to content

[ECUK In-App 3DS] Adds new error handling system to Multifactor Authentication#82297

Merged
rafecolton merged 34 commits intoExpensify:mainfrom
software-mansion-labs:dariusz-biela/feat/3ds/error-handling
Feb 16, 2026
Merged

[ECUK In-App 3DS] Adds new error handling system to Multifactor Authentication#82297
rafecolton merged 34 commits intoExpensify:mainfrom
software-mansion-labs:dariusz-biela/feat/3ds/error-handling

Conversation

@dariusz-biela
Copy link
Contributor

@dariusz-biela dariusz-biela commented Feb 12, 2026

Explanation of Change

This PR replaces the route-parameter-based MFA outcome system with a context-driven, component-based architecture.

What changed:

  1. Routing simplification — Replaced the single parameterized route (/outcome/:outcomeType) with two static routes (/outcome/success, /outcome/failure). Outcome determination now happens entirely within OutcomePage by reading MFA context state, eliminating the need for outcome path generation (outcomePaths.ts, mapMultifactorAuthenticationOutcomes.ts — both deleted).

  2. Client/server error split — Extended ErrorState with httpStatus and message fields propagated from the HTTP response. OutcomePage now distinguishes between client errors (4xx → defaultClientFailureScreen) and server errors (5xx or UNKNOWN_RESPONSEdefaultServerFailureScreen), showing appropriate UI for each.

  3. Component-based screen resolution — Replaced OUTCOMES configuration objects with React elements stored directly in scenario config. Each scenario can override successScreen, defaultClientFailureScreen, defaultServerFailureScreen, and per-reason failureScreens. A createScreenWithDefaults factory enables layered composition — specialized screens extend base screens by overriding only the props that differ.

  4. Shared base components — Extracted OutcomeScreenBase, FailureScreenBase, and SuccessScreenBase as reusable layout components. Default screens (DefaultClientFailureScreen, DefaultServerFailureScreen, DefaultSuccessScreen, etc.) are created via the factory and exported from DefaultUserInterface.

  5. Scenario config stored in state — Full scenario config (including UI screens, modals, allowed methods) is resolved at INIT and stored in context state, replacing the previous pattern of storing only the scenario name and doing repeated lookups.

  6. Error resilience — Added try/catch for unhandled errors in the MFA process flow, and AuthenticationMethodDescription component with a fallback for missing authType.

Fixed Issues

$ #80537
PROPOSAL:

Tests

Note: MFA is currently only accessible from the Troubleshoot pane.

Unsupported device error (Web):

  1. Open the app on Web
  2. Navigate to Settings > Troubleshoot
  3. Tap "Test biometrics"
  4. Verify the unsupported device failure screen is displayed (since Web does not support biometrics)

Success and failure screens (Mobile):

  1. Open the app on a mobile device (iOS or Android)
  2. Navigate to Settings > Troubleshoot
  3. Tap "Test biometrics"
  4. Complete the biometric authentication successfully
  5. Verify the success screen is displayed with the correct authentication method description (e.g. "Face ID", "Fingerprint")
  6. Go back and tap "Test biometrics" again
  7. Cancel or fail the biometric authentication
  8. Verify the appropriate failure screen is displayed

Server error (Web or Mobile):

  1. Navigate to Settings > Troubleshoot
  2. Enable the "Simulate failing network requests" toggle
  3. Tap "Test biometrics"
  4. Verify the server failure screen is displayed (with the Humpty Dumpty illustration)
  5. Disable the "Simulate failing network requests" toggle
  • Verify that no errors appear in the JS console

Offline tests

N/A — MFA does not have offline-specific behavior; network failure is covered by the server error test above.

QA Steps

Same as Tests.

NOTE: This feature is behind a beta, so if it fails QA, it doesn't need a revert or a deploy blocker. Instead, please tag the PR reviewers in Slack and we'll decide how to move forward.

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Web: Unsupported device image
Mobile: Server failure image
Mobile: Client failure image
Mobile: Sucess image

…stead of route params

Remove outcome path generation (outcomePaths.ts, mapMultifactorAuthenticationOutcomes.ts)
and related types. OutcomePage now determines success/failure and specific error
outcome entirely from MFA context state instead of route params.

Split OUTCOME screen into OUTCOME_SUCCESS and OUTCOME_FAILURE as two separate
routes pointing to the same component.
… name

Eliminates redundant MULTIFACTOR_AUTHENTICATION_SCENARIO_CONFIG lookups
by resolving the scenario config during INIT and storing it directly
in state. Consumers now access scenario properties (OUTCOMES, MODALS,
allowedAuthenticationMethods) directly from state.scenario.
Use IllustrationName with lazy loading in base components, make
subtitle optional in FailureScreenBase, and create all default
screens from DefaultUserInterface config.
…s screens

Move screen defaults (successScreen, defaultFailureScreen, failureScreens)
into DefaultUserInterface config. Scenarios can override per-reason failure
screens via JSX elements. Simplify OutcomePage to resolve screens from
scenario config. Remove OUTCOMES types and FailureScreenResolver.
…th httpStatus propagation

Replace single defaultFailureScreen with defaultClientFailureScreen (4xx)
and defaultServerFailureScreen (5xx). Propagate httpStatus and message
through the error flow from parseHttpRequest to ErrorState. OutcomePage
now routes to server failure screen when httpStatus starts with 5.
@melvin-bot
Copy link

melvin-bot bot commented Feb 13, 2026

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx ts-node ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx ts-node ./scripts/generateTranslations.ts --compare-ref main

@dariusz-biela dariusz-biela marked this pull request as ready for review February 13, 2026 15:16
@dariusz-biela dariusz-biela requested review from a team as code owners February 13, 2026 15:16
@melvin-bot melvin-bot bot requested review from DylanDylann and trjExpensify and removed request for a team February 13, 2026 15:16
@melvin-bot
Copy link

melvin-bot bot commented Feb 13, 2026

@DylanDylann 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]

@github-actions
Copy link
Contributor

🚧 @rafecolton has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

Copy link
Member

@rafecolton rafecolton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done! Tested and it works great, including magic code error.

cancelButtonText: 'common.cancel',
},
},
failureHeaderTitle: 'multifactorAuthentication.verificationFailed',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this here and not part of the failure screens?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a simplification to meet the requirement:

  • For transaction approve/deny failures, use red phone illustration and Transaction failed title and subtitle
  • Use Transaction failed title (upper left) for transaction approve/deny failures (retain Oops, something went wrong subtitle and humpty dumpty illustration)

Of course, we can do this through the screenshots configuration, but then it would require adding the following to the approve transaction scenario:

defaultClientFailureScreen: <DefaultClientFailureScreen headerTitle="multifactorAuthentication.transactionFailed" />,
defaultServerFailureScreen: <DefaultServerFailureScreen headerTitle="multifactorAuthentication.transactionFailed" />,
failureScreens: {
    [CONST.MULTIFACTOR_AUTHENTICATION.REASON.GENERIC.NO_ELIGIBLE_METHODS]: <NoEligibleMethodsFailureScreen headerTitle="multifactorAuthentication.transactionFailed" />,
    [CONST.MULTIFACTOR_AUTHENTICATION.REASON.GENERIC.UNSUPPORTED_DEVICE]: <UnsupportedDeviceFailureScreen headerTitle="multifactorAuthentication.transactionFailed" />,
    },

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm that is an interesting point. We actually should not show the transaction review screen at all if the device is not supported or has no eligible methods (cc @JakubKorytko). It would create a bad UX - one of these two outcomes depending on how we implement it:

  • Immediately fail the transaction when the user taps Approve - requires the customer to redo the transaction
  • Let them close the modal and delete the review request from onyx locally - less bad but kinda pointless

For the other scenarios, it's fine to show those errors.

Regarding supplying headerTitle to the defaultClientFailureScreen and defaultServerFailureScreen values - I get what you're saying that we will save a little bit of config by supplying the default failure value once vs multiple times. However, we're already going to need a custom component for each of server/client failure for transaction review in order to supply the title, subtitle, and illustration. So I don't think saving ourselves a single config option is that valuable of an optimization. I'm more inclined to keep this top-level config clean and simple and let each outcome screen be explicit about its headerTitle value.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any efficiency implications of storing it this way? e.g. If it is static, do we save having to calculate the element by storing it this way?

Copy link
Contributor

@JakubKorytko JakubKorytko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good job, LGTM, small NABs not worth blocking

# Conflicts:
#	src/components/MultifactorAuthentication/Context/Main.tsx
#	src/components/MultifactorAuthentication/Context/State.tsx
#	src/components/MultifactorAuthentication/config/scenarios/DefaultUserInterface.ts
#	src/components/MultifactorAuthentication/config/types.ts
#	src/libs/actions/MultifactorAuthentication/processing.ts
Resolve merge conflicts between the type refactor and outcome callback
branches: fix stale OutcomePaths import, add missing
MultifactorAuthenticationScenarioResponse import, map ProcessResult to
ScenarioResponse correctly, and wire default callback into customConfig.
Rename all httpCode/httpStatus variants to httpStatusCode for consistency.
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/ROUTES.ts 12.83% <ø> (+0.01%) ⬆️
src/SCREENS.ts 100.00% <ø> (ø)
src/components/Icon/chunks/illustrations.chunk.ts 0.00% <ø> (ø)
...onents/MultifactorAuthentication/Context/State.tsx 6.38% <ø> (+0.26%) ⬆️
...actorAuthentication/Context/useNativeBiometrics.ts 92.59% <100.00%> (ø)
...cation/components/NoEligibleMethodsDescription.tsx 30.00% <ø> (ø)
...nts/OutcomeScreen/FailureScreen/defaultScreens.tsx 100.00% <100.00%> (ø)
...nts/OutcomeScreen/SuccessScreen/defaultScreens.tsx 100.00% <100.00%> (ø)
...cation/components/UnsupportedDeviceDescription.tsx 33.33% <ø> (ø)
...tication/config/scenarios/DefaultUserInterface.tsx 100.00% <100.00%> (ø)
... and 16 more
... and 26 files with indirect coverage changes

The subtitle translation key requires {authType} params, but
SuccessScreenBase called translate(subtitle) without them, causing
a crash: "Cannot read property 'authType' of undefined".
@github-actions
Copy link
Contributor

🚧 @rafecolton has triggered a test Expensify/App build. You can view the workflow run here.

Copy link
Contributor

@chuckdries chuckdries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests pass flawlessly on Android ad-hoc, but the "ReactElement in state" thing is throwing me for a loop and I'm hoping you can help me understand exactly how FailureScreenBase works at all. It calls useMultifactorAuthenticationState, which means it must be rendered as a child of MultifactorAuthenticationStateProvider, but then it itself is stored within the state of that provider. That means it is created, by necessity, outside of that subtree, but it must be okay because it's always actually rendered within that subtree?


type MultifactorAuthenticationTranslationParams = {
authType?: AuthTypeName;
authType?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was widening this type necessary? I'm not strongly against it - I don't know that narrowing this set of strings really provided much safety in the first place, but I see that AuthTypeName is still defined and used elsewhere, so why not use it here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - we should probably leave it given it is a fixed list

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I had to change this because there's a string that we paste at the end of the translation. Previously, we didn't translate authType into different languages. But after completing the translations, we send the result of translate(AUTH_TYPE_TO_TRANSLATION_KEY(authType)) here, and it returns a string.

Copy link
Member

@rafecolton rafecolton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment on something I think should be changed, plus I agree with Chuck's comment about AuthTypeName. Tested well on iOS so I'm going to merge this - we're going to need to make some more changes when adding error screens for the transaction review flows, so we can do the minor refactors then.

cancelButtonText: 'common.cancel',
},
},
failureHeaderTitle: 'multifactorAuthentication.verificationFailed',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm that is an interesting point. We actually should not show the transaction review screen at all if the device is not supported or has no eligible methods (cc @JakubKorytko). It would create a bad UX - one of these two outcomes depending on how we implement it:

  • Immediately fail the transaction when the user taps Approve - requires the customer to redo the transaction
  • Let them close the modal and delete the review request from onyx locally - less bad but kinda pointless

For the other scenarios, it's fine to show those errors.

Regarding supplying headerTitle to the defaultClientFailureScreen and defaultServerFailureScreen values - I get what you're saying that we will save a little bit of config by supplying the default failure value once vs multiple times. However, we're already going to need a custom component for each of server/client failure for transaction review in order to supply the title, subtitle, and illustration. So I don't think saving ourselves a single config option is that valuable of an optimization. I'm more inclined to keep this top-level config clean and simple and let each outcome screen be explicit about its headerTitle value.


type MultifactorAuthenticationTranslationParams = {
authType?: AuthTypeName;
authType?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - we should probably leave it given it is a fixed list

@rafecolton
Copy link
Member

rafecolton commented Feb 16, 2026

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari

@rafecolton rafecolton merged commit 099c41b into Expensify:main Feb 16, 2026
32 of 37 checks passed
@github-actions
Copy link
Contributor

🚧 @rafecolton has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@dariusz-biela
Copy link
Contributor Author

@chuckdries

Tests pass flawlessly on Android ad-hoc, but the "ReactElement in state" thing is throwing me for a loop and I'm hoping you can help me understand exactly how FailureScreenBase works at all. It calls useMultifactorAuthenticationState, which means it must be rendered as a child of MultifactorAuthenticationStateProvider, but then it itself is stored within the state of that provider. That means it is created, by necessity, outside of that subtree, but it must be okay because it's always actually rendered within that subtree?

React works in such a way that JSX is really just a configuration that describes which component function to call during rendering.

sucessScreen: <SucessScreenBase title="abc"/>

is exactly the same as:

sucessScreen: {
     component: SucessScreenBase,
     props: { 
          title:"abc"
     }
}

Therefore, this component will only be called in the react renderer call tree, in the place where the successScreen value is inserted in the OutcomePage.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/rafecolton in version: 9.3.21-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.3.21-4 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments