Skip to content

Migrate InteractionManager - batch 3 part 2 - #92946

Merged
roryabraham merged 9 commits into
Expensify:mainfrom
software-mansion-labs:mrejdak/migrate-interactionmanager-b3_v2
Jun 16, 2026
Merged

roryabraham merged 9 commits into
Expensify:mainfrom
software-mansion-labs:mrejdak/migrate-interactionmanager-b3_v2

Conversation

@mrejdak

@mrejdak mrejdak commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Part 2 of batch 3 of InteractionManager migration. Removes navigateAfterInteraction handle and it's usages.

Removed usages of navigateAfterInteraction:

  • useDiscardChangesConfirmation/index.ts - navigateAfterInteraction handle was a no-op on all platforms except iOS, and iOS used useDiscardChangesConfirmation/index.native.ts
  • FABPopoverMenu.tsx - bugs that navigateAfterInteraction fixed aren't present in the app anymore
  • SubmitExpenseOrchestrator.tsx - same as above
  • Share/SubmitDetailsPage.tsx - same as above
  • WorkspaceMemberDetailsPage.tsx - same as above

Fixed Issues

$ #83064
$ #71913
PROPOSAL:

Tests

WorkspaceMemberDetailsPage.tsx

  1. Create a new workspace
  2. Invite 2 other memebers to that workspace
  3. Go to workflows and edit the current workflow
  4. Change the approver to one of the added members
  5. Navigate back to members
  6. Remove the approver from workspace
  7. Verify that in the confirmation modal the correct name is displayed for the whole time the modal is visible
  8. Repeat the steps 3-7 with the other member

Share/SubmitDetailsPage.tsx

  1. Launch ND Hybrid app and sign in with gmail account
  2. Navigate to 'Troubleshoot' and press Clear cache and refresh the app (needed for the "Import your contacts" to appear)
  3. Navigate to the device storage, select any receipt and start a sharing flow
  4. Tap "Not now" on the "Import your contacts" modal
  5. Select a workspace, tap "Create expense"
  6. Tap "Not now" on allow location modal
  7. Verify that when user is navigated to the workspace, the "Import your contacts" modal does not reappear briefly

FABPopoverMenu.tsx

  1. Login with a new account and create a new workspace
  2. Press + to open FAB and then Create expense
  3. Click the back button to go back
  4. Click on + again
  5. Verify that the FAB popover appears
  6. Click on Start Chat and open any DM chat
  7. Click on the + icon
  8. Verify that the quick action tooltip doesn't appear
  1. Press + to open FAB and then Track distance
  2. Enter start and finish and press Next
  3. Tap Destination field and select user chat or workspace with no unsettled expense
  4. Submit the distance expense
  5. In the chat that you get redirected to, tap on the expense preview
  6. Tap on the distance receipt
  7. Tap app back button
  8. Verify that FAB menu does not appear briefly on closing

SubmitExpenseOrchestrator.tsx

  1. Log in to iOS Hybrid or ND standalone app with a gmail account and create a workspace
  2. Navigate to Account -> Troubleshoot -> Clear cache and restart the app
  3. Start creating a scan expense in the workspace chat, upload a receipt or take a picture of anything
  4. Submit the expense and on the Allow location modal tap "Not now"
  5. Navigate to the expense details page, tap the receipt preview
  6. Tap app's back arrow to exit the receipt view
  7. Verify that: Allow location modal is not shown after opening the receipt and navigating back to the expense details page
  • Verify that no errors appear in the JS console

Offline tests

N/A

QA Steps

Same as Tests

  • Verify that no errors appear in the JS console

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 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
    • 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

Android: Native
Android: mWeb Chrome
iOS: Native

WorkspaceMemberDetailsPage.tsx

batch3v2_sus_case_ios.mov

Share/SubmitDetailsPage.tsx

Screen.Recording.2026-06-10.at.17.03.56.mov

FABPopoverMenu.tsx

batch3v2_FAB_new_no_tooltip.mov
batch3v2_FAB_dist_exp.mov
batch3v2_FAB_exp_back.mov

SubmitExpenseOrchestrator.tsx

batch3v2_orchestrator.mov
iOS: mWeb Safari
MacOS: Chrome / Safari

@mrejdak
mrejdak force-pushed the mrejdak/migrate-interactionmanager-b3_v2 branch from d93ada2 to aeee3be Compare June 9, 2026 12:35
@codecov

codecov Bot commented Jun 9, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Coverage Δ
src/hooks/useDiscardChangesConfirmation/index.ts 0.00% <ø> (ø)
src/pages/Share/SubmitDetailsPage.tsx 85.88% <ø> (+1.04%) ⬆️
...inbox/sidebar/FABPopoverContent/FABPopoverMenu.tsx 75.67% <ø> (ø)
...st/step/confirmation/SubmitExpenseOrchestrator.tsx 61.42% <ø> (ø)
...s/workspace/members/WorkspaceMemberDetailsPage.tsx 0.00% <ø> (ø)
... and 272 files with indirect coverage changes

@mrejdak
mrejdak force-pushed the mrejdak/migrate-interactionmanager-b3_v2 branch from aeee3be to 61f9442 Compare June 10, 2026 15:12
@mrejdak
mrejdak force-pushed the mrejdak/migrate-interactionmanager-b3_v2 branch from 1aab052 to 7898a5d Compare June 11, 2026 08:44
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR is possibly changing native code and/or updating libraries, it may cause problems with HybridApp. Please check if any patch updates are required in the HybridApp repo and run an AdHoc build to verify that HybridApp will not break. Ask Contributor Plus for help if you are not sure how to handle this. ⚠️

@mrejdak
mrejdak force-pushed the mrejdak/migrate-interactionmanager-b3_v2 branch from e59f11b to d7ba3b2 Compare June 11, 2026 08:51
@mrejdak

mrejdak commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ This PR is possibly changing native code and/or updating libraries, it may cause problems with HybridApp. Please check if any patch updates are required in the HybridApp repo and run an AdHoc build to verify that HybridApp will not break. Ask Contributor Plus for help if you are not sure how to handle this. ⚠️

No native changes, main was outdated on our fork when I merged it

Comment thread config/eslint/eslint.seatbelt.tsv Resolved
@mrejdak
mrejdak marked this pull request as ready for review June 14, 2026 11:49
@mrejdak
mrejdak requested review from a team as code owners June 14, 2026 11:49
@melvin-bot
melvin-bot Bot requested review from Pujan92, ikevin127 and joekaufmanexpensify and removed request for a team June 14, 2026 11:49
@melvin-bot

melvin-bot Bot commented Jun 14, 2026

Copy link
Copy Markdown

@Pujan92 @ikevin127 One of you needs to 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]

@melvin-bot
melvin-bot Bot removed the request for review from a team June 14, 2026 11:49
@Pujan92

Pujan92 commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

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 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 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 the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • 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.js 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.
  • 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
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2026-06-14.at.19.05.08.mov
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2026-06-14.at.19.08.22.mov
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2026-06-14.at.19.09.38.mov
iOS: mWeb Safari
MacOS: Chrome / Safari

@Pujan92 Pujan92 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! navigation methods use runAfterTransitions, which removes the need for the navigateAfterInteraction part.

@melvin-bot
melvin-bot Bot requested a review from roryabraham June 14, 2026 14:00
@JakubKorytko

Copy link
Copy Markdown
Member

I've spoken to @mrejdak and asked him to test the performance after removing the postponement of the createTransaction. Please do not merge until he confirms nothing drops 🙏

@roryabraham roryabraham changed the title Migrate InteractionManager - batch 3 part 2 [WIP] Migrate InteractionManager - batch 3 part 2 Jun 15, 2026
@roryabraham

roryabraham commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

@mrejdak please remove the WIP prefix from the pull request title when this is ready for another review and/or merge

@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

No product review needed

@joekaufmanexpensify
joekaufmanexpensify removed their request for review June 15, 2026 21:06
@mrejdak mrejdak changed the title [WIP] Migrate InteractionManager - batch 3 part 2 Migrate InteractionManager - batch 3 part 2 Jun 16, 2026
@mrejdak

mrejdak commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Just verified - the change does not cause any drop in performance

@roryabraham
roryabraham merged commit ec93ee2 into Expensify:main Jun 16, 2026
37 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

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

@OSBotify

Copy link
Copy Markdown
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.

@OSBotify OSBotify mentioned this pull request Jun 16, 2026
46 tasks done
@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.4.9-0 🚀

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

Bundle Size Analysis (Sentry):

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 No help site changes required.

I reviewed this PR against the help site articles under docs/articles. This is a pure internal refactor with no user-facing impact:

  • It removes the navigateAfterInteraction navigation helper and its usages as part of the InteractionManager migration (batch 3, part 2).
  • The helper was a no-op on all platforms except iOS, and per the PR description the iOS-specific bugs it worked around no longer exist. Each call site now invokes its callback directly.
  • No feature behavior, UI labels, tab names, settings, or user-facing flows change. The affected files (useDiscardChangesConfirmation, FABPopoverMenu, SubmitExpenseOrchestrator, Share/SubmitDetailsPage, WorkspaceMemberDetailsPage) are navigation-timing internals only.

Since nothing documented on help.expensify.com is affected, no draft docs PR was created. There's no linked help site PR to review for this change.

@mrejdak, let me know if you believe any specific article should still be updated and I'll spin one up.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/puneetlath in version: 9.4.9-0 🚀

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.

8 participants