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 24, 17:45 UTC
fix(mobile): keep chat composer above the Android gesture bar (#5988)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Pavlo Trinko committed
Aug 11, 2026 at 02:31 UTC
e5c82d79a09e010d1a87c715f405635f8c45f1f7
1 file changed
+10
-2
apps/mobile/src/features/threads/ThreadDetailScreen.tsx
+10
-2
@@ -17,7 +17,11 @@ import type {
17
import * as Haptics from "expo-haptics";
18
import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
19
import { Platform, View, type GestureResponderEvent } from "react-native";
20
-import { KeyboardController, KeyboardStickyView } from "react-native-keyboard-controller";
20
+import {
21
+ KeyboardController,
22
+ KeyboardStickyView,
23
+ useKeyboardState,
24
+} from "react-native-keyboard-controller";
25
import Animated, { FadeInDown, FadeOut } from "react-native-reanimated";
26
import { useSafeAreaInsets } from "react-native-safe-area-context";
27
@@ -183,7 +187,11 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
187
const lastScrolledAnchorMessageIdRef = useRef<MessageId | null>(null);
188
const [composerExpanded, setComposerExpanded] = useState(false);
189
const [anchorMessageId, setAnchorMessageId] = useState<MessageId | null>(null);
186
- const composerBottomInset = composerExpanded ? 0 : Math.max(insets.bottom, 12);
190
+ // Key the safe-area padding on keyboard visibility, not focus: on Android
191
+ // the back gesture closes the keyboard while the editor stays focused, and
192
+ // a focus-keyed inset would leave the toolbar under the gesture bar.
193
+ const isKeyboardVisible = useKeyboardState((state) => state.isVisible);
194
+ const composerBottomInset = isKeyboardVisible ? 0 : Math.max(insets.bottom, 12);
195
const contentPresentationKind = props.contentPresentation.kind;
196
// The raw sync status enters "synchronizing" on every full fetch, cached or
197
// not. Whether messages are already on screen decides the pill label: no