authorgravatar for akole779@mtroyal.caAKolenda <akole779@mtroyal.ca> 2026-10-05 07:27:23-06:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-05 08:27:23-05:00
log1604ccc9d79f5270fb8e14d60664184bf142c4cb
tree3a760280349a489bf1803d6f2475aa51735406fe
parent1a3f7ad5085606463a602bd756ca9c04d106fffe
signature Signed by PGP key B5690EEEBB952194

fix(mobile): back from a finished subagent in the feed returns to its parent (#15844)


1 files changed, 9 insertions(+), 5 deletions(-)

apps/mobile/src/features/threads/thread-work-log.tsx+9-5
...@@ -18,7 +18,7 @@ import { type AppSymbolName, SymbolView } from "../../components/AppSymbol";...@@ -18,7 +18,7 @@ import { type AppSymbolName, SymbolView } from "../../components/AppSymbol";
18import { MaskedView } from "@expo/ui/community/masked-view";18import { MaskedView } from "@expo/ui/community/masked-view";
19import type { LegendListRef } from "@legendapp/list/react-native";19import type { LegendListRef } from "@legendapp/list/react-native";
20import { AnimatedLegendList } from "@legendapp/list/reanimated";20import { AnimatedLegendList } from "@legendapp/list/reanimated";
21import { useIsFocused, useNavigation } from "@react-navigation/native";21import { StackActions, useIsFocused, useNavigation } from "@react-navigation/native";
22import {22import {
23 memo,23 memo,
24 useCallback,24 useCallback,
...@@ -1004,10 +1004,14 @@ const ThreadWorkLogRow = memo(function ThreadWorkLogRow(...@@ -1004,10 +1004,14 @@ const ThreadWorkLogRow = memo(function ThreadWorkLogRow(
1004 accessibilityState={canExpand ? { expanded } : undefined}1004 accessibilityState={canExpand ? { expanded } : undefined}
1005 onPress={() => {1005 onPress={() => {
1006 if (notifiedSubagentThreadId !== undefined) {1006 if (notifiedSubagentThreadId !== undefined) {
1007 navigation.navigate("Thread", {1007 // Push, not navigate: navigate reuses this Thread route, so back
1008 environmentId: String(props.environmentId),1008 // would skip the parent thread and land on Home (matches #15068).
1009 threadId: String(notifiedSubagentThreadId),1009 navigation.dispatch(
1010 });1010 StackActions.push("Thread", {
1011 environmentId: String(props.environmentId),
1012 threadId: String(notifiedSubagentThreadId),
1013 }),
1014 );
1011 return;1015 return;
1012 }1016 }
1013 if (canExpand) {1017 if (canExpand) {