From e1aae29068959a0f4e13461de1404f6ba948faa0 Mon Sep 17 00:00:00 2001 From: iris Date: Sat, 29 Aug 2026 20:23:00 +0200 Subject: [PATCH] badge: add a quiet variant for icon-only header triggers Badge's default look is a filled pill, right for status/picker chips but wrong for an icon-only header button like the settings gear or agent links trigger, which should read as chrome. Add variant='quiet' (same naming/shape as Button's ButtonVariant) that drops the idle background, keeping the existing hover/expanded feedback. Apply it to the two icon-only Badge triggers: shared SettingsMenu (used by both swarm-ui and the agent page) and the agent page's own MetaNav links trigger. Add a components-page showcase sample so the variant has a visible regression check going forward. --- .../packages/agent/src/components/MetaNav.tsx | 13 +++++- frontend/packages/shared/src/badge/Badge.css | 8 ++++ frontend/packages/shared/src/badge/Badge.tsx | 23 +++++++++- .../shared/src/settings/SettingsMenu.tsx | 43 ++++++++++--------- .../swarm-ui/src/pages/ComponentsPage.tsx | 4 ++ 5 files changed, 68 insertions(+), 23 deletions(-) diff --git a/frontend/packages/agent/src/components/MetaNav.tsx b/frontend/packages/agent/src/components/MetaNav.tsx index 78d7dad6..743148ca 100644 --- a/frontend/packages/agent/src/components/MetaNav.tsx +++ b/frontend/packages/agent/src/components/MetaNav.tsx @@ -14,6 +14,11 @@ // link and rebuild; rebuild's gone outright, the dashboard's own // R3BU1LD button already covers it, dashboard-link moves here, so // `OverflowMenu` had nothing left to justify existing and is deleted). +// +// `variant="quiet"` — mara: "link and settings button should not have +// the badge bg". `Badge`'s default filled-pill look is right for a +// status/picker chip, wrong for this icon-only trigger, which should +// read as header chrome. See `@hive/shared/badge.js`'s `BadgeVariant`. // v1 of this rendered every link inline in the header's title row — // mara, live: "the login card looks like it is behind the header" @@ -73,7 +78,13 @@ export function MetaNav({ links, forgePublicUrl, dashboardBase }: MetaNavProps) return (
- } title="agent links" onClick={() => setOpen((o) => !o)} expanded={open} /> + } + title="agent links" + variant="quiet" + onClick={() => setOpen((o) => !o)} + expanded={open} + /> {open ? (