Agents composer
The message field at the bottom of an agent conversation: a pill shaped, growing text area with a filled send button, and a brand coloured ring while focused.

The agents composer is where the person writes to the agent. It is one rounded container holding a growing text area and a circular send button, fixed under the transcript and lifted by the keyboard.

    Kind: inline part. It is not a named component in code. It is written inside the screen component AgentSessionScreen.

    Where it lives: agents.contract lines 597 to 633, including the parent link that replaces it in a child session.

Used by

Where

How

Agent session (AgentSessionScreen)

The bottom bar of every conversation that is not driven by a parent

It appears nowhere else. Comment threads use the named component DiscussComposer.

Focused with "Draft reply" typed: the container has a brand coloured ring and the send button is filled with the brand colour. Empty and unfocused, the border is the grey separator and the button is dimmed, as in final/ios-agent-new-session-light.png.

Anatomy

Outer bar: a column that does not shrink, on -exact-background, so transcript rows never show through it.

Container: a row with margin 6 by 12, padding 0 on the right 4 and left 12, radius 20, a 1 point border, children aligned to the bottom edge.

    Text area (textarea): one row tall, grows with its content up to 140 points and then scrolls. Placeholder "Message", accessibility label "Message". No border, outline or background of its own. Vertical padding 12.

    Send button (button): buttonStyle="filled", containing symbol:send (an up arrow), accessibility label "Send", 4 points of vertical margin. Because items align to the bottom, the button stays on the last line as the field grows.

Variants and states

State

Look

Empty, not focused

Border -exact-separator; send disabled and dimmed

Focused

Border brand plus a 1 point brand outer ring (2 points of colour in all)

Has text

Send enabled, filled with the brand colour

Sending

Send disabled until the server answers

Send failed

The text stays in the field; the failure appears in the transcript as an AgentError line

Child session

The composer is not drawn. In its place: a full width button with the footnote text "Driven by a parent conversation. Open it to intervene.", which opens the parent session

Behaviour

    Send trims the text. Blank text cannot be sent.

    Tapping send does not dismiss the keyboard (retainFocus=true), and focus is returned to the field after each send.

    The text appears in the transcript at once as a sending bubble. The field is cleared only when the send succeeds.

    The keyboard resizes the screen (interactive-widget="resizes-content"), so the composer rides on top of it and the transcript shrinks. The tab bar ends up behind the keyboard.

Rules for use

    One composer per conversation, always at the bottom, never inside the scrolling list.

    Do not put status or controls beside it. "Stop", "Cancel" and "Answer" live in the transcript, by design.

    Keep the send control an icon with an accessibility label. It is the only filled button on the screen (Buttons and actions).

Why it looks this way

    It is the recipe's composer. Margin, padding, radius 20, the 140 point limit, the filled send button that retains focus: all are taken from Exact's chat thread recipe, which describes it as "Messages' composer". DESIGN.md: "Composer = chat-thread composer" (Composers, How the framework shaped the design).

    The app adds the focus ring. The recipe has a static separator border. The app turns it brand coloured on focus, because the text area has no outline of its own and a focused field should be visible (Accessibility; inferred from the two added attributes).

    Send is the brand's one loud moment. A filled brand circle against a grey screen makes the primary action unmistakable (Color and tokens).

    A child session has no composer. Writing into a conversation another agent is driving would cross the wires, so the bar becomes a signpost to the parent.

The final/ screenshots show an older build where the focused field had no ring. The agents3/ screenshots show the current look.

User stories

This page helps deliver these stories. Each story lists this page in its Trace, so the link holds in both directions (traceability).

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime