Skip to content

feat(mobile): show subagent model on child session card and sheet - #5414

Merged
iscekic merged 1 commit into
mainfrom
subagent-model-8caf
Aug 21, 2026
Merged

feat(mobile): show subagent model on child session card and sheet#5414
iscekic merged 1 commit into
mainfrom
subagent-model-8caf

Conversation

@iscekic

@iscekic iscekic commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

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 getChildSessionModelLabel resolves 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 new ChildSessionModelLabel component renders that name as one muted line with a Model: accessibility label.

Files
  • apps/mobile/src/components/agents/child-session-model.ts — adds getChildSessionModelLabel; 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 — adds ChildSessionModelLabel; a muted one-line Text whose accessibility label reads Model: <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 forwards modelOptions through ChildSessionMessage.
  • 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 forwards modelOptions to ChildSessionMessage.

A new optional modelOptions prop 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 resolved modelOptions to MessageBubble and to ChildSessionSheet.
  • apps/mobile/src/components/agents/message-bubble.tsx — accepts modelOptions and forwards it to PartRenderer.
  • apps/mobile/src/components/agents/part-renderer.tsx — accepts modelOptions and forwards it to ToolPartRenderer.
  • apps/mobile/src/components/agents/tool-part-renderer.tsx — accepts modelOptions and forwards it to ChildSessionSection.

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 the Model: row; the picture shows the model value without a visible "Model: " prefix.

sheet-model.png

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 the completed badge.

card-model.png

Verification

One case ran on the iOS platform.

Case What it proves Platform Result
Subagent model on the sheet row and the card label The sheet row and the completed card label show the same model string. iOS passed

No defect was reproduced on the unfixed build.

No recording exists.

Reviewer Notes

No human steps are needed.

Notes: none.

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.
@iscekic iscekic self-assigned this Aug 21, 2026
@kilo-code-bot

kilo-code-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (14 files)
  • apps/mobile/src/components/agents/child-session-message.test.ts
  • apps/mobile/src/components/agents/child-session-model-label.mounted.test.tsx
  • apps/mobile/src/components/agents/child-session-model-label.tsx
  • apps/mobile/src/components/agents/child-session-model.test.ts
  • apps/mobile/src/components/agents/child-session-model.ts
  • apps/mobile/src/components/agents/child-session-section.tsx
  • apps/mobile/src/components/agents/child-session-sheet.mounted.test.tsx
  • apps/mobile/src/components/agents/child-session-sheet.tsx
  • apps/mobile/src/components/agents/message-bubble.tsx
  • apps/mobile/src/components/agents/part-renderer.test.ts
  • apps/mobile/src/components/agents/part-renderer.tsx
  • apps/mobile/src/components/agents/session-detail-content.tsx
  • apps/mobile/src/components/agents/tool-part-renderer.test.ts
  • apps/mobile/src/components/agents/tool-part-renderer.tsx

Reviewed by grok-4.6 · Input: 144.4K · Output: 10.9K · Cached: 312.1K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic added the human-ready The PR is ready for human review. label Aug 21, 2026
@iscekic
iscekic enabled auto-merge (squash) August 21, 2026 10:43
@iscekic
iscekic merged commit 9813d45 into main Aug 21, 2026
18 checks passed
@iscekic
iscekic deleted the subagent-model-8caf branch August 21, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants