Skip to content

Chat view: read and reply to a live agent session from a phone, no terminal required #133

Description

@karngyan

Why

The phone terminal is the weakest part of flue's mobile story. Forty columns, TUI redraws, a keyboard that fights the viewport, and a key bar standing in for Esc and arrows. It works, and it is the wrong shape: an agent session is a conversation, and a conversation on a phone wants to look like one.

Half of this exists. The agent transcripts are on disk, internal/agentstore indexes all three tools, and the agent viewer (#74) already renders a transcript as messages with paging and a follow mode. What is missing is the other half: knowing which transcript a live session is writing, and a way to reply. flue does not need a vendor API for any of it, because the pty is the input channel.

Happy Coder and Claude Code's own remote control show the shape that wins on a phone: messages, a composer, approve buttons. flue can have it across every machine and every agent, with the real terminal one tap away.

Rough scope

Notes

  • Same wire, same relay. Nothing here adds an HTTP surface; a phone on a relay origin gets the same view as the loopback tab.
  • Thinking blocks and tool calls collapse by default the way the viewer does. Tool results are capped per message on the wire already.
  • Attaching a photo from the phone (Claude and Codex accept image paths) is tempting and is not v1.
  • Sequencing: needs the live agent link first, then read, then write, then prompts. Read plus write is already a better phone than the terminal; prompts as buttons is what makes it complete. Pairs with the composer (Session composer: start agent sessions from any device #112) for starting a session from the phone, and with the session card (Session card: what a session did while you were away, from facts flue already has (no model) #134) for opening one cold.

Where to look

  • web/src/routes/agent-viewer.tsx (paging, follow, virtualization, resume), web/src/agents/view.ts
  • internal/agentstore/read.go (pages), internal/agentstore/types.go (Message, Page)
  • web/src/components/terminal.tsx and web/src/components/key-bar.tsx (the input path and the mobile affordances this view replaces)
  • web/src/sessions/pane-tree.ts and the Multiplex inside a session: splits on desktop, tabs on mobile, and a double-Ctrl scratch terminal #73 tab strip (where the toggle lives)
  • internal/session/snapshot.go:215 (SnapshotForShutdown, the one-shot agent guess)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestepicLarge feature. Decide and break down before building.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions