The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 18:15 UTC
feat(mobile): thread header minimizes on the Duo while reading back through history (#24235)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 23, 2026 at 15:45 UTC
eeda2cb2cdf785f3ad26be871afdbf37c2085643
9 files changed
+41
-12
apps/mobile/deps/react-native-screens-5.0.0-t3.36.tgz
Binary files a/apps/mobile/deps/react-native-screens-5.0.0-t3.36.tgz and /dev/null differ
apps/mobile/deps/react-native-screens-5.0.0-t3.37.tgz
Binary files /dev/null and b/apps/mobile/deps/react-native-screens-5.0.0-t3.37.tgz differ
apps/mobile/package.json
+1
-1
@@ -134,7 +134,7 @@
134
"react-native-pdf-jsi": "5.0.0",
135
"react-native-reanimated": "4.7.1",
136
"react-native-safe-area-context": "~5.10.1",
137
- "react-native-screens": "file:deps/react-native-screens-5.0.0-t3.36.tgz",
137
+ "react-native-screens": "file:deps/react-native-screens-5.0.0-t3.37.tgz",
138
"react-native-shiki-engine": "^0.3.12",
139
"react-native-svg": "15.16.0",
140
"react-native-webview": "14.0.1",
apps/mobile/src/Stack.tsx
+9
-1
@@ -147,6 +147,7 @@ const HEADER_SCROLL_EDGE_EFFECTS = nativeHeaderScrollEdgeEffects(Platform.OS, Pl
147
148
type AppScreenOptions = NativeStackNavigationOptions & {
149
readonly unstable_navigationItemStyle?: "editor";
150
+ readonly unstable_headerMinimizationBehavior?: "onScrollUp";
151
};
152
153
const GLASS_HEADER_OPTIONS: AppScreenOptions = {
@@ -169,6 +170,13 @@ const DETAIL_HEADER_OPTIONS: AppScreenOptions = {
170
headerShown: Platform.OS !== "android",
171
};
172
173
+// Like Messages on the Duo: reading back through history (scrolling up) minimizes the
174
+// header, and reversing toward the latest message restores it. Other devices ignore it.
175
+const THREAD_HEADER_OPTIONS: AppScreenOptions = {
176
+ ...DETAIL_HEADER_OPTIONS,
177
+ unstable_headerMinimizationBehavior: "onScrollUp",
178
+};
179
+
180
const SOLID_HEADER_OPTIONS: AppScreenOptions = {
181
headerBackButtonDisplayMode: "minimal",
182
headerBackTitle: "",
@@ -707,7 +715,7 @@ const RootStackConfig = createWorkspaceStackNavigator({
715
Thread: createNativeStackScreen({
716
screen: ThreadRouteScreen,
717
linking: { path: "threads/:environmentId?/:threadId?", alias: ["new/draft"] },
710
- options: DETAIL_HEADER_OPTIONS,
718
+ options: THREAD_HEADER_OPTIONS,
719
}),
720
NewTaskProject: createNativeStackScreen({
721
screen: NewTaskRouteScreen,
apps/mobile/src/features/threads/ThreadFeed.tsx
+13
@@ -96,6 +96,7 @@ import {
96
useRef,
97
useState,
98
useId,
99
+ type ComponentPropsWithRef,
100
type ReactNode,
101
type RefObject,
102
} from "react";
@@ -124,6 +125,7 @@ import { FilePreviewModal, type FilePreviewSource } from "../../components/FileP
125
import { isPdfFile } from "../../lib/filePreview";
126
import { flattenThemeColor } from "../../lib/mobileTheme";
127
import { PresentationSource } from "../../components/ui/NativePresentation";
128
+import { NativeScrollViewMarker } from "../../native/NativeScrollViewMarker";
129
import { useSafeAreaInsets } from "react-native-safe-area-context";
130
import Animated, { FadeIn, FadeInUp, type SharedValue } from "react-native-reanimated";
131
import { useUniwindTheme } from "../../lib/useUniwindTheme";
@@ -751,6 +753,16 @@ function MessageAttachmentUnknown(props: { readonly name: string }) {
753
// LegendList only computes hook visibility when the list has a viewability config.
754
const THREAD_MEDIA_VIEWABILITY_CONFIG = { itemVisiblePercentThreshold: 0 };
755
756
+// The composer and overlays beside the feed keep UIKit from finding it on its own, so
757
+// register it with the screen controller. Header minimization observes this scroll view.
758
+function ThreadFeedScrollView(props: ComponentPropsWithRef<typeof Animated.ScrollView>) {
759
+ return (
760
+ <NativeScrollViewMarker style={{ flex: 1 }}>
761
+ <Animated.ScrollView {...props} />
762
+ </NativeScrollViewMarker>
763
+ );
764
+}
765
+
766
function ThreadMediaVisibility(props: { readonly children: ReactNode }) {
767
const [visible, setVisible] = useState(false);
768
useViewabilityAmount<ThreadFeedEntry>(
@@ -2977,6 +2989,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
2989
// (facebook/react-native#54123); the anchored end space after a send
2990
// is pure inset, so without this the blank region can't be scrolled.
2991
applyWorkaroundForContentInsetHitTestBug
2992
+ {...(Platform.OS === "ios" ? { ScrollViewComponent: ThreadFeedScrollView } : {})}
2993
// Horizontal Duo reservations are already included in the row padding.
2994
contentInsetAdjustmentBehavior={
2995
usesNativeAutomaticInsets
apps/mobile/src/native/StackHeader.tsx
+1
@@ -26,6 +26,7 @@ export type AppNativeStackNavigationOptions = Omit<
26
readonly unstable_headerSubtitle?: unknown;
27
readonly unstable_headerToolbarItems?: unknown;
28
readonly unstable_navigationItemStyle?: unknown;
29
+ readonly unstable_headerMinimizationBehavior?: unknown;
30
};
31
32
function useNativeStackNavigation(): NativeStackNavigationProp<ParamListBase> | null {
apps/mobile/src/native/V5StackHeader.ios.tsx
+7
@@ -5,6 +5,7 @@ import type {
5
} from "@react-navigation/native-stack";
6
import { isValidElement, useEffect, useRef } from "react";
7
import { StyleSheet } from "react-native";
8
+import { isDuoDevice } from "../lib/device-type";
9
import { useMobileNavigationTheme } from "../lib/useMobileNavigationTheme";
10
import { useDeviceType, useNativeLayoutMetrics } from "../native/native-layout-metrics";
11
import {
@@ -13,6 +14,7 @@ import {
14
type HeaderBarButtonMailSearchToolbarItem,
15
type SearchBarCommands,
16
type StackHeaderConfigProps,
17
+ type StackHeaderMinimizationBehaviorIOS,
18
type StackHeaderMenuElementIOS,
19
type StackHeaderMenuIOS,
20
type HeaderBarButtonItemWithMenu,
@@ -26,6 +28,7 @@ type ToolbarItem =
28
| HeaderBarButtonSearchBarPlacementItem;
29
type Options = NativeStackNavigationOptions & {
30
readonly unstable_navigationItemStyle?: "editor" | "navigator";
31
+ readonly unstable_headerMinimizationBehavior?: StackHeaderMinimizationBehaviorIOS;
32
readonly headerSubtitle?: string;
33
readonly unstable_headerSubtitle?: string;
34
readonly headerSubtitleStyle?: { color?: string; fontSize?: number; fontFamily?: string };
@@ -279,6 +282,10 @@ export function V5StackHeader(props: {
282
backButtonHidden={options.headerBackVisible === false}
283
ios={{
284
navigationItemStyle: options.unstable_navigationItemStyle,
285
+ // Opt-ins apply only on the Duo's short display; unset falls back to the system default.
286
+ minimizationBehavior: isDuoDevice(deviceType)
287
+ ? options.unstable_headerMinimizationBehavior
288
+ : undefined,
289
tintColor: options.headerTintColor,
290
searchBar:
291
mailSearch || searchOptions ? (
docs/operations/mobile-screens-fork.md
+1
-1
@@ -1,7 +1,7 @@
1
# Building the mobile Screens dependency
2
3
The mobile v5 stack uses a committed tarball from the
4
-[T3 Screens fork](https://github.com/pingdotgg/react-native-screens/tree/t3-v5.0.0-t3.36).
4
+[T3 Screens fork](https://github.com/pingdotgg/react-native-screens/tree/t3-v5.0.0-t3.37).
5
The fork owns the integration changes; the app does not patch this package.
6
Each archive includes compiled JavaScript, declarations, native source and
7
`t3-fork.json` recording its version, source commit and upstream base.
pnpm-lock.yaml
+9
-9
@@ -553,7 +553,7 @@ importers:
553
version: 7.5.1(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
554
'@react-navigation/native-stack':
555
specifier: 7.21.0
556
- version: 7.21.0(patch_hash=990d575444c4af2ce8218b3b7a8280fe244c03abbdb32b822a2e862f791dbf42)(717295d9841cbe75b29e7bc95e2e9d14)
556
+ version: 7.21.0(patch_hash=990d575444c4af2ce8218b3b7a8280fe244c03abbdb32b822a2e862f791dbf42)(110925a0d7a34aa12f32b4b743079ccc)
557
'@shikijs/core':
558
specifier: 4.2.0
559
version: 4.2.0
@@ -765,8 +765,8 @@ importers:
765
specifier: ~5.10.1
766
version: 5.10.1(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
767
react-native-screens:
768
- specifier: file:deps/react-native-screens-5.0.0-t3.36.tgz
769
- version: file:apps/mobile/deps/react-native-screens-5.0.0-t3.36.tgz(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
768
+ specifier: file:deps/react-native-screens-5.0.0-t3.37.tgz
769
+ version: file:apps/mobile/deps/react-native-screens-5.0.0-t3.37.tgz(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
770
react-native-shiki-engine:
771
specifier: ^0.3.12
772
version: 0.3.12(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
@@ -10675,9 +10675,9 @@ packages:
10675
react: '*'
10676
react-native: '*'
10677
10678
- react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.36.tgz:
10679
- resolution: {integrity: sha512-Fkd/KBWVC8NrGc3sBL7JdK5Zn1+2cw5tU0NxXWlqdkjjar5BntiQNU+NBvALM+NUnB4q7oHykYCQjW4Nk6i67A==, tarball: file:apps/mobile/deps/react-native-screens-5.0.0-t3.36.tgz}
10680
- version: 5.0.0-t3.36
10678
+ react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.37.tgz:
10679
+ resolution: {integrity: sha512-LMm9e8lHseFaUYKF4tFkGkqpJFu36uwp6ZGQgBYksn+pmcx0voaSMkK0tGaZ59LFXXD2TGoBR3K9kAX++72Xig==, tarball: file:apps/mobile/deps/react-native-screens-5.0.0-t3.37.tgz}
10680
+ version: 5.0.0-t3.37
10681
peerDependencies:
10682
react: '*'
10683
react-native: '*'
@@ -15618,7 +15618,7 @@ snapshots:
15618
optionalDependencies:
15619
'@react-native-masked-view/masked-view': 0.3.2(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
15620
15621
- '@react-navigation/native-stack@7.21.0(patch_hash=990d575444c4af2ce8218b3b7a8280fe244c03abbdb32b822a2e862f791dbf42)(717295d9841cbe75b29e7bc95e2e9d14)':
15621
+ '@react-navigation/native-stack@7.21.0(patch_hash=990d575444c4af2ce8218b3b7a8280fe244c03abbdb32b822a2e862f791dbf42)(110925a0d7a34aa12f32b4b743079ccc)':
15622
dependencies:
15623
'@react-navigation/elements': 2.9.45(d8845bac868f4d8a58c8a8f12ad0d4a5)
15624
'@react-navigation/native': 7.5.1(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
@@ -15626,7 +15626,7 @@ snapshots:
15626
react: 19.3.0
15627
react-native: 0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6)
15628
react-native-safe-area-context: 5.10.1(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
15629
- react-native-screens: file:apps/mobile/deps/react-native-screens-5.0.0-t3.36.tgz(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
15629
+ react-native-screens: file:apps/mobile/deps/react-native-screens-5.0.0-t3.37.tgz(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
15630
sf-symbols-typescript: 2.2.0
15631
warn-once: 0.1.1
15632
transitivePeerDependencies:
@@ -21212,7 +21212,7 @@ snapshots:
21212
react: 19.3.0
21213
react-native: 0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6)
21214
21215
- react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.36.tgz(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0):
21215
+ react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.37.tgz(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0):
21216
dependencies:
21217
react: 19.3.0
21218
react-freeze: 1.0.4(react@19.3.0)