From 8475d9921f02b64de32de5dd1b6c4146cfa7ed05 Mon Sep 17 00:00:00 2001 From: iris Date: Mon, 31 Aug 2026 19:30:38 +0200 Subject: [PATCH] dashboard: remove the spawn-new-agent trigger from the Y3R C4LL tab Frontend half of removing hive-level agent spawning (swarm-level creation now covers it, and its forge-works confirmation just landed in hive/hive-chat). Removes call.js's blank-name spawn-request form (R3QU3ST SP4WN) and its now-orphaned .spawnform CSS. Deliberately keeps core.js's tombstone-list revive action (R3V1V3) -- a different feature (respawn an *existing* agent, reusing its kept state), not agent creation, and not what this issue asked to remove. It happens to post to the same /api/request-spawn action with the tombstone's own name pre-filled rather than a blank input. Backend endpoint + wiring is a separate slice (damocles). --- docs/web-ui/dashboard.md | 3 +-- frontend/packages/dashboard/src/call.js | 25 ------------------- frontend/packages/dashboard/src/dashboard.css | 12 --------- 3 files changed, 1 insertion(+), 39 deletions(-) diff --git a/docs/web-ui/dashboard.md b/docs/web-ui/dashboard.md index bae45de0..a925cc77 100644 --- a/docs/web-ui/dashboard.md +++ b/docs/web-ui/dashboard.md @@ -82,8 +82,7 @@ agent is stale. Things blocked on operator decision — the approval queue. -**P3NDING APPR0VALS** — the queue (see "Approval card" below). -The R3QU3ST SP4WN form lives at the top of this section. A +**P3NDING APPR0VALS** — the queue (see "Approval card" below). A `pending · N` / `history · N` tab pair switches between the live queue and the last 30 resolved approvals (see "Approval card" for the history row shape). diff --git a/frontend/packages/dashboard/src/call.js b/frontend/packages/dashboard/src/call.js index c0de1cec..67a4769c 100644 --- a/frontend/packages/dashboard/src/call.js +++ b/frontend/packages/dashboard/src/call.js @@ -159,33 +159,8 @@ export function renderApprovals() { // no-op elsewhere — `approval_added` / `approval_resolved` SSE // events route through here on every page that loads the bundle. if (!root) return; - // Save spawn form input + focus state before the DOM wipe so a live - // approval_added/resolved event doesn't erase a partially-typed name - // or steal focus from the operator. - const savedSpawnName = root.querySelector('.spawnform input[name="name"]')?.value ?? ''; - const spawnHadFocus = document.activeElement === root.querySelector('.spawnform input[name="name"]'); root.replaceChildren(); - // Spawn request form: submitting it queues a Spawn approval that - // lands in this same list, so the form belongs here rather than on - // the containers list (the agent doesn't exist yet). - const spawnNameInput = el('input', { - name: 'name', - placeholder: 'new agent name (≤9 chars)', - maxlength: '9', required: '', autocomplete: 'off', - }); - if (savedSpawnName) spawnNameInput.value = savedSpawnName; - if (spawnHadFocus) spawnNameInput.focus(); - const spawn = el('form', { - method: 'POST', action: '/api/request-spawn', - class: 'spawnform', 'data-async': '', 'data-no-refresh': '', - }); - spawn.append( - spawnNameInput, - el('button', { type: 'submit', class: 'btn btn-spawn' }, '◆ R3QU3ST SP4WN'), - ); - root.append(spawn); - const pending = approvalsState.pending; const history = approvalsState.history; const active = localStorage.getItem(APPROVAL_TAB_KEY) || 'pending'; diff --git a/frontend/packages/dashboard/src/dashboard.css b/frontend/packages/dashboard/src/dashboard.css index 49c880f3..54b8ff75 100644 --- a/frontend/packages/dashboard/src/dashboard.css +++ b/frontend/packages/dashboard/src/dashboard.css @@ -610,18 +610,6 @@ hive-agent-menu { } ul form.inline { display: inline-block; } -.spawnform { display: flex; gap: 0.6em; align-items: stretch; margin: 0.5em 0; } -.spawnform input { - font-family: inherit; - font-size: 1em; - background: var(--bg-elev); - color: var(--fg); - border: 1px solid var(--border); - padding: 0.4em 0.6em; - flex: 1; -} -.spawnform input::placeholder { color: var(--muted); } -.spawnform input:focus { outline: 1px solid var(--purple); } .role-pending { color: var(--amber); border-color: var(--amber); } .btn-inline { font-family: inherit;