Repository navigation
Migrate InteractionManager - batch 3 part 1 - #92087
roryabraham merged 27 commits into
Conversation
|
@codex review please |
|
@ikevin127 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4acceb14d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-06-09.at.20.mp4Simulator.Screen.Recording.-.iPhone.17.Pro.Max.-.2026-06-09.at.21.18.55.mov |
| Log.hmmm('[EmployeeTestDriveModal] Calling Navigation.goBack() and Navigation.navigate()'); | ||
| Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(CONST.IOU.ACTION.CREATE, CONST.IOU.TYPE.SUBMIT, transactionID, reportID)); |
There was a problem hiding this comment.
⚠️ Issue: Possible behavioral change - InteractionManager removed entirely without replacement
Why it's concerning: The InteractionManager.runAfterInteractions() was wrapping Navigation.navigate() to ensure the previous Navigation.goBack() animation completed before starting the next navigation. By removing this wrapper entirely, Navigation.navigate() is called synchronously right after Navigation.goBack() (assumption).
Potential bug: On slower devices, calling goBack() immediately followed by navigate() without waiting for the transition could cause:
- Navigation state corruption.
- Visual glitches where both animations compete.
- The navigate being dropped if the goBack hasn't finished processing.
Suggested fix: This should likely use waitForTransition: true on the navigate call:
Navigation.goBack();
Navigation.navigate(
ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(CONST.IOU.ACTION.CREATE, CONST.IOU.TYPE.SUBMIT, transactionID, reportID),
{waitForTransition: true} // <- this
);Or if goBack needs to complete first, use TransitionTracker:
Navigation.goBack();
TransitionTracker.runAfterTransitions({There was a problem hiding this comment.
React Navigation uses it's own internal queue to run these transitions after each other, so waitForTransition is not actually needed here
| Navigation.dismissModal({waitForTransition: true}); | ||
| Navigation.isNavigationReady().then(() => { | ||
| Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS.getRoute(targetPolicyID)); | ||
|
|
||
| InteractionManager.runAfterInteractions(() => { | ||
| Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS_SELECT_FEED.getRoute(targetPolicyID)); | ||
| }); | ||
| Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS_SELECT_FEED.getRoute(targetPolicyID)); |
There was a problem hiding this comment.
⚠️ Issue: Behavioral change - waitForTransition: true only on first navigate.
(Assumption) Why it's important: The second Navigation.navigate call is not wrapped in waitForTransition: true. Previously it was wrapped in InteractionManager.runAfterInteractions(), which ensured the first navigation completed before the second.
Suggested fix:
const dismissModalAndNavigate = (targetPolicyID: string) => {
Navigation.dismissModal({waitForTransition: true});
Navigation.isNavigationReady().then(() => {
Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS.getRoute(targetPolicyID), {waitForTransition: true});
Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS_SELECT_FEED.getRoute(targetPolicyID), {waitForTransition: true});
});
};
ikevin127
left a comment
There was a problem hiding this comment.
🟢 LGTM - Everything tests well
Only have 2 comments that might need some attention before merge 🙌
|
🚧 @roryabraham 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/roryabraham in version: 9.4.6-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 No help site changes required. This PR is part 1 of batch 3 of the InteractionManager migration — a purely internal code refactor that swaps Why no docs are needed:
Because nothing in |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.6-4 🚀
|
Explanation of Change
Part 1 of batch 3 of InteractionManager migration.
Fixed Issues
$ #83064
$ #71913
PROPOSAL:
Tests
TestDriveDemo.tsxSession/index.tsr/{reportID}part)Open Expensifybutton)?exitTo=r/{raportID}at the end, using the noted reportID (make sure to also alter the link, so that you log in on dev and not production)Link.tshttps://dev.new.expensify.com:8082/r/{raportID}- url form)Offline tests
N/A
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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: mWeb Chrome
iOS: Native
Screen.Recording.2026-06-09.at.11.20.17.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-06-03.at.10.38.26.mov
batch3_Session.mov
batch3_Link.mov