Composer Cloud: a chat starting in Cloud shows its progress under the message

Closed
TE
5d ago
+655-14

HOLD: stacked on #26920, which is on #26801 and Swift #26791, all held. This PR changes Swift too.

Composer Cloud: a chat starting in Cloud shows how the start goes as metadata under the person's message. The card shows:

  • the step: getting a machine, copying the folder, opening the chat;
  • the folder;
  • the machine and its size;
  • the secrets the machine gets;
  • its network.

It is never a modal and has no Full Access warning. Working is a spinner. A failure shows the host's words, and the message stays in the composer.

Leo, 2026-10-28: "whatever's convenient for cloud, like that can be productionized, operationalized, we ought to just put out there"

Leo, 2026-10-28: "you can just say ... where should this chat run and stuff, and that's just about it ... the sort of metadata that you get to see, the UI elements ... their little warning for the full access thing, but I don't know if we really need to do that"

Gallery: agent-pane.cloud-start

What changes

  • cloudStartProgress.ts (new): the card's state.

    • The page starts it from the send: the message and the folder's name.
    • It takes the host's pushes field by field, each one checked: only for the same start (its cloud.startChat key), a step never goes back, text is one line and capped, and anything else is ignored.
    • An answer clears it when the chat opened (the tab closes), or marks it failed with the host's words.
  • CloudStartView.tsx and cloudStart.css (new): the card, in three layouts behind the cloud-start-look experiment:

    • chips (default): a spinner line with the step, then one row of small chips;
    • rows: label and value rows, like the Sandboxed receipt;
    • steps: a three-step checklist with the facts on one line.

    I picked chips because it reads as metadata, like a "Building environment" line. It stays one or two lines while the start runs for minutes, and it doesn't push the composer down. The rows layout spends four lines on facts that matter less than the step. The steps layout spends three lines on a checklist.

  • App.tsx:

    • the card shows in the chat view while a new chat's Cloud start runs, and over the box on the New Tab page (without the bubble, since the message is still in the box);
    • the bridge takes cloudStartProgress;
    • another chat clears the card, and so does picking another place to run after a failure.
  • pageHost.ts: the shared page host hands the cloudStartProgress event to the bridge.

  • Swift CloudStartChat pushes each step as the start reaches it (machine, then folder, then opening), with the folder's name and, once known, the machine and its size. AgentPaneCloudStart.progress(_:folder:machine:size:to:) delivers the event.

  • Swift AgentPageChats.seed: the Cloud start closure is written out with its type. Xcode 26.6 could not type the map form that #26801's base has.

Not yet filled

With each step the host pushes the folder, the machine and its size ("4 CPU · 16 GB"). Secrets and network have fields and show when pushed. They come from the derived environment, which is being built on the server side and isn't pushed yet.

Before / after

  • Before: a Cloud send left the new chat empty while a toast said it was moving.
  • After: the message with the start's progress under it. See the agent-pane.cloud-start gallery entry:
    • variants: sent, machine, copying, opening, failed;
    • Compare arms shows the three layouts.

The gallery advisory captures only PRs into feat-cmux-next, so it runs once this PR's base retargets.

Tests

  • cloudStartProgress.test.ts: begin, pushes (checked fields, other keys, a step that never goes back, after a failure), and the answer.
  • CloudStartView.test.tsx: every arm shows the message, a spinner and the same facts; the steps arm marks done, current and next; a failure shows the host's words with no spinner; no bubble on New Tab.
  • test/cloud-start-host-event.test.ts: the host event reaches the bridge.
  • cmux-ci (Linux pool): those tests, cloudRun, NewTabScreen and design-selection pass, and bun run check is green.
  • Fleet: AgentPaneCloudStartTests and CloudWorkPickTests.

Risk: low, behind Labs and only for a Cloud start.

Agent session: agent session

🤖 Generated with Claude Code