The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): iPhone Settings search keeps its query after switching tabs (#34893)
Julius Marminge committed
Nov 12, 2026 at 00:18 UTC
59ff9866345e38397e75e7da5b2728144ab4842b
1 file changed
+6
-2
apps/mobile/src/features/layout/workspace/WorkspaceToolbar.tsx
+6
-2
@@ -1,6 +1,6 @@
1
import { useActiveNewTask } from "../../../state/active-new-task";
2
import { Toolbar } from "../../../components/ui/Toolbar";
3
-import { useFocusEffect, useIsFocused } from "@react-navigation/native";
3
+import { useFocusEffect, useIsFocused, useNavigationState } from "@react-navigation/native";
4
import { use, useCallback, useEffect, useRef } from "react";
5
import { isDuoDevice } from "../../../lib/device-type";
6
import { useDeviceType } from "../../../native/native-layout-metrics";
@@ -89,8 +89,12 @@ export function WorkspaceToolbar(props: {
89
? enterSearch()
90
: workspace.dispatch({ type: "search", tab: selectedTab });
91
useHardwareKeyboardCommand("focusSearch", focusSearch);
92
+ // Home draws the Settings list under the `Settings` route, which holds navigation focus.
93
+ const settingsListOnTop = useNavigationState(
94
+ (state) => state.routes[state.index]?.name === "Settings",
95
+ );
96
// The sidebar remains visible while its detail owns navigation focus.
93
- const searchHostVisible = focused || primaryColumn?.presented === true;
97
+ const searchHostVisible = focused || settingsListOnTop || primaryColumn?.presented === true;
98
const restoreSearch = () => {
99
if (
100
searchHostVisible &&