# Message composer

> The box at the foot of every chat and thread where you type, @mention, dictate, attach files and pictures, edit a sent message and send.

Source: https://air.build/docs/screens/chat/message-composer/

The message composer is the box at the foot of every chat and every thread. You type there, @mention Agents and people, speak instead of typing, add files and pictures, and send. It is also where you change the words of a message you already sent.

When it's empty and not in use, the composer is a single-line capsule: **+** on the left, the text in the middle, the microphone on the right. When you start typing, or when it holds text or files, it opens into a card: the text takes the full width at the top, and **+**, the microphone and the send button move to a row along the bottom.

## Open it

**iPhone**

Open any chat. The composer is at the bottom, above the keyboard. Tap it to start typing. In an open thread it's at the foot of the thread, and the cursor is put there for you.

Tap anywhere outside the composer to put the keyboard away. The composer folds back to a capsule if it's empty.

**Mac**

Open any chat. The composer is at the bottom of the chat. Click it to start typing. You can click anywhere on the composer, including the empty space around the buttons, to put the cursor in the text. In an open thread the cursor is put in the thread's composer for you.

Click anywhere outside the composer to leave it.

The composer is dimmed and doesn't take input where there's no chat for a message to go to.

## What's on it

From top to bottom:

| Item | What it shows or does | When it shows |
| --- | --- | --- |
| Notice | A line with a warning triangle saying why a file couldn't be added or uploaded. See [Messages](https://air.build/docs/screens/chat/message-composer/#messages). It goes away the next time you add something or send. | After an add or upload failed. |
| Attachments | One square chip per file or picture, with its preview (a document icon when there's none). See [Attachments](https://air.build/docs/screens/chat/message-composer/#attachments). | When you've added files. |
| Mention list | People and Agents you can @mention, with picture, name and role. See [@mention someone](https://air.build/docs/screens/chat/message-composer/#mention-someone). | While you type **@** and a name at the end of your text. |
| Text | Where you type. Empty, it reads "Type a message…" in a chat and "Reply to thread…" in a thread. While you dictate it reads "Listening…", then "Transcribing…". | Always. |
| **+** (**Add Attachment**) | iPhone and iPad: opens the **+** menu. Mac: opens a window to choose files. See [Add files and pictures](https://air.build/docs/screens/chat/message-composer/#add-files-and-pictures). | Always. |
| Microphone (**Dictate**) | A round button. Starts dictation. See [Dictate](https://air.build/docs/screens/chat/message-composer/#dictate). | Always; while dictating it's replaced by the stop button. |
| Stop (**Stop Dictation** / **Cancel Dictation**) | A waveform while it's recording: tap to stop and turn the recording into text. A spinner while the microphone starts or the recording is being turned into text: tap to call it off. | While dictating. |
| Send (**Send**) | An up arrow on a round button in your accent color. Sends the message. | Only when there's something to send: words other than spaces, a file, or a message being forwarded. |

The text grows as you type. On iPhone and iPad it grows to 9 lines, then scrolls. On Mac it grows to a set height, then scrolls.

Above the composer, the chat can show capsules that belong to it. Two of them are about the composer:

| Capsule | What it does |
| --- | --- |
| **Editing Message** with ✕ | You're changing a message you sent. Tap it (**Cancel Editing**) to stop: the text you had typed before comes back. |
| The name of who wrote a message, and its first line | You're forwarding that message into this chat. Tap it (**Cancel Forwarding**) to stop forwarding. |

Other capsules there, such as **Jump to Newest** and unread counts, are on the [Conversation](https://air.build/docs/screens/chat/conversation/) page.

## Type and send

**iPhone**

- Tap the send button to send.
- Return on the on-screen keyboard starts a new line. It never sends.
- With a hardware keyboard, ⌘Return presses **Send**. Return, ⇧Return and ⌥Return start a new line.
- 
- Return presses **Send**, and so does ⌘Return. You can also click the send button.
- ⇧Return or ⌥Return starts a new line.

- When you type Chinese, Japanese or another language with an input method, Return picks the word you're choosing; it doesn't send.
- Spaces and line breaks at the start and end of a message are taken off. A message of only spaces can't be sent: the send button doesn't show.
- You can send files with no words.
- The keyboard stays up after you send, ready for the next message.
- In a thread, every message you send goes to that thread. See [Thread](https://air.build/docs/screens/chat/thread/).

### Replies

**Reply** on a message in the chat opens its thread, with the composer at its foot. The composer itself shows no quote of the message you're replying to: the open thread is the reply. See [Thread](https://air.build/docs/screens/chat/thread/).

## @mention someone

1. Type **@** where a new word starts (not straight after a letter or number, so an email address doesn't open the list). The list appears above the text with everyone you can mention.
2. Keep typing to narrow it. A row stays when its name, its ID or its role starts with what you typed. Names and roles in any language match.
3. Pick a row:
   - Tap or click it.
   - Or press Return or Tab: either one picks the highlighted row, which is the first one until you move. The arrow keys move the highlight.

Picking an Agent puts **@** and the Agent's ID in your text, with a space after it. Picking a person puts **@** and their name. The list closes.

Who's in the list:

| Chat | Who you can mention |
| --- | --- |
| Project | The Project's Agents, then the people in the Team. |
| Group chat | The group's Agents, then the people in the group. |
| Chat with one Agent | That Agent. |

You're never in the list. Up to five rows show at a time; scroll for more.

- Esc closes the list without changing your text. Typing another letter brings it back.
- The list only follows a mention at the very end of your text. If you go back and type an **@** earlier in the text, no list opens; a name you type out in full still mentions that Agent.
- ⌘Return, ⇧Return and ⌥Return are never taken by the list: ⌘Return still presses **Send**, and the others still start a new line.

## Add files and pictures

**iPhone**

Tap **+**. A menu grows out of it, over the keyboard:

| Item | What it does |
| --- | --- |
| **Camera** | Opens the camera in a panel at the bottom of the screen. See [Camera](https://air.build/docs/screens/chat/camera/). Dimmed when the device has no camera. |
| **Photos** | Opens your photos in a panel at the bottom of the screen. See [Photo picker](https://air.build/docs/screens/chat/attach-photos/). |
| **Files** | Opens the Files picker. Choose one or more files. |
| **Sketch** | Opens a full-screen page to draw on. See [Sketch](https://air.build/docs/screens/chat/sketch/). |

To close the menu, tap **+** again or tap outside it. If the keyboard was up when you tapped **+**, it comes back after you finish with **Files**, **Sketch** or **All Photos**.

While the menu or a panel is open, Return on a hardware keyboard doesn't send.

On iPad, and on iPhone Duo's inner screen beside the sidebar, the menu and the Camera and Photos panels line up with the composer, not with the edge of the screen.

**Mac**

Click **+**. A window opens to choose files; you can choose more than one. There's no camera, Photos or Sketch on Mac: the file window can browse your Photos library.

On every device you can also:

- **Paste** a picture, a PDF, or a file you copied. Plain text pastes as text, except text over 1,000 characters, which is added as a file named **Pasted Text.txt** instead.
- **Drag** files or pictures onto the composer, or anywhere on the chat. The chat is highlighted while you drag over it. Links and plain text dragged in are not added as files. An archived chat doesn't take files.

What the app does with what you add:

- Files go up as they are. HEIC photos are changed to JPEG so Agents can open them.
- A package (for example an app, an icon file or a Pages document) is zipped and added as a **.zip**.
- A folder isn't added. Compress it first.
- Large videos are compressed before they upload.
- A picture or file with no name gets one: **Photo**, **Video**, **File**, **Pasted Image** or **Untitled**. A drawing from **Sketch** is named **Sketch**, and a screenshot taken from a preview is named **Screenshot**.

### Limits

| Limit | Size |
| --- | --- |
| One file | 1 GB. A video can be picked when it's larger, but it must be 1 GB or less after it's compressed. |
| An archive (zip and similar), uncompressed | 4 GB |
| Text pasted into the composer | 1,000 characters; longer text becomes a **Pasted Text.txt** file. |

## Attachments

Each file you add is a chip in a row at the top of the composer. The row scrolls sideways when it's full.

| Part | What it does |
| --- | --- |
| Preview | A picture shows itself; a PDF or text file shows a preview; other files show a document icon. |
| ✕ (**Remove Attachment**) | Removes the file from the message and stops its upload. |
| Progress ring | Fills while the file uploads. On a picture, the picture is darkened under it. It closes when the upload is done. |
| An exclamation mark in a circle (**Retry Upload**) | The upload failed. Tap it to upload again. |

VoiceOver reads each chip's state: "Uploading" with the percent done, "Upload failed" or "Ready to send".

- **Upload as you go.** Each file starts uploading the moment you add it. You don't have to wait: you can send while files are still uploading. The message shows in the chat at once and the files finish uploading after.
- **Reorder.** Drag a chip onto another to move it there. The message shows the files in this order.
- **Look and mark up (iPhone and iPad).** Tap a picture chip to open it in the [Image viewer](https://air.build/docs/screens/chat/image-viewer/). Tap the pen (**Draw**), draw on it, then tap **Done**: the marked-up picture takes the chip's place in the same spot and uploads again. The viewer has no field to type in and no send button here. Other files don't open from the chip.
- **Look (Mac).** Click a chip to open the file in Quick Look.

## Dictate

1. Tap or click the microphone (**Dictate**). The first time, allow AirBuild to use the microphone.
2. Speak. The stop button shows a waveform and the text reads "Listening…".
3. Tap or click the stop button. The text reads "Transcribing…" while the recording is turned into text.
4. The words are added to the end of what you'd typed, with a space between. Edit them if you like, then send.

- The recording is turned into text by AirBuild, not on your device. You don't choose a language.
- The chat's name and its latest messages are used to clean up the text.
- A recording shorter than half a second is dropped.
- A recording stops by itself after 30 minutes and is turned into text.
- Tap the stop button while it shows a spinner to call dictation off.
- Sending while recording throws the recording away. Sending while it's being turned into text keeps it: the words land in the empty composer after the message goes.
- Opening another chat stops dictation; nothing from it is added.

## Edit a message you sent

1. Open the menu on a message you sent and choose **Edit**. **Edit** shows for your own messages that have words, not for cards, forwarded messages or messages still sending.
2. The message's words are put in the composer, and the **Editing Message** capsule shows above it. Whatever you had typed is kept aside.
3. Change the words and send.

The message takes the new words at once. The text you had typed before comes back in the composer.

- To stop without changing anything, tap **Editing Message**. Opening another chat also stops editing.
- While editing, the send button shows only when there are words: a message can't be edited to empty.
- You can only change words. Adding a file while editing shows "You can’t add attachments while editing a message."

## Forward a message here

When you forward a message into a chat, a capsule above the composer shows who wrote it and its first line. Send to forward it. You can send it without words; if you type words, they go out first as a message of their own, then the forwarded message. Tap the capsule to stop forwarding.

## Drafts

Each chat keeps its own draft: words and files. When you open another chat and come back, the draft is still there, and files still uploading carry on. A draft is kept while the app is open.

When the Mac app restarts itself to install an update, the words of each draft come back after the restart; the files don't.

## Messages

| Message | When it shows | What to do |
| --- | --- | --- |
| "(file name) is (size). Attachments are limited to 1 GB." | The file is over 1 GB. | Choose a smaller file, or split or compress it. |
| "(file name) uncompresses to (size). Archives are limited to 4 GB uncompressed." | An archive or package would be over 4 GB once uncompressed. | Make a smaller archive. |
| "(file name) is a folder. Compress it to attach it." | You added a folder. | Compress the folder to a zip and add that. |
| "Couldn’t add this attachment. Try selecting it again." | The file couldn't be read. | Add it again. |
| "Couldn’t read this photo or video. Try selecting it again." | A photo or video from your library couldn't be loaded, for example an iCloud original that didn't download. | Choose it again, or wait until it's downloaded. |
| "(file name): This attachment is too large to upload. Choose a smaller file." | The upload was refused as too large. The chip shows an exclamation mark in a circle. | Remove the chip and add a smaller file. |
| "You can’t add attachments while editing a message." | You added a file while editing a sent message. | Finish or stop the edit, then add the file to a new message. |
| **Microphone Access Required**: "AirBuild requires microphone access for dictation. Grant access in Settings." | AirBuild isn't allowed to use the microphone. | Choose **Open Settings** and allow the microphone, or **Cancel**. |
| **Couldn't Transcribe Recording**: "Your recording couldn't be turned into text. Try again." | The recording couldn't be turned into text. | Tap **OK** and dictate again. |
| **Couldn't Transcribe Recording**: "Your recording couldn't be sent. Check your internet connection and try again." | You're offline. | Check your connection and dictate again. |
| **Dictation Unavailable**: "Dictation is unavailable. Ensure a microphone is connected and try again." | No microphone, the microphone wouldn't start, or the composer isn't in a chat. | Connect a microphone and try again. |
| **Couldn’t Edit Message**: "Your changes weren’t saved. Try again." | The edit was refused. The message gets its old words back. | Choose **Edit** on the message again. |

**Why doesn't Return send on my iPhone?**

On iPhone and iPad, Return starts a new line. Tap the send button. On a hardware keyboard, ⌘Return presses **Send**.

**Do I have to wait for files to upload before I send?**

No. Send any time; the files finish uploading after the message is in the chat.

**Why did my long paste turn into a file?**

Text over 1,000 characters is added as **Pasted Text.txt**, so the whole text reaches the Agent instead of a cut-off message.
