Skip to content

fix(ios): closing iOS 27's integrated search reports a cancel - #15

Open
josh-hurst wants to merge 124 commits into
pingdotgg:t3/mainfrom
josh-hurst:t3/search-dismiss-cancel
Open

josh-hurst wants to merge 124 commits into
pingdotgg:t3/mainfrom
josh-hurst:t3/search-dismiss-cancel

Conversation

@josh-hurst

@josh-hurst josh-hurst commented Nov 17, 2026 •

Copy link
Copy Markdown

On iOS 27, the X beside an integrated search field (placement: "integratedButton") deactivates the UISearchController from its own bar button. UIKit empties the field, but calls neither searchBarCancelButtonClicked: nor searchBar:textDidChange:. JS gets only onBlur, so T3 Code keeps filtering by a query the field no longer shows.

This still happens on iOS 27.2 with current T3 Code main (d848e4b2b2, screens t3.58): on the simulator, Settings stays filtered after X and reopening search shows the old query. So the OS hasn't fixed pingdotgg/t3code#29489.

An alternative to #8. #8 fixes the X too, but it also loses a live query when you switch tabs. A tab switch dismisses search through RNSStackScreenController -viewWillDisappear:, and UIKit empties the field as it does. Nothing #8 checks to detect navigation changes on a tab switch: there's no transition coordinator and topViewController is still the host. So its new text sync reports the emptied field as onChangeText("").

I applied #8 to this same t3/main and ran it in T3 Code on the iOS 27.2 simulator. Switching Chats → PRs and Settings → Chats each cleared the query of the tab being left. With this change, both queries are kept and restored.

How this one tells them apart. Instead of recognising navigation after the fact, Screens marks its own dismissals where they happen.

  • +[RNSSearchBar deactivateSearchController:] deactivates a controller without reporting a cancel. These callers now use it:
    • RNSStackScreenController -viewWillDisappear:
    • RNSHeaderCoordinator -applySearchBar:
    • the setActive(false) and cancelSearch commands.
  • RNSSearchBar is now the controller's delegate. On iOS 27+, willDismissSearchController: runs the existing cancel path (clear the text, onCancelButtonPress, onChangeText("")) for any other dismissal. It skips the dismissal when:
    • the screen is out of the window;
    • the screen is mid-transition;
    • this presentation already reported a cancel.

Verified in T3 Code on an iOS 27.2 simulator (iPhone 18 Pro). These were run on Chats, PRs and Settings, which share one integrated search, with event order logged from the JS handlers:

  • X with the keyboard up, or after scrolling dismissed it: one cancel, then "". The full list returns, and reopening search starts empty.
  • Scrolling the results: blur only, and the query stays.
  • Switching tabs with a live query and coming back: no cancel, and the query is restored.
  • Opening a result and going back (PRs, Settings): no cancel, and the query stays.

It's also running as a Release build on an iPhone with iOS 27.2.

Gaps.

Bumps the version to 5.0.0-t3.59.

Written by Claude Opus 5.5 in Claude Code, in T3 Code.

🤖 Generated with Claude Code

Note

Fix iOS 27 integrated search close reporting a cancel instead of dismiss

  • On iOS 27, dismissing the integrated search controller no longer emits a cancel event when the user closes search, fixing the behavior where closing search reported a cancel.
  • RNSSearchBar now conforms to UISearchControllerDelegate and tracks a per-presentation cancel-emitted flag, reset in willPresentSearchController: and didDismissSearchController: in RNSSearchBar.mm.
  • Adds a class helper deactivateSearchController that marks deactivation as React Native Screens-initiated, so dismissal handling skips emitting cancel. Internal deactivation paths in RNSHeaderCoordinator, RNSStackScreenController, and RNSSearchBar now route through this helper.
  • Risk: willDismissSearchController: on iOS 27+ invokes the cancel handler when no cancel was emitted and dismissal was not helper-initiated; check this logic if duplicate or missing cancel events appear on other iOS versions.

Macroscope summarized a6ad4d0.

t0maboro and others added 30 commits September 8, 2026 13:12
The header config, its items and spacers and the per-screen header coordinator are used by
every container that hosts a stack of screens, so they stop carrying the `Stack` name and living
under `ios/stack`: `RNSStackHeader*` becomes `RNSHeader*` in `ios/header`,
`RNSStackScreenHeaderCoordinator` becomes `RNSHeaderCoordinator`, the iOS Fabric components are
`RNSHeaderConfigIOS`, `RNSHeaderItemIOS` and `RNSHeaderItemSpacerIOS` (specs in
`src/fabric/header`), and the shared C++ shadow nodes follow. The Android header stays a Stack
feature: `RNSStackHeaderConfigAndroid`, `RNSStackHeaderSubview` and their Kotlin side are
untouched. Mechanical rename, no behavior change; the public JS API of `Stack.HeaderConfig` is
unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C43Zo2sKs9JZ7GfJJGLjyg
…elpers/stack and type it on RNSStackScreenProviding

`RNSStackNavigationController` with its navigation bar and bar coordinator, `RNSStackOperation`,
`RNSStackOperationCoordinator` and `RNSViewFrameChangeDelegate` are the machinery any container
needs to host a stack of screens, not a part of the `Stack.Host` component; they move to
`ios/helpers/stack` (the SPM header search paths gain the directory).

The coordinator, the operations and the navigation controller take their screens as
`UIView<RNSStackScreenProviding>` instead of `RNSStackScreenComponentView`, so that any React view
whose controller can live on the stack's navigation controller may be a stack item. The protocol
lives next to that machinery and `RNSStackScreenActivityMode` moves to its header. The navigation
controller resolves the content scroll view of its top screen through `RNSContainerItem` instead of
the `RNSStackScreenController` class, which is the only Stack v5 type it still referenced. Types
only, no behavior change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C43Zo2sKs9JZ7GfJJGLjyg
…dent of the screen class

`RNSStackScreenHeaderCoordinator` works on any `UIViewController` (it only touches the navigation
item and the navigation controller), `RNSStackScreenProviding` exposes the screen's header
coordinator, and `RNSStackHeaderConfig` resolves its screen through the protocol instead of
asserting on `RNSStackScreenComponentView`. No behavior change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C43Zo2sKs9JZ7GfJJGLjyg
…mn navigation controller

`RNSSplitColumnController` is a native object without a React counterpart: it creates the
navigation controller installed in a UISplitViewController column, observes the origin of its
view through `RNSSplitColumnFrameObserver` and reports it to the host. The host creates one
controller per column on the first update and only swaps their root screen controllers
afterwards, instead of rebuilding navigation controllers on every children update.

`RNSSplitNavigationController` and its frame origin delegate are replaced by the column
controller and its delegate.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C43Zo2sKs9JZ7GfJJGLjyg
Every Split column is a navigation stack of `RNSSplitScreen`s. `Split.Column` with a `Split.Stack`
child renders no native view: it only provides the column index through context, and its
`Split.Screen`s (prop `column`) mount directly in the host. A plain `Split.Column` is a one-screen
column as before. Nothing between the host and the screens is a React view, so no view of the
React tree hangs outside the UIKit hierarchy.

Natively, `RNSSplitColumnController` owns the column's `RNSStackNavigationController` and drives
its stack the way `RNSStackHostComponentView` drives a standalone stack, through
`RNSStackOperationCoordinator` over the screens as `UIView<RNSStackScreenProviding>`. The host
routes each mounted screen to its column by index; screens mounted before the host controller
exists (it is created on `didMoveToWindow`) are replayed then. A screen popped natively reports
`onDismiss({ isNativeDismiss: true })`; its React unmount does not pop it again, because a pop is
only requested for a screen still on the column's navigation stack.

The column frame reported to the shadow tree comes from the navigation controller's view, not
from the screen view UIKit animates during transitions, and the screen controller is released a
turn after `invalidate` so that a pop pending after the mounting transaction still finds it.

JS API: `Split.Stack`, `Split.Screen` (`activityMode`, `screenKey`, `onDismiss`), scenario
`test-split-stack-columns-ios` following the Stack detach protocol (detach, then unmount on
`onDismiss`).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C43Zo2sKs9JZ7GfJJGLjyg
`RNSSplitScreen` accepts `RNSHeaderConfig` exactly like `RNSStackScreen`: the config is a subview
of the screen, its items stay out of the view hierarchy, and `RNSHeaderCoordinator`, now owned by
`RNSSplitScreenController` and exposed through `RNSStackScreenProviding`, applies it to the
screen's navigation item in the column's `RNSStackNavigationController`. Without a header config
a column keeps the system navigation bar as before.

JS API: `Split.HeaderConfig` with its own `SplitHeaderConfigProps`; it renders the same neutral
header config as `Stack.HeaderConfig`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C43Zo2sKs9JZ7GfJJGLjyg
Keep split column controllers installed while their logical stacks are empty. Use a native placeholder for collapsed UIKit navigation, pop removed screens in native stack order, and defer split operations until transitions finish.

Based on the Split.Stack prototype by Tomasz Boroń in [software-mansion#4666](software-mansion#4666) at b604a9f. The prototype commits and their author credit remain unchanged.
Expose UIKit's navigator, browser, and editor styles through ios.navigationItemStyle with navigator reset behavior. Refresh existing title content when UIKit leaves an iOS 26 bar's style layout stale.

Includes FabricExample coverage and native layout regression scenarios. Adapted from Julius Marminge's local RNS v5 patch.
PixPMusic and others added 28 commits October 22, 2026 22:20
A ScrollViewMarker inside a Split.Screen found no RNSScrollViewSeeking
ancestor, so the screen's controller never got a content scroll view.
UIKit then could not observe the scroll view for navigation bar
minimization (navigationBarMinimization) or scroll-edge appearance.
Split screens now register it with their controller like stack screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ation

fix(ios): split screens register their content scroll view (t3.37)
…-search

fix(ios): preserve integrated search across tab and sidebar transitions
A split that floats its sidebar in portrait used to learn about a rotation
only after JS saw the new size, so the sidebar changed in a second animation
after the rotation. The host now picks the portrait or default configuration
in viewWillTransitionToSize, so the column change animates with the rotation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ay-mode

feat(ios): split hosts take a portrait split behavior and display mode (t3.44)
Wide inner displays such as the Galaxy Z Fold 8 report book posture as landscape, so
the portrait-only check kept their sheets centered across the hinge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(android): form sheets sit beside a vertical hinge in landscape book posture (t3.50)
A tab shown for the first time attaches its stack and builds its header while
on screen, and UIKit faded the bar's title in. Applying the selection and its
layout without animation shows the title at once, like a revisited tab.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…animation

fix(ios): a tab's title no longer fades in on its first visit (t3.55)
feat(ios): Tabs.Screen can prewarm its bar items before its first visit (t3.57)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat: cover a tab until it's ready, and let a column screen skip its push animation
iOS 27's integrated search closes through its own X, which deactivates the
UISearchController without calling searchBarCancelButtonClicked:, so JS saw
only a blur and kept its query. RNSSearchBar now acts as the controller's
delegate and reports a dismissal the user caused as a cancel. Deactivations
Screens or JS request (a screen disappearing, a replaced search bar, the
setActive and cancelSearch commands) go through
+[RNSSearchBar deactivateSearchController:] and are not reported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 93d220dc-9fb7-4852-950d-6cb082d58ac8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants