# Mobile Wall-E Chat Tab Design

## Problem

The phone Wall-E tab used to be a session shortcut plus a large send form. Sending a prompt queued `wall_e.send_message` and pushed the user into the session detail view, so the tab was not a chat destination. This violated the tab model: a bottom navigation item should represent a stable top-level place, not a launcher for another screen.

## Design Principles

- Treat Wall-E as a first-class mobile conversation, not a command form.
- Reuse CTM's mobile conversation-log renderer so prompt/response grouping, Markdown, wrapping, and accessibility stay consistent with session detail.
- Keep the composer close to the conversation with a sticky bottom input, image/file attachment controls, paste support, and queued-send feedback.
- Show session context compactly: title, path, status, diff tags, and a session picker only when multiple Wall-E sessions exist.
- Keep live agent activity compact. A single activity row is enough; empty tool/progress events must not create blank rails or cards.

## External Design Inputs

- Apple HIG: use text views for longer editable text, keep content legible, and keep important UI visible while the virtual keyboard is onscreen.
- Apple HIG: clear affordances and trailing controls are appropriate in text-entry surfaces when they directly help editing.
- Android accessibility guidance: touch targets should be at least 48 x 48 dp, with icon visuals allowed to be smaller inside the target.

## UX Layout

```
Wall-E tab
|-- compact session context
|   |-- Wall-E glyph, title, cwd, diff tags
|   |-- status chip
|   |-- optional session picker
|   `-- Open full session
|-- grouped conversation feed
|   |-- user prompt blob
|   |-- Wall-E response blob with Markdown
|   `-- compact live activity row while thinking
`-- sticky composer
    |-- attachment chips
    |-- image/file buttons
    |-- multiline contenteditable input
    |-- skill autocomplete
    `-- send button
```

## Implementation Notes

- The Wall-E tab uses the same mobile timeline state as detail view, but renders into `#walle-messages` when the detail overlay is closed.
- The phone subscribes with `attach` for Wall-E sessions so CTM replays `walle-history` and delivers `walle-progress` / `walle-response` events to the tab.
- Phone Wall-E sends preserve the remote outbox path and now carry structured uploaded attachments in the `wall_e.send_message` body in addition to text references.
- The service worker and asset query token must be bumped whenever `/m/app.js` or `/m/app.css` changes.

## Verification Requirements

- iPhone-width Wall-E tab shows grouped prompt/response turns in place.
- Send does not navigate away from the Wall-E tab.
- Queued prompt appears optimistically and does not duplicate after delivery.
- Markdown lists, tables, paths, and long lines remain contained with no page-level horizontal overflow.
- Attachment paste/upload uses `/api/mobile/attachments/upload`, not the step-up-protected prompt image endpoint.
- Multiple Wall-E sessions can be switched from the compact context picker.
