From ec51bf3fec0c494c3b2517a0721355cb3a401a5d Mon Sep 17 00:00:00 2001 From: iris Date: Sun, 1 Nov 2026 15:35:50 +0100 Subject: [PATCH] swarm ui: dialogs are up to 64em wide, matching the wide pages The cap was 44em, set before the swarm UI went wide. The create-agent panel reads the same width. --- .../packages/swarm-ui/src/pages/CreateAgentForm.css | 2 +- frontend/packages/swarm-ui/src/ui/dialog/Dialog.css | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/packages/swarm-ui/src/pages/CreateAgentForm.css b/frontend/packages/swarm-ui/src/pages/CreateAgentForm.css index 893b9595..41f104d1 100644 --- a/frontend/packages/swarm-ui/src/pages/CreateAgentForm.css +++ b/frontend/packages/swarm-ui/src/pages/CreateAgentForm.css @@ -9,7 +9,7 @@ display: flex; flex-direction: column; box-sizing: border-box; - width: min(90vw, 44em); + width: var(--ui-dialog-width, min(90vw, 64em)); max-height: 85vh; } .create-agent-panel > .ui-panel-body { diff --git a/frontend/packages/swarm-ui/src/ui/dialog/Dialog.css b/frontend/packages/swarm-ui/src/ui/dialog/Dialog.css index 2c82b413..8f44da73 100644 --- a/frontend/packages/swarm-ui/src/ui/dialog/Dialog.css +++ b/frontend/packages/swarm-ui/src/ui/dialog/Dialog.css @@ -1,10 +1,11 @@ /* — native `` styling. Sizes to its own content (`width: fit-content`, matching a native ``'s own UA default) rather than a fixed width — each caller's content decides - how wide the shell gets, capped at `min(90vw, 44em)` so nothing + how wide the shell gets, capped at `min(90vw, 64em)` so nothing overflows a narrow viewport or balloons unreasonably wide on - desktop. The create-agent form's two-panel layout is wide enough to - hit that cap on its own (same rendered width as a fixed 44em); + desktop. The cap is `--ui-dialog-width` (64em, set below: the page itself + is 90em wide, and 44em left the dialogs looking narrow beside it), which the + create-agent form's panel reads as its own width; `ConfirmDialog`'s shorter paragraph settles at its own narrower intrinsic width instead — no second width mode needed (a forced `width` was the actual root cause, one level above where a @@ -20,7 +21,8 @@ box-sizing: border-box; position: relative; width: fit-content; - max-width: min(90vw, 44em); + --ui-dialog-width: min(90vw, 64em); + max-width: var(--ui-dialog-width); max-height: 85vh; overflow: auto; padding: 1.5em;