diff --git a/frontend/DESIGN.md b/frontend/DESIGN.md index 4b8286fb..d626d30d 100644 --- a/frontend/DESIGN.md +++ b/frontend/DESIGN.md @@ -182,6 +182,10 @@ Patterns: link. - Icon-only buttons are `IconButton` (below), never a `Button` with a `title`. +- An action whose label doesn't fit beside a name on a phone (the shared + agent card's Edit, in a long locale) is two elements: an `IconButton` + with `sm:hidden` and the labelled `Button` with `hidden sm:inline-flex`. + Never hide a Button's label span, which leaves an icon-only Button. - Roles for dangerous and dismissive actions: a delete on a page (a "Danger zone" card's Delete agent or Revoke, Delete all) is `destructive-outline`; the submit of a confirm dialog is `destructive` (`ModalActions destructive`, @@ -294,6 +298,8 @@ tone="destructive"`. Muted text fails AA on the red fill, so the tone turns ghost's grey square would not. - A card on the page background that must not look raised (the shared agent card) is `subtle lg`. Cards never take a shadow. +- The shared agent card's description is `line-clamp-3` with no inner + scroller (`max-h-* overflow-y-auto`) and no hover hint for the cut text. Stat tiles are `components/StatCard.tsx`, never a hand-rolled Card: `label`, `value` (24px bold `tabular-nums`), `sub` (a 12px muted line or link), @@ -965,6 +971,13 @@ leading-tight font-semibold`. `DialogTitle` and `SheetTitle` default to it; or output) stays proportional at the same size; only what the app serialised (arguments, results, attributes) is mono. Every stat figure is `tabular-nums`. +- **Wrapping**: prose that can run long (a name, a description) wraps with + `wrap-break-word` in a column that can shrink (`min-w-0` in a flex row). + A single long token (a URL, a key, an id, an email, a filename, a command) + is `wrap-anywhere`, which also lets a table cell or flex item shrink below + the token instead of widening the table. Both break at spaces first and + split a token only when it would overflow. Never `break-all`: it splits + ordinary words mid-word ("notif / ications"). ### Rhythm diff --git a/frontend/src/admin/Admins.tsx b/frontend/src/admin/Admins.tsx index 8e08fdea..296e47e9 100644 --- a/frontend/src/admin/Admins.tsx +++ b/frontend/src/admin/Admins.tsx @@ -81,7 +81,7 @@ export default function Admins() { {admins.map((a) => ( - + {a.user_id} diff --git a/frontend/src/admin/Quotas.tsx b/frontend/src/admin/Quotas.tsx index 8b382454..e48d22ce 100644 --- a/frontend/src/admin/Quotas.tsx +++ b/frontend/src/admin/Quotas.tsx @@ -308,7 +308,7 @@ export default function Quotas() { {userPolicies.map((policy) => ( - + {policy.subject_id} {bucketPill(policy)} diff --git a/frontend/src/admin/Usage.tsx b/frontend/src/admin/Usage.tsx index f8799438..17faff09 100644 --- a/frontend/src/admin/Usage.tsx +++ b/frontend/src/admin/Usage.tsx @@ -224,7 +224,7 @@ export default function Usage() { {topUsers.map((user) => ( - + + <> + {/* A phone has no room for a long localised label beside the name. */} + + + )} {hasSharedMetadata && ( diff --git a/frontend/src/components/DocumentArtifactView.tsx b/frontend/src/components/DocumentArtifactView.tsx index d9e2fa78..937a40ec 100644 --- a/frontend/src/components/DocumentArtifactView.tsx +++ b/frontend/src/components/DocumentArtifactView.tsx @@ -135,7 +135,7 @@ function DownloadCard({
-

+

{filename}

{size != null && ( diff --git a/frontend/src/modals/AgentDetailsModal.tsx b/frontend/src/modals/AgentDetailsModal.tsx index ce256a00..e52e2123 100644 --- a/frontend/src/modals/AgentDetailsModal.tsx +++ b/frontend/src/modals/AgentDetailsModal.tsx @@ -122,7 +122,7 @@ export default function AgentDetailsModal({
{sharedToken ? (
-

+

-
+
{apiKey} {!apiKey.includes('...') && ( {webhookUrl ? (
-

+

{webhookUrl} diff --git a/frontend/src/settings/RemoteDeviceConfig.tsx b/frontend/src/settings/RemoteDeviceConfig.tsx index 42483cfb..1f844e4c 100644 --- a/frontend/src/settings/RemoteDeviceConfig.tsx +++ b/frontend/src/settings/RemoteDeviceConfig.tsx @@ -387,7 +387,7 @@ export default function RemoteDeviceConfig({ tool, handleGoBack }: Props) { key={entry.id} className="bg-muted flex flex-col gap-1 rounded-md px-3 py-2 text-xs" > - + {entry.command}