diff --git a/docs/swarm/ui.md b/docs/swarm/ui.md index 14364b3ea..860d38f68 100644 --- a/docs/swarm/ui.md +++ b/docs/swarm/ui.md @@ -432,11 +432,6 @@ as optional `limits` and `inference` objects, the same shapes the two `PUT` routes take. The controller checks them with the `PUT` rules before it queues anything, so a bad value gets a refusal with its reason and creates no agent. -The dialog loads the hive list and the permission list when it opens. If either -load fails, the dialog shows the reason in an error panel above the fields, and -the hive picker or the permissions area reads `could not load hives` or -`could not load permissions` in place of `loading…`. - It stores them ahead of the job graph, before it declares the agent, so they are in place before the agent first runs. If the creation then fails, the controller puts back what it replaced. Each agent name keys its settings and diff --git a/frontend/packages/swarm-ui/src/pages/CreateAgentForm.tsx b/frontend/packages/swarm-ui/src/pages/CreateAgentForm.tsx index 4fce32cc8..cb3c1f189 100644 --- a/frontend/packages/swarm-ui/src/pages/CreateAgentForm.tsx +++ b/frontend/packages/swarm-ui/src/pages/CreateAgentForm.tsx @@ -309,9 +309,7 @@ export function CreateAgentForm({ disabled={!hivesReady} placeholder={ !hives - ? hivesError - ? "could not load hives" - : "loading…" + ? "loading…" : hives.length === 0 ? "no hives configured" : "select a hive" @@ -342,8 +340,8 @@ export function CreateAgentForm({ )} )} - -
+ +
{catalogue ? ( setSelected((s) => togglePermission(s, v))} /> ) : ( - - {catalogueError ? "could not load permissions" : "loading…"} - + loading… )}
diff --git a/frontend/packages/swarm-ui/src/ui/form-field/FormField.tsx b/frontend/packages/swarm-ui/src/ui/form-field/FormField.tsx index dc6db9e2c..b93f9587a 100644 --- a/frontend/packages/swarm-ui/src/ui/form-field/FormField.tsx +++ b/frontend/packages/swarm-ui/src/ui/form-field/FormField.tsx @@ -4,36 +4,23 @@ // don't each reinvent the label/spacing chrome; a bare labelled `
` // wrapper has no independent identity worth a `/components` entry of // its own. -// -// A control a `