+
);
}
diff --git a/frontend/packages/swarm-ui/src/pages/CreateAgentPage.css b/frontend/packages/swarm-ui/src/pages/CreateAgentPage.css
index 61f8f368..789a6403 100644
--- a/frontend/packages/swarm-ui/src/pages/CreateAgentPage.css
+++ b/frontend/packages/swarm-ui/src/pages/CreateAgentPage.css
@@ -1,7 +1,7 @@
-/* — the create-agent form. First form in this package,
- so its input/button chrome lives here rather than in `ui/` — see the
- component's own comment for why. Reuses the same base16 slots
- (../theme.css) every other component draws from. */
+/* — the create-agent form. Input/button chrome now
+ comes from the shared `ui/` form kit (`TextField`/`Button`); this
+ file only owns the page's own layout + copy. Reuses the same base16
+ slots (../theme.css) every other component draws from. */
.create-agent-intro {
margin: 0 0 1.5em;
color: var(--muted);
@@ -12,37 +12,6 @@
gap: 0.75em;
flex-wrap: wrap;
}
-.create-agent-field {
- display: flex;
- flex-direction: column;
- gap: 0.3em;
-}
-.create-agent-label {
- font-size: 0.85em;
- color: var(--muted);
-}
-.create-agent-input {
- background: var(--bg);
- color: var(--fg);
- border: 1px solid var(--purple-dim);
- border-radius: 0.3em;
- padding: 0.4em 0.6em;
- font: inherit;
- min-width: 16em;
-}
-.create-agent-submit {
- background: var(--purple-dim);
- color: var(--fg);
- border: none;
- border-radius: 0.3em;
- padding: 0.5em 1.2em;
- font: inherit;
- cursor: pointer;
-}
-.create-agent-submit:disabled {
- opacity: 0.6;
- cursor: default;
-}
.create-agent-result {
margin-top: 1em;
}
diff --git a/frontend/packages/swarm-ui/src/pages/CreateAgentPage.tsx b/frontend/packages/swarm-ui/src/pages/CreateAgentPage.tsx
index ed500fe8..35fc4722 100644
--- a/frontend/packages/swarm-ui/src/pages/CreateAgentPage.tsx
+++ b/frontend/packages/swarm-ui/src/pages/CreateAgentPage.tsx
@@ -16,16 +16,17 @@
// one path segment deep — a real bug, filed separately rather than
// fixed here, but reason enough to avoid a nested route today.
//
-// First real form in this package — no shared form kit exists yet, so
-// the input/button styling below is scoped to `CreateAgentPage.css`
-// rather than promoted into `ui/`. Promote the day a second page needs
-// one, same "don't build ahead of a second caller" rule `Panel`'s own
-// comment states.
+// First real form in this package — its name field + submit button now
+// come from the shared `ui/` form kit (`TextField`/`Button`) rather than
+// page-scoped input/button chrome, so a hive-picker soon landing on this
+// same page has something to reuse instead of copying this page's CSS.
import { useState } from 'preact/hooks';
import { Link } from 'wouter-preact';
import { ApiErrorPanel } from '@hive/shared/api-error-panel.js';
import { readApiError, type ProblemDetails } from '@hive/shared/api-error.js';
import { Panel } from '../ui/panel/Panel.js';
+import { TextField } from '../ui/text-field/TextField.js';
+import { Button } from '../ui/button/Button.js';
import './CreateAgentPage.css';
interface CreateAgentResponse {
@@ -85,24 +86,18 @@ export function CreateAgentPage() {
jobs to watch it settle.
{result.status === 'done' && (
diff --git a/frontend/packages/swarm-ui/src/ui/button/Button.css b/frontend/packages/swarm-ui/src/ui/button/Button.css
new file mode 100644
index 00000000..1c5e42a6
--- /dev/null
+++ b/frontend/packages/swarm-ui/src/ui/button/Button.css
@@ -0,0 +1,26 @@
+/*