@devries-cameron20 / t3code Mirror · read-only / commits / b84e121226
Fork 0

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, 14:30 UTC

fix(mobile): round shared Android sheets and Chat settings (#18547)

Alex committed Oct 27, 2026 at 00:37 UTC b84e121226f595f6d3fe42e0d75a09f5e72afd66
2 files changed +43 -41
apps/mobile/src/components/ui/Sheet.android.tsx
+10 -5
@@ -3,25 +3,30 @@ import { View } from "react-native";
3 import { FormSheet } from "react-native-screens";
4 import { useResolveClassNames } from "uniwind";
5 import { AndroidSheetHeader } from "./AndroidScreenHeader";
6 +import { ScreenContent } from "./ScreenContent";
7 import type { SheetProps } from "./Sheet.types";
8 export type { SheetProps } from "./Sheet.types";
9
10 export function Sheet(props: SheetProps) {
10 - const containerStyle = useResolveClassNames("bg-sheet");
11 + const containerStyle = useResolveClassNames("bg-header");
12 const [isOpen, setIsOpen] = useState(true);
13 return (
14 <FormSheet
15 isOpen={isOpen}
16 detents={[0.5, 0.9]}
16 - prefersGrabberVisible
17 + prefersGrabberVisible={false}
18 nativeContainerStyle={containerStyle}
19 onDismiss={props.onClose}
20 onNativeDismiss={props.onClose}
21 >
22 {/* Android FormSheet does not bound flex children. Material drags target the first scroll view, so place content before the header. */}
22 - <View collapsable={false} className="absolute inset-0 flex-col-reverse bg-sheet">
23 - <View className="flex-1">{props.children}</View>
24 - <AndroidSheetHeader title={props.title} onBack={() => setIsOpen(false)} />
23 + <View collapsable={false} className="absolute inset-0 flex-col-reverse bg-header">
24 + <ScreenContent>{props.children}</ScreenContent>
25 + <AndroidSheetHeader title={props.title} onBack={() => setIsOpen(false)} hideBottomBorder />
26 + <View
27 + pointerEvents="none"
28 + className="absolute top-1 h-1 w-8 self-center rounded-full bg-header-foreground/40"
29 + />
30 </View>
31 </FormSheet>
32 );
apps/mobile/src/features/settings/SettingsFollowUpRouteScreen.tsx
+33 -36
@@ -1,17 +1,15 @@
1 import { ScreenScrollView as ScrollView } from "../../components/ui/ScreenScrollView";
2 import { useAtomSet, useAtomValue } from "@effect/atom-react";
3 -import { useNavigation } from "@react-navigation/native";
3 import { AsyncResult } from "effect/reactivity";
4 import { Platform, View } from "react-native";
5 import { useSafeAreaInsets } from "react-native-safe-area-context";
6
8 -import { AndroidScreenHeader } from "../../components/ui/AndroidScreenHeader";
7 import { AppText as Text } from "../../components/ui/AppText";
10 -import { NativeStackScreenOptions } from "../../native/StackHeader";
8 import { DEFAULT_FOLLOW_UP_BEHAVIOR, type FollowUpBehavior } from "../../lib/followUpBehavior";
9 import { mobilePreferencesAtom, updateMobilePreferencesAtom } from "../../state/preferences";
10 import { SettingsChoiceRow } from "./components/SettingsChoiceRow";
11 import { SettingsSection } from "./components/SettingsSection";
12 +import { SettingsScreen } from "./components/SettingsScreen";
13
14 const FOLLOW_UP_OPTIONS: ReadonlyArray<{
15 readonly behavior: FollowUpBehavior;
@@ -31,7 +29,6 @@ const FOLLOW_UP_OPTIONS: ReadonlyArray<{
29 ];
30
31 export function SettingsFollowUpRouteScreen() {
34 - const navigation = useNavigation();
32 const insets = useSafeAreaInsets();
33 const preferencesResult = useAtomValue(mobilePreferencesAtom);
34 const savePreferences = useAtomSet(updateMobilePreferencesAtom);
@@ -40,39 +37,39 @@ export function SettingsFollowUpRouteScreen() {
37 ? (preferencesResult.value.followUpBehavior ?? DEFAULT_FOLLOW_UP_BEHAVIOR)
38 : null;
39
43 - return (
40 + const content = (
41 + <ScrollView
42 + contentInsetAdjustmentBehavior="automatic"
43 + showsVerticalScrollIndicator={false}
44 + className="flex-1"
45 + contentContainerClassName="gap-3 px-5 pt-4"
46 + contentContainerStyle={{ paddingBottom: Math.max(insets.bottom, 18) + 18 }}
47 + >
48 + <SettingsSection title="While the agent is running">
49 + {FOLLOW_UP_OPTIONS.map((option, index) => (
50 + <SettingsChoiceRow
51 + key={option.behavior}
52 + label={option.label}
53 + description={option.description}
54 + selected={selectedBehavior === option.behavior}
55 + separated={index > 0}
56 + disabled={!preferencesReady}
57 + onPress={() => savePreferences({ followUpBehavior: option.behavior })}
58 + />
59 + ))}
60 + </SettingsSection>
61 + <Text className="px-2 text-sm text-foreground-muted">
62 + Long-press the send button to use the other option for a single message. With a hardware
63 + keyboard, hold Command while sending.
64 + </Text>
65 + </ScrollView>
66 + );
67 +
68 + return Platform.OS === "android" ? (
69 + <SettingsScreen title="Chat">{content}</SettingsScreen>
70 + ) : (
71 <View collapsable={false} className="flex-1 bg-sheet">
45 - {Platform.OS === "android" ? (
46 - <>
47 - <NativeStackScreenOptions options={{ headerShown: false }} />
48 - <AndroidScreenHeader title="Chat" onBack={() => navigation.goBack()} />
49 - </>
50 - ) : null}
51 - <ScrollView
52 - contentInsetAdjustmentBehavior="automatic"
53 - showsVerticalScrollIndicator={false}
54 - className="flex-1"
55 - contentContainerClassName="gap-3 px-5 pt-4"
56 - contentContainerStyle={{ paddingBottom: Math.max(insets.bottom, 18) + 18 }}
57 - >
58 - <SettingsSection title="While the agent is running">
59 - {FOLLOW_UP_OPTIONS.map((option, index) => (
60 - <SettingsChoiceRow
61 - key={option.behavior}
62 - label={option.label}
63 - description={option.description}
64 - selected={selectedBehavior === option.behavior}
65 - separated={index > 0}
66 - disabled={!preferencesReady}
67 - onPress={() => savePreferences({ followUpBehavior: option.behavior })}
68 - />
69 - ))}
70 - </SettingsSection>
71 - <Text className="px-2 text-sm text-foreground-muted">
72 - Long-press the send button to use the other option for a single message. With a hardware
73 - keyboard, hold Command while sending.
74 - </Text>
75 - </ScrollView>
72 + {content}
73 </View>
74 );
75 }