feat(mobile): show subagent model on child session card and sheet - #5414
Merged
Conversation
Add a shared ChildSessionModelLabel and a getChildSessionModelLabel helper that scans child messages from the end for the last assistant message with resolvable model data. Thread the optional modelOptions prop from session-detail-content through MessageBubble, PartRenderer, ToolPartRenderer, and ChildSessionMessage so both the session-page card and the subagent sheet render the model line. Cover the helper, the mounted label, the mounted sheet, and the threading with tests.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (14 files)
Reviewed by grok-4.6 · Input: 144.4K · Output: 10.9K · Cached: 312.1K Review guidance: REVIEW.md from base branch |
iscekic
enabled auto-merge (squash)
August 21, 2026 10:43
pandemicsyn
approved these changes
Aug 21, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
A subagent card in the session transcript now shows the model the subagent used, in a muted line under the task name.
The subagent session sheet now shows the model used, in a muted row under the title.
A new pure helper
getChildSessionModelLabelresolves the model a subagent session ran with. It walks the child transcript from the last message backward and returns the friendly name of the first assistant message whose model resolves, or null when no model data exists. A newChildSessionModelLabelcomponent renders that name as one muted line with aModel:accessibility label.Files
apps/mobile/src/components/agents/child-session-model.ts— addsgetChildSessionModelLabel; it scans child messages from the end and returns the friendly name of the first assistant message with a resolvable model, or null.apps/mobile/src/components/agents/child-session-model-label.tsx— addsChildSessionModelLabel; a muted one-lineTextwhose accessibility label readsModel: <label>.The subagent card and the subagent sheet each render the resolved model as a muted line. The card shows it under the task name and appends it to the card's accessibility label; the sheet shows it in a bordered row under the header. Neither surface renders the line when no model resolves.
Files
apps/mobile/src/components/agents/child-session-section.tsx— resolves the label from the child messages, renders it under the task name, and adds it to the card accessibility label; accepts and forwardsmodelOptionsthroughChildSessionMessage.apps/mobile/src/components/agents/child-session-sheet.tsx— resolves the label from the sheet's messages, renders a bordered muted row under the header, and forwardsmodelOptionstoChildSessionMessage.A new optional
modelOptionsprop carries the session's model catalog from the session detail screen down to the subagent card. The prop is optional at every level, so an existing caller that omits it still renders without a model line. The same options that drive the session model picker also supply the friendly name for the subagent's model.Files
apps/mobile/src/components/agents/session-detail-content.tsx— passes the resolvedmodelOptionstoMessageBubbleand toChildSessionSheet.apps/mobile/src/components/agents/message-bubble.tsx— acceptsmodelOptionsand forwards it toPartRenderer.apps/mobile/src/components/agents/part-renderer.tsx— acceptsmodelOptionsand forwards it toToolPartRenderer.apps/mobile/src/components/agents/tool-part-renderer.tsx— acceptsmodelOptionsand forwards it toChildSessionSection.Tests: 6 files changed — 3 added and 3 extended — cover the helper, the mounted label, the mounted sheet, and the prop threading.
Generated: none.
Visual Changes
Subagent session sheet
The sheet now shows the subagent model below the sheet title.
In the picture, the row under the "Reply with ok" title and the Done button reads
qwen/qwen3.7-plus. The handoff names this theModel:row; the picture shows the model value without a visible "Model: " prefix.Subagent card on the session page
The subagent card label now includes the model.
In the picture, the card shows
general,Reply with ok,qwen/qwen3.7-plus, and thecompletedbadge.Verification
One case ran on the iOS platform.
No defect was reproduced on the unfixed build.
No recording exists.
Reviewer Notes
No human steps are needed.
Notes: none.