[HybridApp] Fix for push notifications in HybridApp on Android#46090
Conversation
| maxTimeoutRef.current = setTimeout(() => { | ||
| Log.info('[HybridApp] Forcing transition due to unknown problem', true); | ||
| setStartedTransition(true); | ||
| setExitTo(ROUTES.HOME); | ||
| }, 3000); |
There was a problem hiding this comment.
I guess we can look into the underlying problem later. Is 3 seconds good enough to reliably solve this problem though?
There was a problem hiding this comment.
It's just a security measure that @mateuuszzzzz already wanted to introduce for some edge cases. The worst thing that will happen is that a user will see some transitioning between screens which we wanted to cover, though 😄
There was a problem hiding this comment.
Hmm yes I think we only want to add a setTimeout as a last resort, is there nothing else we can do here?
There was a problem hiding this comment.
I was thinking about it, but I wanted to keep it to make sure we never get a "bootsplash got frozen" situation. I tried to play with state, but I think this is the safest from the UX perspecitve anyways. Also, it won't any additional re-renders/state changes.
I'm not 100% happy with this solution either, but for now I think we can stay with it. When we have some bandwidth in the future I think we can return to this issue to solve it in a cleaner way.
|
@Julesssss Does this require C+ review? If so, then how to test it? |
This will need to be tested internally. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
Conflicts |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊Significant Changes To Duration
Show details
Meaningless Changes To DurationShow entries
Show details
|
|
@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker. |
|
If these are results for pure NewDot, this PR should have no impact on performance - we return early if it's not a HybridApp, therefore we shouldn't get to the |
|
🚀 Deployed to staging by https://github.com/AndrewGable in version: 9.0.15-0 🚀
|
|
@AndrewGable @Julesssss What notifications should we be checking? |
|
@staszekscp Should we test chat notifications in the Hybrid app? |
|
I think more work may be needed here. I had HybridApp crash in the background earlier today while on the latest beta, in response to receiving a push notification: https://expensify.slack.com/archives/C049HHMV9SM/p1722542477949449 |
|
going to check this off so as not to block deploy though |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.0.15-9 🚀
|

cc: @AndrewGable @Julesssss
Details
The PR fixes wrong behaviour of navigation after selecting a push notification. Before the code was less reliable - probably because of usage of
isNavigationReadypromise. That could be the reason why somenavigatecallbacks could be triggered in wrong moment inreleaseconfiguration. As result user wouldn't be able to end up on correct screen.There is an additional part for the PR in
Mobile-Expensifyrepo.Fixed Issues
$ #42379
PROPOSAL: N/A
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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
w_525a888e9061af10633b10b6d174f92ab86dd00d-2024-07-24.06_53_56.834.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop