Repository navigation
build(navigation): upgrade react-navigation and react-native-tab-view patches - #73
Closed
BartekObudzinski wants to merge 3 commits into
Closed
BartekObudzinski wants to merge 3 commits into
BartekObudzinski wants to merge 3 commits into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Comment |
Author
|
Closing on the maintainer's standing instruction: pull requests for this work target the official repository only (https://github.com/Expensify/App). Reopening as a draft from the personal fork against Expensify/App main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Upgrade the vendored react-navigation stack for Expensify/App issue 101715 to the newest versions the repo .npmrc min-release-age=7 supply chain gate allows: @react-navigation/native 7.1.33 to 7.4.1, core 7.21.12 to 7.22.1, stack 7.8.5 to 7.11.1, bottom-tabs 7.15.5 to 7.19.1, native-stack 7.14.5 to 7.19.1, material-top-tabs 7.4.19 to 7.7.1, devtools 7.0.52 to 7.1.15, plus regenerating the five react-native-tab-view patches for 4.3.0 to 4.3.2. All thirteen react-navigation patches and five tab-view patches were re-ported with the patch-package --append flow from contributingGuides/PATCHES.md and the reasons are recorded in patches/react-navigation/details.md. Decisions a reviewer needs in order to tell them apart from mistakes: the issue title names 7.11.2 but @react-navigation/native has no 7.11.2 (7.4.1 is the latest) and stack 7.11.2 is blocked by min-release-age=7 until 2026-09-24T20:30:48Z, so this round deliberately ships stack 7.11.1; our native+003 popstate fallback timeout patch was deleted because upstream 7.3.18 PR 13217 absorbed the same 100ms to 1000ms change and re-porting the old hunk would also drop upstream's window.removeEventListener popstate cleanup; a new types-only core+003 patch keeps NavigationContainerRef.getRootState() typed as non-undefined rather than adding nullish branches at 117 call sites; the NavigationContent deprecation added in core 7.22.0 is silenced with two targeted eslint disables rather than migrating createPlatformStackNavigatorComponent to the new render callback inside an upgrade PR; the floating-RHP stack+005 patch from Expensify/App PR 101093 is deliberately not carried because that PR is unmerged and it owns that patch; tests/unit/Navigation/createMemoryHistoryTest.ts was updated because native 7.3.8 commit 788d7c5 made createMemoryHistory.go() reject when the browser never lands on the target entry, replacing the resolve-on-timeout contract that test asserted. Pre-existing unrelated failures in DateUtilsTest, SubscriptionUtilsTest and UnreadIndicatorsTest were reproduced on an unupgraded checkout of the same commit. Deliberately not done here: manual iOS, Android and mWeb QA, which the owner checks himself from a checklist posted as a separate PR comment, and the stack 7.11.2 bump. Delivery target is a DRAFT pull request for owner review, review and merge authority stay with the owner, nothing is marked ready for review, and the manual test plan stays out of the PR body.
What Changed
@react-navigation/*packages (native 7.1.33→7.4.1, core 7.21.12→7.22.1, stack 7.8.5→7.11.1, bottom-tabs 7.15.5→7.19.1, native-stack 7.14.5→7.19.1, material-top-tabs 7.4.19→7.7.1, devtools 7.0.52→7.1.15) andreact-native-tab-view4.3.0→4.3.2 inpackage.json/package-lock.json.core+003patch that keepsNavigationContainerRef.getRootState()typed as non-undefined, and removed thenative+003popstate-fallback-timeout patch now that upstream absorbed the same change.createPlatformStackNavigatorComponent(native and web) to silence the core 7.22NavigationContentdeprecation, and updatedtests/unit/Navigation/createMemoryHistoryTest.tsto match native 7.3.8's new reject-on-timeout behavior forcreateMemoryHistory.go().🤖 Generated with Claude Code
Risk Assessment
✅ Low: Vendored patch re-port with versions, patch content, and details.md exactly matching the stated intent (13 react-navigation + 5 tab-view patches, all correctly referenced per validatePatches.sh, all deviations from the issue title explicitly authorized and documented); the memory-history test exercises real module behavior against real timers/events rather than grepping source; type-only core+003 patch and eslint-disable for NavigationContent are explicitly scoped, documented containments, not silent gaps.
Testing
Installed the branch's dependency tree for real, confirmed every package landed at the exact version the intent specifies, confirmed all 13 react-navigation + 5 tab-view patches applied cleanly and produced the expected code (core+003 types-only getRootState fix, native 1000ms/removeEventListener already present upstream), ran the updated createMemoryHistoryTest live and it passes with the new rejection contract, ran the broader navigation test surface (NavigationTests, HandleExitToNavigationTests, tests/unit/Navigation, tests/unit/libs/Navigation) — all 630+ tests pass against the upgraded, patched packages — and cross-checked the min-release-age=7 gate reasoning against the live npm registry (stack 7.11.2 published 2026-09-17T20:30:48Z, gate clears exactly 2026-09-24T20:30:48Z; native has no 7.11.2 and its latest dist-tag is 7.4.1), all matching the intent's stated constraints exactly.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
npm install (materializes upgraded @react-navigation/* + react-native-tab-view packages and runs patch-package --append patches)npx jest tests/unit/Navigation/createMemoryHistoryTest.tsnpx jest tests/navigation/NavigationTests.tsx tests/navigation/HandleExitToNavigationTests.tsxnpx jest tests/unit/Navigation (618 tests)npx jest tests/unit/libs/Navigation tests/unit/libs/NavigationFocusReturnnpm view @react-navigation/stack time --json / npm view @react-navigation/native versions,dist-tags --json against the real npm registrygrep verification of patched output in node_modules/@react-navigation/core/**/types.* and node_modules/@react-navigation/native/lib/module/createMemoryHistory.js✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.