Closes #3434. Agent creation had no way to record which hive an agent runs on. POST /api/agents now requires a hive, so the roster fetched off GET /api/hives backs a required SelectField here rather than a free-text field. Single-hive swarms auto-select their only hive; multi-hive swarms show a disabled placeholder and force an explicit choice. Rebuilt on top of the #3448 form kit (merged after this branch was originally opened): reuses TextField/SelectField/Button instead of page-scoped input chrome, and SelectField gains an optional disabled placeholder option (needed for the loading/empty/multi-hive states here, generalizes cleanly for future callers). Form goes back to a column layout per mara's earlier visual feedback on this same page (two fields of different natural width no longer line up in a row).
23 lines
736 B
CSS
23 lines
736 B
CSS
/* <CreateAgentPage> — the create-agent form. Input/button chrome now
|
|
comes from the shared `ui/` form kit (`TextField`/`SelectField`/
|
|
`Button`); this file only owns the page's own layout + copy. Column,
|
|
not row: with a second field (hive) added, a row layout put fields of
|
|
different natural widths on one baseline and looked misaligned —
|
|
mara: "make it a col". Reuses the same base16 slots (../theme.css)
|
|
every other component draws from. */
|
|
.create-agent-intro {
|
|
margin: 0 0 1.5em;
|
|
color: var(--muted);
|
|
}
|
|
.create-agent-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 0.75em;
|
|
}
|
|
.create-agent-result {
|
|
margin-top: 1em;
|
|
}
|
|
.create-agent-result-ok {
|
|
color: var(--green);
|
|
}
|