| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | import { useAtomValue } from "@effect/atom-react"; | 1 | import { useAtomValue } from "@effect/atom-react"; |
| 2 | import { useIsFocused, useNavigation } from "@react-navigation/native"; | 2 | import { StackActions, useIsFocused, useNavigation } from "@react-navigation/native"; |
| 3 | import { scopeThreadRef } from "@t3tools/client-runtime/environment"; | 3 | import { scopeThreadRef } from "@t3tools/client-runtime/environment"; |
| 4 | import { summarizeSubagentStatuses } from "@t3tools/client-runtime/state/subagent-display"; | 4 | import { summarizeSubagentStatuses } from "@t3tools/client-runtime/state/subagent-display"; |
| 5 | import { isActiveSubagentStatus } from "@t3tools/client-runtime/state/subagentRuntime"; | 5 | import { 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 | > |