Watch
0
0
Fork
You've already forked hyperhive
0

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.
This commit is contained in:
iris 2026-10-25 01:44:24 +02:00
commit b93eaaff51
2 changed files with 5 additions and 4 deletions

View file

@ -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));
}