Repository navigation
fix(mobile): show complete subagent details #15189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
juliusmarminge
merged 4 commits into
pingdotgg:main
from
jakeleventhal:t3code/mobile-subagent-info-parity
Oct 3, 2026
+433
−146
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
08af98b
fix(mobile): show complete subagent details
jakeleventhal 3c9e32a
fix(mobile): compact subagent rows in sheet and transcript
jakeleventhal 81395aa
fix(mobile): keep each subagent row one accessibility stop
jakeleventhal 4269ca4
fix(mobile): keep subagent workspace labels for screen readers
jakeleventhal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,145 @@ | ||
| import { scopeProjectRef, scopeThreadRef } from "@t3tools/client-runtime/environment"; | ||
| import { resolveSubagentMetadata } from "@t3tools/client-runtime/state/subagent-display"; | ||
| import type { EnvironmentId, OrchestrationV2Subagent } from "@t3tools/contracts"; | ||
| import type { ReactNode } from "react"; | ||
| import { View } from "react-native"; | ||
|
|
||
| import { AppText as Text } from "../../components/AppText"; | ||
| import { SymbolView } from "../../components/AppSymbol"; | ||
| import { ProviderIcon } from "../../components/ProviderIcon"; | ||
| import { cn } from "../../lib/cn"; | ||
| import { useEnvironmentServerConfig, useProject, useThreadShell } from "../../state/entities"; | ||
| import { subagentCardDetail } from "./subagent-card-presentation"; | ||
| import { SUBAGENT_TONE_TEXT_CLASS, SubagentStatusDot } from "./SubagentStatusDot"; | ||
| import { resolveSubagentRowPresentation } from "./threadAgentsPresentation"; | ||
|
|
||
| type SubagentRowSubagent = Pick< | ||
| OrchestrationV2Subagent, | ||
| | "threadId" | ||
| | "childThreadId" | ||
| | "model" | ||
| | "driver" | ||
| | "providerInstanceId" | ||
| | "title" | ||
| | "prompt" | ||
| | "status" | ||
| | "progress" | ||
| | "result" | ||
| >; | ||
|
|
||
| /** | ||
| * One agent as shown in the Agents sheet and transcript cards: status, model, | ||
| * workspace changes, and recent progress or result. Callers own the press | ||
| * target and pass their own elapsed timer so ticking stays isolated. | ||
| */ | ||
| export function SubagentRow(props: { | ||
| readonly environmentId: EnvironmentId; | ||
| readonly subagent: SubagentRowSubagent; | ||
| readonly elapsed: ReactNode; | ||
| }) { | ||
| const presentation = resolveSubagentRowPresentation(props.subagent); | ||
| const detail = subagentCardDetail(presentation.detail); | ||
| return ( | ||
| <View className="flex-row gap-3"> | ||
| <View className="h-5 justify-center"> | ||
| <SubagentStatusDot tone={presentation.tone} placement="sheet" /> | ||
| </View> | ||
| <View className="min-w-0 flex-1 gap-1"> | ||
| <View className="min-h-5 flex-row items-center gap-2"> | ||
| <View className="min-w-0 flex-1 flex-row items-baseline gap-1.5"> | ||
| <Text | ||
| numberOfLines={1} | ||
| className="min-w-0 shrink font-t3-medium text-sm text-foreground" | ||
| > | ||
| {presentation.title} | ||
| </Text> | ||
| <Text className="shrink-0 text-xs text-foreground-muted">·</Text> | ||
| <Text | ||
| className={cn( | ||
| "shrink-0 text-xs font-t3-medium", | ||
| SUBAGENT_TONE_TEXT_CLASS[presentation.tone], | ||
| )} | ||
| > | ||
| {presentation.statusLabel} | ||
| </Text> | ||
| </View> | ||
| {props.elapsed} | ||
| {presentation.canOpenThread ? ( | ||
| <SymbolView name="chevron.right" size={12} tintColorClassName="accent-icon-subtle" /> | ||
| ) : null} | ||
| </View> | ||
| <SubagentMetadata environmentId={props.environmentId} subagent={props.subagent} /> | ||
| {detail ? ( | ||
| <Text | ||
| numberOfLines={3} | ||
| className={cn( | ||
| "text-xs text-foreground-muted", | ||
| presentation.tone === "failed" && SUBAGENT_TONE_TEXT_CLASS.failed, | ||
| )} | ||
| > | ||
| {detail} | ||
| </Text> | ||
| ) : null} | ||
| </View> | ||
| </View> | ||
| ); | ||
| } | ||
|
|
||
| /** Uses shell data already held by the client, without loading child transcripts. */ | ||
| function SubagentMetadata(props: { | ||
| readonly environmentId: EnvironmentId; | ||
| readonly subagent: SubagentRowSubagent; | ||
| }) { | ||
| const { environmentId, subagent } = props; | ||
| const config = useEnvironmentServerConfig(environmentId); | ||
| const provider = config?.providers.find( | ||
| (candidate) => candidate.instanceId === subagent.providerInstanceId, | ||
| ); | ||
| const parent = useThreadShell(scopeThreadRef(environmentId, subagent.threadId))?.source; | ||
| const child = useThreadShell( | ||
| subagent.childThreadId === null ? null : scopeThreadRef(environmentId, subagent.childThreadId), | ||
| )?.source; | ||
| const parentProject = useProject( | ||
| parent ? scopeProjectRef(environmentId, parent.projectId) : null, | ||
| ); | ||
| const childProject = useProject(child ? scopeProjectRef(environmentId, child.projectId) : null); | ||
| const { modelLabel, workspace } = resolveSubagentMetadata({ | ||
| model: subagent.model, | ||
| provider, | ||
| parentThread: parent, | ||
| childThread: child, | ||
| parentProject, | ||
| childProject, | ||
| }); | ||
| return ( | ||
| <View className="min-w-0 flex-row items-center gap-1.5"> | ||
| <ProviderIcon | ||
| provider={provider?.driver ?? subagent.driver} | ||
| iconUrl={provider?.iconUrl} | ||
| size={12} | ||
| /> | ||
| <Text className="min-w-0 shrink text-xs text-foreground-muted" numberOfLines={1}> | ||
| {provider?.displayName ? `${provider.displayName} · ` : ""} | ||
| {modelLabel} | ||
| </Text> | ||
| {workspace.map(({ label, value }) => ( | ||
| <View | ||
| key={label} | ||
| accessible | ||
| accessibilityLabel={`${label}: ${value}`} | ||
| className="min-w-0 shrink flex-row items-center gap-1.5" | ||
| > | ||
| <Text className="text-xs text-foreground-muted">·</Text> | ||
| <SymbolView | ||
| name={label === "Branch" ? "arrow.triangle.branch" : "folder"} | ||
| size={11} | ||
| tintColorClassName="accent-icon-muted" | ||
| /> | ||
| <Text className="min-w-0 shrink text-xs text-foreground-muted" numberOfLines={1}> | ||
| {value} | ||
| </Text> | ||
| </View> | ||
| ))} | ||
| </View> | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.