Skip to content

iOS header patch: reuse cache key misses hidesSharedBackground and searchController #153

Description

@rynfar

Two latent issues in patches/react-native-screens@4.25.2.patch, adopted in #139
from upstream #8467. Neither is reachable from Pylon's current code, so this is
a watch item rather than a live bug.

Stale grouping when hidesSharedBackground toggles. The reuse cache is keyed
on [subview getUIBarButtonItem] object identity, but -setHidesSharedBackground:
mutates that cached item in place, so toggling the prop on a React header subview
no longer recomputes leading/trailingItemGroups. Before the patch, the presence
of any subview item forced a rebuild every pass. Not reachable today because
Pylon only sets that prop on dict-based items, which are in the key.

Reuse key omits navitem.searchController. The searchBarPlacement branch of
barButtonItemsFromConfigs: builds items from it, so a first pass taken before
the search bar subview mounts can be cached permanently. Newly reachable for
screens with React header subviews; not exercised by current Pylon mobile code.

Both become live the moment a header search bar or a hidesSharedBackground
toggle lands on a screen with React header subviews. Worth re-checking during the
next mobile device pass.

Activity

  1. rynfar commented on Sep 24, 2026

    @rynfar
    CollaboratorAuthor

    Current source audit found two cache dependencies still missing after the 4.26.2 patch upgrade: leading/trailing UIBarButtonItemGroup reuse does not reflect a stable React subview item's changed hidesSharedBackground, and toolbar reuse can retain an earlier search bar when navitem.searchController mounts or changes later. PR #747 updates those keys and the patch lockfile hash. The patch applies under a frozen offline install, and an independent source reviewer checked the cache dependencies and iOS guards.

    The affected native screen path has not been exercised on a live iOS simulator/device here, so this issue remains open pending native behavior proof and green PR checks.

  2. rynfar commented on Sep 24, 2026

    @rynfar
    CollaboratorAuthor

    Acceptance update: the native compilation gap in my earlier comment is now closed at the combined, unmerged source level. The independently reviewed v14 rehearsal head a65e0cb2f42b2e63a9c6caafe0ec49bba660f8ec contains PR #747's 0a877c06b4518370e2bfdd1115612c68444b5f3b as an ancestor. Its react-native-screens@4.26.2 patch hashes to ab7c425e2a585ad5733de4ad4aa4022574455ef5a907c5f54d6196d719521d97, matching the lockfile and installed patched package. The installed RNSScreenStackHeaderConfig.mm contains the hidesSharedBackground and search-bar cache-key changes.

    An isolated unsigned arm64 iOS Simulator full-app build using the iOS 26.2 SDK compiled that exact patched RNSScreenStackHeaderConfig.mm into RNScreens (CompileC at build log line 22732) and ended ** BUILD SUCCEEDED ** (line 87667). Build evidence is /tmp/pylon-catchup-20260924/open-pr-v14-ios-build.md; the build did not boot, install, or launch the app. This establishes native compile compatibility of the combined source, not runtime cache behavior.

    This issue remains open: toggle hidesSharedBackground on a mounted React header subview and attach/replace its search controller after an earlier cached pass, then observe the groups/search UI on an iOS 26 simulator/device. PR #747 is still open and needs its normal merge approval. No visual/device acceptance is claimed from compilation.

  3. rynfar commented on Sep 26, 2026

    @rynfar
    CollaboratorAuthor

    PR #747 merged the native cache-key correction after green CI and a successful iOS 26.3 Simulator build of patched RNScreens. The isolated Threads search smoke test passed; screenshots and exact scope are on #747. The two cache transitions in this issue remain unreachable from current Pylon screens, so direct visual reproduction has not been established. Keep this issue open as the fixture/future-screen verification trigger.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions