From 3058a5871e66d757c5b23ef0748b1a8f4cc7a6a3 Mon Sep 17 00:00:00 2001 From: iris Date: Sun, 1 Nov 2026 01:26:40 +0100 Subject: [PATCH] swarm-ui: drop the wanted menu's two dead options, and two stale test headers showDestroy and portal were each passed by one caller, the old card and the old table cell, and neither exists now. Two test headers still named the detail panel. --- .../swarm-ui/src/agent/roster/WantedMenu.tsx | 31 +------------------ .../swarm-ui/test/agent-permissions.test.mjs | 2 +- .../swarm-ui/test/allowed-domains.test.mjs | 2 +- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/frontend/packages/swarm-ui/src/agent/roster/WantedMenu.tsx b/frontend/packages/swarm-ui/src/agent/roster/WantedMenu.tsx index 81eefb1f..e469b9d8 100644 --- a/frontend/packages/swarm-ui/src/agent/roster/WantedMenu.tsx +++ b/frontend/packages/swarm-ui/src/agent/roster/WantedMenu.tsx @@ -24,8 +24,6 @@ export function WantedMenu({ onSelectOffline, onSelectPaused, onDestroy, - showDestroy = true, - portal = false, }: { row: AgentRow; pending: boolean; @@ -33,30 +31,6 @@ export function WantedMenu({ onSelectOffline: (row: AgentRow) => void; onSelectPaused: (row: AgentRow) => void; onDestroy?: (row: AgentRow) => void; - /** - * The card view (see `AgentCard`) passes `false` here — its - * quick-access menu keeps to the three everyday states, so "destroy" - * can't be reached by an extra click off a state that's already open. - * `AgentsPage`'s detail-panel `WantedMenu` keeps the default (`true`) - * — mara: "destroy is already available via wanted state", i.e. the - * full menu there, not a separate button. - */ - showDestroy?: boolean; - /** - * Forwarded to `Dropdown`'s own `portal` (see its file-top comment) — - * only the table's "wanted" column needs it, to escape - * `.ui-table-scroll`'s clip on the table's last row (the bug `Dropdown`'s - * own `portal` prop exists to fix in the first place). - * Neither the card list nor the details dialog has a clipping ancestor, - * and inside the details dialog specifically `portal` is actively wrong: - * a `position: fixed` element appended to `document.body` renders - * *behind* an open native `` (the dialog is promoted to the - * browser's top layer, which composites above ordinary body content - * regardless of z-index) — found while screenshotting this exact - * dropdown open inside the details dialog, only the portion extending - * past the dialog's own edge was visible. - */ - portal?: boolean; }) { const [open, setOpen] = useState(false); const anchorRef = useRef(null); @@ -75,9 +49,7 @@ export function WantedMenu({ { value: "up", label: "up" }, { value: "paused", label: "paused" }, { value: "offline", label: "offline" }, - ...(showDestroy - ? [{ value: "destroy", label: "destroy", danger: true }] - : []), + { value: "destroy", label: "destroy", danger: true }, ]; return ( @@ -103,7 +75,6 @@ export function WantedMenu({ />