Open History to see the last commit
1# Mobile navigation headers
2
3The iOS Home and thread routes share the root native stack in
4[`Stack.tsx`](../../apps/mobile/src/Stack.tsx). Keeping them in one navigation
5controller lets UIKit animate the header between routes. The iPad sidebar owns
6a separate, single-screen stack; Android uses its own in-flow headers.
7
8Home and the iPad sidebar render their brand and connection status through
9`headerTitle`, with `Threads` retained as the route title. The editor-style native
10bar aligns that title on the leading side. Do not model the brand as a toolbar
11button: on iOS 26.5 UIKit morphs a background-free custom leading item's rectangle
12into the next screen's glass back button, even with distinct item identifiers.
13Using the title slot lets the brand and native back button animate separately.
14
15The connection-status title has a maximum width based on its header's width and
16trailing actions. A long environment name or larger text must not push Settings
17into UIKit's overflow menu. Keep the full status as the accessibility label
18while visually truncating it. The iPad sidebar uses its pane width, not the full
19window width.
20
21On iOS 26, UIKit does not recognize Fabric's custom text views when shaping the
22native scroll-edge fade. The screens patch gives custom title subviews an empty,
23non-interactive native label matching their bounds. This supplies the fade's
24geometry without drawing anything or turning the title back into a toolbar item.
25Check the top scroll fade as well as push/pop when changing these title views.
26
27The react-native-screens patch caches leading, trailing, and center item groups
28independently. A button can belong to only one group: constructing another group
29with the same button removes it from the previous one. Unrelated menu updates
30must therefore preserve the other groups while UIKit may be animating them.
31
32Each cache includes the owning header config, its item values, and custom native
33item identities, so changed content or remounted event emitters still rebuild.
34
35Custom header identifiers require native code generation and a new mobile build;
36an over-the-air JavaScript update alone is insufficient. The Android view manager
37implements the generated identifier setter as a no-op because this behavior is
38specific to iOS 26 and later.
39
40After changing a dependency patch, refresh CocoaPods before rebuilding an
41existing iOS project. pnpm installs each patch hash in a different directory;
42an old Pods project can keep compiling the previous directory even though Metro
43and `apps/mobile/node_modules` resolve to the new patch.