Repository navigation
feat(mobile): show and drive chat-v3 sessions on mobile - #8157
Closed
harshithmullapudi wants to merge 1 commit into
Closed
harshithmullapudi wants to merge 1 commit into
harshithmullapudi wants to merge 1 commit into
Conversation
Chats that desktop opens over ACP have no PTY, so mobile, which built its session lists from terminals, never showed them. - chat-runtime: listSessions reports whether each session is live. - relay: forward HTTP on /hosts/:id/chat-v3/trpc/* like /trpc/*. - mobile: live chats join the terminal rows (home, tab strip, sessions sheet). A chat tab shows a transcript with approvals, stop, queue controls and the mode picker; the composer sends prompts to it. With the acp-chat flag on, a new Claude/Codex/Pi session opens as a chat.
harshithmullapudi
temporarily deployed
to
preview
October 5, 2026 02:06 — with
GitHub Actions
Inactive
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
harshithmullapudi
temporarily deployed
to
preview
October 5, 2026 02:06 — with
GitHub Actions
Inactive
harshithmullapudi
temporarily deployed
to
preview
October 5, 2026 02:06 — with
GitHub Actions
Inactive
harshithmullapudi
temporarily deployed
to
preview
October 5, 2026 02:06 — with
GitHub Actions
Inactive
harshithmullapudi
temporarily deployed
to
preview
October 5, 2026 02:06 — with
GitHub Actions
Inactive
harshithmullapudi
temporarily deployed
to
preview
October 5, 2026 02:06 — with
GitHub Actions
Inactive
harshithmullapudi
temporarily deployed
to
preview
October 5, 2026 02:06 — with
GitHub Actions
Inactive
|
Found 1 test failure on Blacksmith runners: Failure
|
Contributor
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
6 tasks done
This branch was previously deployed
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.
Stacked on #8150. Fixes SUPER-2600.
Summary
With
acp-chaton, desktop opens Claude, Codex and Pi as chat-v3 sessions with no PTY behind them. Mobile built every session list from PTYs (terminal.list+terminalAgents.list), so those chats never showed on a phone. A terminal switched to chat disappeared from mobile while it was still running.This PR shows those chats on mobile and lets you use them there:
useHostsTerminals, so they show on home, in the workspace tab strip, and in the sessions sheet. Each row has the agent's mark and an attention state (working, waiting for approval, review).acp-chaton, the + sheet opens Claude, Codex and Pi as chats, like desktop does.closeSession. Rename says a chat takes its name from the agent.How it works
chat-runtime:listSessionsrows now carrylive, i.e. whether a harness is still running behind the session. A closed chat keeps its last status forever, so the status alone can't say whether the chat is open. This only adds an output field.relay: the relay forwards HTTP only for/hosts/:id/trpc/*. This PR adds/hosts/:id/chat-v3/trpc/*to the same handler. The host tunnel already forwards any path with its own secret. Mobile chat on local and remote hosts needs this relay deploy. Cloud workspaces are reached directly and don't need it.lib/chatreuses@superset/chat(useChatSession,deriveTimeline, the outbox). It talks to the host through a tRPC client on/chat-v3/trpc, authed with the same bearer as/trpc. The stream socket mints a fresh relay JWT or sandbox token for every dial, so it stands in as a deferred socket until the token resolves. Hermes has nocrypto.randomUUID, so it is filled in fromexpo-crypto.listSessionshas nolivefield, mobile callsgetSessionon the 10 newest sessions that aren't dead. A host with no chat-v3 at all returns no chats.@superset/chat's client types import@superset/chat-runtime. Mobile maps that import to the package source (types only, since Metro strips type imports). That adds no typecheck errors under the Expo config.Compatibility (trpc-compat)
listSessionsgains theliveoutput field. No input changes.getSessionfallback above.Known limitations
listSessionsevery 5 s with the terminals. On a host that never used chat, the first call openschat.db.Tests
bun testinpackages/chat-runtime/src/commands: 9 pass, including a new test forliveon listed sessions.listLiveChatstests (thelivefilter and the old-host fallback) andchatRowstests (outbox/echo keying and the working line). 4 pass.tsc: 27 errors before and after this change, all the existing better-auth ones. None are in the changed files.apps/relaybun test: the same 4http-exchangefailures with and without this change.check:i18n: 12 new strings, translated in all 16 locales.Manual QA
Summary by cubic
Mobile never showed chat-v3 sessions because its session lists came from PTYs, and desktop ACP chats (Claude, Codex, Pi) have no PTY behind them. Live chats now join the terminal rows on home, in the workspace tab strip, and in the sessions sheet, and open a chat tab with a streamed transcript (messages, thoughts, tool calls, plans, notices), approval answering (Deny first), Stop, queue controls (Steer, Delete, Resume), and the approval mode picker. The existing composer sends prompts to the chat, and with
acp-chaton, the + sheet opens those agents as chats instead of terminals.Rollout
listSessionsgains an additiveliveoutput field; hosts without it fall back to probinggetSessionon the newest non-dead sessions.Written for commit f7673f2. Summary will update on new commits.