From b93eaaff51e600ba841b68c7b3f4c23824e5e99c Mon Sep 17 00:00:00 2001 From: iris Date: Sun, 25 Oct 2026 01:44:24 +0200 Subject: [PATCH] swarm-ui: fix the stale refusal comment, guard the create dialog's submit, say what create another keeps The refusal comment still described collapsed sections the dialog no longer has. The form's submit now returns while a create is in flight. The docs say create another keeps only the hive. --- docs/swarm/ui.md | 3 ++- frontend/packages/swarm-ui/src/pages/CreateAgentForm.tsx | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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)); }