authorgravatar for akole779@mtroyal.caAKolenda <akole779@mtroyal.ca> 2026-10-04 20:02:59-06:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-04 21:02:59-05:00
log01f894e23e031ef32c25a15b518a94f20defea6f
tree3044f8fad8ecb122527bcf8f6702235c64ce2427
parentad5178a31aac09c93159ea152daf00720ca56358
signature Signed by PGP key B5690EEEBB952194

fix(mobile): back from an agent's thread returns to its parent (#15068)


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

apps/mobile/src/features/threads/thread-subagent-group.tsx+9-5
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1import { useAtomValue } from "@effect/atom-react";1import { useAtomValue } from "@effect/atom-react";
2import { useIsFocused, useNavigation } from "@react-navigation/native";2import { StackActions, useIsFocused, useNavigation } from "@react-navigation/native";
3import { scopeThreadRef } from "@t3tools/client-runtime/environment";3import { scopeThreadRef } from "@t3tools/client-runtime/environment";
4import { summarizeSubagentStatuses } from "@t3tools/client-runtime/state/subagent-display";4import { summarizeSubagentStatuses } from "@t3tools/client-runtime/state/subagent-display";
5import { isActiveSubagentStatus } from "@t3tools/client-runtime/state/subagentRuntime";5import { isActiveSubagentStatus } from "@t3tools/client-runtime/state/subagentRuntime";
...@@ -158,11 +158,15 @@ export function ThreadSubagentGroup(props: {...@@ -158,11 +158,15 @@ export function ThreadSubagentGroup(props: {
158 }158 }
159 disabled={threadId === null}159 disabled={threadId === null}
160 onPress={() => {160 onPress={() => {
161 // Push, not navigate: navigate reuses this Thread route, so back
162 // would skip the parent thread.
161 if (threadId !== null)163 if (threadId !== null)
162 navigation.navigate("Thread", {164 navigation.dispatch(
163 environmentId: String(props.environmentId),165 StackActions.push("Thread", {
164 threadId: String(threadId),166 environmentId: String(props.environmentId),
165 });167 threadId: String(threadId),
168 }),
169 );
166 }}170 }}
167 className="rounded-lg px-3 py-3 active:bg-subtle"171 className="rounded-lg px-3 py-3 active:bg-subtle"
168 >172 >