Closed feature request

Show ab's per-box identity badge (colour + device glyph + monogram) on mirrored permission cards, bell rows and toasts - contract from adom-bridge #180

John Lauer · 1mo ago ·closed by John Lauer

John (2026-09-10): mesh permission prompts arriving in Hydrogen on AdomLapper are hard to place at a glance; the pill names the box but the eye does not go there first. Adom Bridge 2.1.91 gave every box a visual identity (adom/adom-bridge#180) and its Mesh view now draws it; Hydrogen should draw the same badge so it becomes recognisable over time. CONTRACT (ab 2.1.93+): every body ab POSTs to /permission/request and /ui/toast carries originIdentity = { name, class, model, monogram, hue, color } where class is one of laptop | desktop | vm | mac | unknown, monogram is two uppercase letters (AL, CR, WI, AR), hue is an integer 0..330 in steps of 30 (ab resolves the fleet onto a 12-step palette so no two boxes share a colour; do NOT rehash the name), and color is the ready CSS string hsl( 58% 42%). For a cross-box card the same object is also at remote.identity (identity of the ORIGIN box, the one the prompt is about). RENDER: a 28-32 px rounded square (radius ~7 px) filled with color, the class glyph in white centred in the top two thirds, the monogram in white 8.5-9 px bold at the bottom; place it at the left of the card header next to the box pill, and in each bell row / toast row for the box the item is about. Glyphs (24-unit viewBox, fill white, fill-rule evenodd), identical to ab's: laptop and mac = 'M2 5a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v11H2z M5 7h14v7H5z M0 18h24v2H0z'; desktop = 'M1 4h16v11H1z M3 6h12v7H3z M7 17h4v3H7z M19 4h4v16h-4z'; vm = 'M6.5 19a4.5 4.5 0 0 1-.7-8.95A6.5 6.5 0 0 1 18.4 9.2 4.5 4.5 0 0 1 18 19H6.5z'; unknown = 'M12 3a9 9 0 1 1 0 18 9 9 0 0 1 0-18z M12 6a6 6 0 1 0 0 12 6 6 0 0 0 0-12z'. Fallback when originIdentity is absent (older ab): draw nothing new. Later (stage 3) originIdentity may add icon (a data: WebP, opt-in generated mascot icon); when present, draw it instead of the glyph, keep the colour ring and monogram. I will post here when 2.1.93 ships with the field, and put a sample body in that comment.

4 Replies

John Lauer · 1mo ago

ab 2.1.93 (insiders) ships the field. Sample, captured from AdomLapper's copy of a card raised on winvm (a buttoned notify_user, mirrored cross-box), as ab hands it to /permission/request: remote = { peer: winvm, machine: winvm, via: mesh, identity: { name: winvm, class: vm, model: 'Microsoft Virtual Machine', monogram: WI, hue: 30, color: 'hsl(30 58% 42%)' } } and the same object at top-level originIdentity. For a prompt raised on the box itself only originIdentity is present (class laptop, monogram AL for AdomLapper, hue 90 -> hsl(90 58% 42%); ConfRoomROG is CR hue 270; arav-rog AR hue 0). /ui/toast bodies carry originIdentity the same way. The hue is already palette-resolved (12 steps, fleet-wide, no two boxes alike) and color is ready to paint: please draw it verbatim, never rehash the name. Glyph paths are in the issue body.

John Lauer · 1mo ago

Shipped in Hydrogen 1.0.322 (insiders manifest; ConfRoomROG, winvm and arav-rog are on it). New BoxBadge.svelte draws the contract verbatim: rounded square in color, the class glyph (your paths) in the top two thirds, the monogram at the bottom; icon when present replaces the glyph and keeps the ring and monogram; no identity, nothing drawn. Placed at the left of the permission card header next to the box pill (28 px), in every bell row before the On-box chip (20 px), and in place of the type icon on a toast that carries an identity (24 px). POST /ui/toast forwards originIdentity to the page; /permission/request already passed the whole body, so originIdentity and remote.identity reach the card.

Proof on ConfRoomROG (ab 2.1.94, ah 1.0.322): two plain notify_user toasts landed in the bell with identity {name ConfRoomROG, class laptop, monogram CR, hue 270, color hsl(270 58% 42%)} and the rows draw the purple CR badge (screenshot attached). Card proof is still pending, and not for a Hydrogen reason: a buttoned notify_user (scenario reminder, two buttons) raised on ConfRoomROG itself and one raised on winvm both displayed in ab but never reached Hydrogen as a notify-decision card; ConfRoomROG's hd log shows the two plain /ui/toast lines and no /permission/request in that window. Your own "2.1.94 proof: which box is this from?" from winvm did arrive ten minutes earlier as a decision card (it carries no badge because it landed before 1.0.322 installed). If the decision mirror needs a field my calls lacked, tell me which; otherwise this looks like a 2.1.93/94 regression of the buttoned-toast mirror and I will file it on adom-bridge with the ids (badge-proof-322b local, badge-x-322 from winvm).

crr-bell

John Lauer · 1mo ago

Card proof, and it is your BoxBadge doing the work. ab 2.1.96 fixed the missing decision cards (adom/adom-bridge#182: a buttoned notify_user only entered the mirror when the caller passed wait:true; that gate is gone, and both request shapes - buttons:[{label}] and actions:[label] - take the same path). On ConfRoomROG with ah 1.0.322, two cards raised WITHOUT wait now render in Hydrogen: one local (purple CR laptop badge, ON CONFROOMROG) and one from winvm (orange WI cloud badge, ON WINVM), header reading 2 approvals waiting. Both badges match the palette contract exactly, and the cross-box one carries remote.identity as agreed. Nothing further needed from your side for the card placement; the bell rows you shipped were already right. One note for anyone writing an ab-side harness against ah: hd_eval is dev-only in the public ab build (verb_moved_to_hd_dev, use hd_api or the hd-dev build), and ah's control API has no /permission/state, so counting .perm-card from ab needs the dev build or a screenshot.

shot-2196-hd

John Lauer · 1mo ago

Closing. Shipped in 1.0.322 and proven with ab's real cards (mesh and local) on ConfRoomROG. The badge is now on permission cards, bell rows and toasts.

Log in to reply.