Repository navigation
fix: use getRootState, so notification waits until navigation is ready - #100618
chiragsalian merged 2 commits into
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
WojtekBoman
left a comment
There was a problem hiding this comment.
LGTM! Left one small comment :)
|
@chiragsalian 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] |
dylanexpensify
left a comment
There was a problem hiding this comment.
Good from product perspective
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚧 chiragsalian has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.4.75-0 🚀
|
|
🤖 No help site changes required — no draft PR created. This PR changes one internal function in Nothing in the change adds, renames, or removes a feature, tab, setting, button, or copy string, so there is nothing for What I checked
Since no docs changes are needed, there is no linked help site PR to review. If you disagree and want an article covering how push notifications behave in New Expensify, reply with |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.75-3 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.75-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
waitForProtectedRoutesreadnavigationRef.current?.getState()— the container's own copy of the navigation state, which hasrouteNamesstripped until a navigator pushes its state up after mounting. The protected-routes check therefore never passed before the user navigated, so a push notification tap stalled indefinitely. Both the initial check and thestatelistener now usegetRootState().Fixed Issues
$ #98520
PROPOSAL:
Tests
1. Push notification tap on a killed app navigates to the chat
On a simulator, steps 2-3 can be replaced with an injected notification (no APNs registration required):
2. Push notification tap before any in-app navigation
3. Regression — normal navigation is unaffected
new.expensify.com/r/<reportID>).Offline tests
QA Steps
Same as tests, using a real push notification on staging rather than the simulator injection
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
iOS: Native
Screen.Recording.2026-09-08.at.19.00.21.mov