Repository navigation
Fix bottom tab appears on non-root paths after killing and relaunching the app - #104250
Conversation
|
@ZhenjaHorbach 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] |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-10-16.at.17.54.26.movAndroid: mWeb ChromeScreen.Recording.2026-10-16.at.17.54.26.moviOS: HybridAppScreen.Recording.2026-10-16.at.18.03.25.moviOS: mWeb SafariScreen.Recording.2026-10-16.at.18.04.25.movMacOS: Chrome / SafariScreen.Recording.2026-10-16.at.17.57.14.mov |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7342ec4bfc
ℹ️ 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".
| const tabState = createColdStartTabState([SCREENS.INBOX, SCREENS.REPORT]); | ||
|
|
||
| // When the focused tab route is read from that partial state, as the native tab bar does on its first render | ||
| const isAtRoot = isTabRouteAtRoot(tabState.routes.at(tabState.index ?? 0)); |
There was a problem hiding this comment.
Exercise the partial-state branch through the hook
The cold-start cases recompute tabState.routes.at(...) in the test and call the already-existing helper rather than invoking anything changed in useNativeTabNavigator. If the production code were restored to the realized-state-only selection that caused the reported flash, every assertion here would still pass, so this suite does not prevent that regression from returning; test the hook with a partial parent state, or extract the route selection into a shared helper and test that instead.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Makes sense
Let's a bit more tests!
|
Tests failing |
|
Pipeline issues are from main |
…-path-on-relaunch
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@grgia merged main and now all checks pass here |
garrettmknight
left a comment
There was a problem hiding this comment.
Looks good from a product perspective.
|
🚧 grgia 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/grgia in version: 9.5.14-0 🚀
|
|
No help site update needed. This is a bug fix that keeps the bottom navigation bar hidden inside a chat after you relaunch the app, which users already expect, and no article describes the old behavior. |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.5.14-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
On a cold start into a non-root screen (e.g. a chat), the native tab bar showed until the tab navigator's state was realized, because the partial state was treated as no route, which counts as a tab root.
useNativeTabNavigatornow reads the focused tab from the partial state too, so the bar is hidden from the first render. Adds unit tests.Fixed Issues
$ #104237
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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
Android: Native
Screen.Recording.2026-10-16.at.17.30.21.mov
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari