diff --git a/frontend/packages/swarm-ui/src/pages/AgentsPage.tsx b/frontend/packages/swarm-ui/src/pages/AgentsPage.tsx index b4c1d192..c299c144 100644 --- a/frontend/packages/swarm-ui/src/pages/AgentsPage.tsx +++ b/frontend/packages/swarm-ui/src/pages/AgentsPage.tsx @@ -174,6 +174,7 @@ function WantedMenu({ onSelectPaused, onDestroy, showDestroy = true, + portal = false, }: { row: AgentRow; pending: boolean; @@ -182,15 +183,29 @@ function WantedMenu({ onSelectPaused: (row: AgentRow) => void; onDestroy?: (row: AgentRow) => void; /** - * The card view (see `AgentCard` below) keeps this menu to the - * three everyday states and gives "destroy" — the rare, one-way - * one — its own button in the detail panel instead, so it can't be - * reached by an extra click off a state that's already open (mara, - * scoping the card/detail split: destroy belongs with the "rarely - * used actions" bucket, not next to up/paused/offline). The - * `WantedMenu` inside that detail panel still gets the full set. + * The card view (see `AgentCard` below) 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 detail panel has a clipping ancestor, + * and inside the detail panel 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 detail panel, only the portion extending + * past the dialog's own edge was visible. + */ + portal?: boolean; }) { const [open, setOpen] = useState(false); const anchorRef = useRef(null); @@ -234,7 +249,7 @@ function WantedMenu({ /> `: the card also hosts the // real ` ) : null}