diff --git a/docs/swarm/ui.md b/docs/swarm/ui.md index 2eeb347c..8e45b738 100644 --- a/docs/swarm/ui.md +++ b/docs/swarm/ui.md @@ -548,7 +548,8 @@ order with **next** and can step back through with **back** or the step tabs: The header, the step tabs and the buttons stay in place and only the step's own fields scroll, so a long step never pushes **next** out of view. After **create**, the dialog says it queued the job and links to **jobs**, and offers -**create another** and **close**. If the controller refuses the `AGENTS.md` text, +**create another** and **close**. **create another** starts on step 1 with every field back at +its start, and keeps only the hive you picked. If the controller refuses the `AGENTS.md` text, the dialog goes back to step 2 and shows the reason there. ### Settings at creation diff --git a/frontend/packages/swarm-ui/src/pages/CreateAgentForm.tsx b/frontend/packages/swarm-ui/src/pages/CreateAgentForm.tsx index 1d0f28ea..dce9f873 100644 --- a/frontend/packages/swarm-ui/src/pages/CreateAgentForm.tsx +++ b/frontend/packages/swarm-ui/src/pages/CreateAgentForm.tsx @@ -208,8 +208,8 @@ export function CreateAgentForm({ label: h.name, })); const hivesReady = hives !== null && hives.length > 0; - // The controller's size refusal of the AGENTS.md text, shown under its - // section so a collapsed section still shows it. + // The controller's size refusal of the AGENTS.md text. It shows under the + // instructions box, and `submit` sends the dialog back to that step. const refusal = result.status === "error" ? agentsMdRefusal(result.problem) : null; @@ -268,7 +268,7 @@ export function CreateAgentForm({ // Enter goes on to the next step, and creates only from the summary. function onSubmit(e: Event) { e.preventDefault(); - if (done) return; + if (done || result.status === "submitting") return; if (step === "summary") void submit(); else if (problem === null) setStep(nextStep(step)); }