Skip to content

[Due for payment 2026-07-17] Audit react-navigation patches against upstream and remove stale ones #94997

Description

@Julesssss

Problem

Proposal from @elirangoshen here.

Background: Expensify-App pins react-navigation v7 (native@7.1.33, core@7.16.1, native-stack@7.14.5, stack@7.8.5) and carries custom patches in patches/react-navigation/, applied at install time via patch-package. These patches fall into three groups: re-implementations of fixes upstream declined or hasn't merged, custom features with no upstream equivalent, and build/test workarounds. Each is documented in patches/react-navigation/details.md with a link to its upstream origin. react-navigation v8 exists but is alpha-only as of mid-2026, explicitly subject to change, and its beta is blocked on a react-native-screens rewrite with no announced stable date, so a v8 upgrade is not a near-term option.

Problem: When a patch's documented upstream link is wrong or points to a deleted PR, and a patch silently overrides behavior that upstream has since shipped, then anyone reviewing the patch set must re-trace every patch against upstream from scratch, and we keep applying overrides whose continued need nobody can confirm.

Solution: Audit every patch and bring it to its verified current status against upstream. Concretely: remove @react-navigation+core+7.16.1+002+fix-crash-when-parsing-emoji.patch, whose underlying fix already ships in the installed @react-navigation/core@7.16.1 and which now only strips a String() wrapper that mildly regresses non-string values; remove the stale getStateFromPath.patch entry from details.md (the patch file itself was deleted in June 2025); correct the browser-history patch link from the wrong PR #11887 to the actual origin (PR #12751 plus issue #12460); and annotate the InteractionManager and dontDetachScreen patches with their confirmed status and v8 follow-ups. Because three of those follow-ups (adopting pushParams, migrating InteractionManager consumers to transitionEnd, and replacing dontDetachScreen with inactiveBehavior) depend on the not-yet-viable v8 upgrade, we split the work into (A) the cleanup we ship now and (B) the migrations gated on v8, documented inline so the next reviewer starts from verified ground rather than re-auditing.

Solution

Slight adjustment to removed libraries:

Regarding the InteractionManager patch: we are currently in the process of removing InteractionManager from the codebase. That should be finished soon, and then we’ll be able to remove the patch

Patches related to pushParams and dontDetachScreen have been added to improve performance and to enable side-by-side screen display on wide layouts . We’ll be happy to remove them once a react-navigation version bump is on the horizon 👀

Ship the verified cleanup now: remove @react-navigation+core+7.16.1+002+fix-crash-when-parsing-emoji.patch; drop the stale getStateFromPath.patch entry from details.md; correct the browser-history patch link to PR #12751 plus issue #12460; and annotate the InteractionManager and dontDetachScreen patches with their confirmed status and v8 follow-ups. Defer the patch removals themselves — InteractionManager once #71913 lands, and pushParams/dontDetachScreen once a react-navigation version bump is on the horizon.

Issue OwnerCurrent Issue Owner: @mallenexpensify
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2EngineeringInternalRequires API changes or must be handled by Expensify staff

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions