diff --git a/packages/app/src/components/adaptive-modal-sheet.tsx b/packages/app/src/components/adaptive-modal-sheet.tsx index efa95f27d..a9c282f4f 100644 --- a/packages/app/src/components/adaptive-modal-sheet.tsx +++ b/packages/app/src/components/adaptive-modal-sheet.tsx @@ -101,6 +101,7 @@ export interface AdaptiveModalSheetProps { onClose: () => void; children: ReactNode; snapPoints?: string[]; + stackBehavior?: "push" | "switch" | "replace"; testID?: string; } @@ -110,6 +111,7 @@ export function AdaptiveModalSheet({ onClose, children, snapPoints, + stackBehavior, testID, }: AdaptiveModalSheetProps) { const { theme } = useUnistyles(); @@ -159,6 +161,7 @@ export function AdaptiveModalSheet({ onChange={handleSheetChange} backdropComponent={renderBackdrop} enablePanDownToClose + stackBehavior={stackBehavior} backgroundComponent={SheetBackground} handleIndicatorStyle={styles.bottomSheetHandle} keyboardBehavior="extend" diff --git a/packages/app/src/components/agent-status-bar.tsx b/packages/app/src/components/agent-status-bar.tsx index 8ec96b137..5da615926 100644 --- a/packages/app/src/components/agent-status-bar.tsx +++ b/packages/app/src/components/agent-status-bar.tsx @@ -1,5 +1,5 @@ import { useCallback, useMemo, useRef, useState } from "react"; -import { View, Text, Platform, Pressable } from "react-native"; +import { View, Text, Platform, Pressable, Keyboard } from "react-native"; import { StyleSheet, useUnistyles } from "react-native-unistyles"; import { Brain, ChevronDown, ShieldAlert, ShieldCheck, ShieldOff } from "lucide-react-native"; import { getProviderIcon } from "@/components/provider-icons"; @@ -427,7 +427,10 @@ function ControlledStatusBar({ ) : ( <> setPrefsOpen(true)} + onPress={() => { + Keyboard.dismiss(); + setPrefsOpen(true); + }} style={({ pressed }) => [styles.prefsButton, pressed && styles.prefsButtonPressed]} accessibilityRole="button" accessibilityLabel="Agent preferences" @@ -443,6 +446,7 @@ function ControlledStatusBar({ title="Preferences" visible={prefsOpen} onClose={() => setPrefsOpen(false)} + stackBehavior="replace" testID="agent-preferences-sheet" > {providerOptions && providerOptions.length > 0 ? (