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:
parent
339da0aebe
commit
b93eaaff51
2 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue