> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tuturuuu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mira web chat on phones

> Compact layout, recent chats and retryable replies for the dashboard Mira chat below the sm breakpoint.

The Mira chat on the workspace home (`/{locale}/{wsId}`, including
`/personal`) follows the mobile app's compact layout on viewports narrower
than Tailwind's `sm` breakpoint (640px). Tablet and desktop layouts keep the
full toolbar, name heading and two-line quick-action cards.

## Phone layout

* **Top bar.** One row that never wraps: the workspace-context selector, New
  conversation and an icon-only overflow menu (export, view only, fullscreen).
* **Home.** One greeting line, four one-line quick actions in two columns and
  up to five recent chats.
* **Composer.** One row: a leading options button, the message field and Send.
  The options menu holds attachments, Live, the model picker, Fast/Thinking
  mode and the credit source. The field uses 16px text so iOS Safari does not
  zoom the page when it takes focus.
* **Thread.** Avatars and visible name labels drop (names stay available to
  screen readers). User bubbles are capped at 85% of the thread width.
* **Touch targets.** Every control below `sm` is at least 44px tall and wide.
* **Keyboard.** When the on-screen keyboard shrinks the visual viewport while
  the composer has focus, the composer scrolls back into view.

## Recent chats

The empty home lists the viewer's five newest titled chats from
`GET /api/v1/ai/chats` at every width. Selecting one stores it as the
workspace's current Mira chat and remounts the panel, which restores it
through the existing chat-restore path. The section stays hidden while it
loads, when the request fails and when there is no history.

## Failed replies

A failed reply that is not a credit or plan denial shows an inline alert above
the composer, replacing the transient toast. Retry regenerates the reply from
the last user message, so the prompt is not added to the thread again. The
alert clears when the viewer retries, dismisses it, sends a new message or
starts a new conversation. ChatGPT-plan requests keep their provider-specific
message. Credit and plan denials keep the existing denial banner.

## Regression coverage

Component tests next to the chat components cover the phone contract:
`mira-chat-phone-layout.test.tsx` (header, empty state, composer),
`mira-composer-options.test.tsx`, `mira-recent-chats.test.tsx`,
`mira-chat-stream-error.test.tsx` and `use-mira-keyboard-avoidance.test.tsx`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.