Fix Chat - App returns to main chat after refreshing Flag as offensive RHP in thread #87622
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
| * @param screenName - The name of the screen to check. | ||
| * @returns True if the screen name is a dynamic route screen, false otherwise. | ||
| */ | ||
| function isDynamicRouteScreen(screenName: Screen): boolean { |
There was a problem hiding this comment.
NAB: adding a test wouldn't hurt 😄
| // Dynamic screens are skipped here because they never carry their own backTo - they only | ||
| // inherit it from the screen underneath. Letting backTo dictate the full-screen route for | ||
| // a dynamic screen would resolve the wrong page. | ||
| if (isRouteWithBackToParam(route) && !isDynamicScreen) { |
There was a problem hiding this comment.
and a test for this branch
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-04-10.at.22.42.41.mp4Android: mWeb ChromeScreen.Recording.2026-04-10.at.22.44.34.mp4iOS: HybridAppScreen.Recording.2026-04-10.at.22.49.07.mp4iOS: mWeb SafariScreen.Recording.2026-04-10.at.22.50.00.mp4MacOS: Chrome / SafariScreen.Recording.2026-04-10.at.22.37.48.mov |
|
BUG: Screen.Recording.2026-04-10.at.22.12.09.mov |
|
@collectioneur It is still happening on staging. Could you check if it is related to your changes? |
|
@huult I checked, and it works exactly the same way in production. Even if it is a bug, it's unrelated to my changes |
Screen.Recording.2026-04-10.at.22.18.43.mov |
|
@huult, yeah, it looks like that on staging. Try to reproduce it on that PR, it should be resolved |
Screen.Recording.2026-04-10.at.22.23.55.movIt is not happening in production. Could you check whether it is related to your changes or not? |
|
#87622 (comment) #87622 (comment) |
Screen.Recording.2026-04-10.at.17.30.20.mov |
|
@collectioneur Thank you! It’s working now. |
|
🚧 @mjasikowski 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/mjasikowski in version: 9.3.59-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes required. This PR fixes internal navigation routing logic ( |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.3.59-4 🚀
|
Explanation of Change
Fix the screen-underneath resolution logic for dynamic routes in
getMatchingFullScreenRoute. Dynamic routes never carry their ownbackTo- they inherit it from the screen underneath. Previously, thebackToparam on a dynamic route was incorrectly used to resolve the full-screen route, leading to wrong screens being shown underneath overlays. Now the function checks whether the route is a dynamic screen viaisDynamicRouteScreen(which verifies against the navigation config'sdynamicRoutePaths) and skipsbackTohandling for dynamic screens. TheisDynamicRouteScreenutility was also extracted into a shared file to be reused by bothgetPathFromStateandgetAdaptedStateFromPath.Fixed Issues
$ #87602
Tests
Precondition:
User has received a message from another user.
Offline tests
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
MacOS: Chrome / Safari
Screen.Recording.2026-04-10.at.15.00.30.mov