Skip to content

iOS: side chats and subagents - #899

Open
jsgrrchg wants to merge 8 commits into
zeronsh:mainfrom
jsgrrchg:zeron/ios-subagents-and-sidechats-implementation
Open

jsgrrchg wants to merge 8 commits into
zeronsh:mainfrom
jsgrrchg:zeron/ios-subagents-and-sidechats-implementation

Conversation

@jsgrrchg

@jsgrrchg jsgrrchg commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Brings side chats and subagents to iOS, matching the desktop.

image image image image
  • Subagents: spawn cards in the transcript open a read-only transcript (live from the parent's host while running, the frozen blob once finished). Session rows show a "● N" pill while subagents run.
  • Side chats: new "Side Chats & Agents" sheet (running agents with live tail, side chats, finished agents; foldable sections). Start a side chat empty (any harness/model until the first send, parent's checkout) or fork one through the last completed reply. From a side chat, both create a sibling.
  • Core: Client::open_subagent, Client::fork_side_chat, NewSession.parent_chat_id, SessionSnapshot::subagents(), SessionRow.running_subagents, exposed over UniFFI.
  • Demo: chat-veil now has 4 side chats, 4 running and 4 finished subagents.
  • Resumed subagents: reopening a subagent live no longer returns a cached frozen copy (which never dials); it switches to the live doc, so a resumed subagent shows its new output.

Testing: new zeron-client demo tests, plus a live test for the resumed-subagent case (the mock edge now serves /blob/); cargo test -p zeron-client -p zeron-mobile passes; app builds, flows checked in the simulator demo. Not yet verified against a real host (relay ForkSideChat, subagent rooms/blobs).

Follow-ups:

  • Desktop: a subagent tab opened from the frozen blob stays frozen while it's open; if the subagent resumes, clicking its card only focuses the stale tab. It should switch to the live doc when the chip goes back to running. (Closing and reopening already works there.)
  • Side chats in the running counter: the "● N" pill on session rows only counts running subagents; it could also count the session's side chats that are working.
  • iOS offline: frozen copies live only in memory; persist them so a subagent already read still shows after a restart without network.

Co-authored-by: Claude Opus 5.5 noreply@anthropic.com


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

jsgrrchg and others added 7 commits October 13, 2026 22:15
Sessions with side chats get a toolbar button that lists them in a sheet;
picking one opens it on top of its parent. Subagent spawn cards in the
transcript are now links to a read-only transcript: finished subagents read
their frozen blob, running ones dial the doc's chat2 room on the parent's
host. Session rows show a "● N" pill while subagents run.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
chat-veil already has a side chat; its CJK turn now spawns a finished
subagent (with its own transcript), so one demo session exercises both.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The session menu and the side chats sheet offer "New Side Chat" and "Fork
into Side Chat", as on the desktop. A new side chat is a composer pushed over
the session: it runs in the parent's checkout and host (sandbox included) but
may pick any harness and model until its first send mints the row, then hands
over to the chat in place. A fork asks the source's host to copy its history
through the last completed reply. From a side chat, both make a sibling.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The side chats sheet becomes "Side Chats & Agents": subagents the session's
agent is running (status glyph, live tail, model), its side chats, and the
subagents that finished. The toolbar badge shows "● N" while subagents run.
SessionSnapshot::subagents() reads them off the transcript's spawn chips.
The demo's chat-veil gets four of each.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Running, Side chats and Finished agents fold under the session list's
section headers (count, chevron, a spinner on Running while folded). The fold
state persists on this device.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A subagent opened finished keeps a frozen core in the warm cache, and that
core never dials. Reopening it live (it resumed) returned the stale copy with
no room. A live open now replaces a cached frozen core with the live doc.
The mock edge serves /blob/ so a live test covers it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
set_status rewrote running_subagents to 0 on every turn transition, so
chat-veil's "● 4" vanished as soon as its live turn finished. It now keeps
the row's count, and the heartbeat also refreshes rows with running
subagents so the pill doesn't go stale.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…nd-sidechats-implementation

# Conflicts:
#	apps/ios/Zeron/Core/Generated/zeron_core.swift
#	apps/ios/Zeron/Transcript/RowView.swift
#	apps/ios/Zeron/Transcript/TranscriptListView.swift
jsgrrchg added a commit to jsgrrchg/comet that referenced this pull request Oct 15, 2026
jsgrrchg added a commit to jsgrrchg/comet that referenced this pull request Oct 15, 2026
…ide chats or main threads

Conflict resolution:
- crates/ui/src/files/sections.rs: keep the deletion from PR zeronsh#895.
- Add the new `native_fork_point: None` field to SessionMessageEntry
  literals introduced by already-merged PRs (zeronsh#895, zeronsh#899/zeronsh#906).
hoangvu12 added a commit to hoangvu12/roboco that referenced this pull request Oct 15, 2026
Android: side chats and subagent viewer (android-next#06, port of upstream zeronsh#899)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant