Face icon system

merged…
osebo41d ago

Can you generate a system of face icons to represent Claude and the status of the task, like this

373AE1CB-B20B-4977-AE06-94C805D54A34.png
373AE1CB-B20B-4977-AE06-94C805D54A34.png
B78E5D50-98B7-480A-8357-4AA1AD9405B3.jpeg
B78E5D50-98B7-480A-8357-4AA1AD9405B3.jpeg
12 repliesoldestnewest
Osebotfable-5-141d ago

Read both references. The second one is the key: a face is background disc + face fill + head shape + eyes/mouth, composed from a small parts kit, and the first image is that kit laid out as a grid (shape columns × expression rows).

Plan:

  1. components/face-icon.tsx: one SVG component that composes a face from parts: shape (round, skull, flame, burst, bunny, crown, halo, cowboy, cloud…), eyes (dots, wide, wink, happy, sparkle, hearts, squint, sleepy, glasses, lookup, x, shades, angry), mouth (smile, grin, flat, frown, o, tongue, grit, smirk, wavy). Colours come from CSS vars only (disc = status ink, face = page colour, features = ink), so it follows light/dark and the terminal palettes with no extra tokens.
  2. lib/faces.ts: the mapping. Thread status → face (open / running / waiting / done / failed / ci_failed / ready / merged, each with its own shape + expression + existing status ink). Claude's avatar → round face whose expression follows the post kind (plan, progress, diff, done, question_back, failed).
  3. Wire it in: the "C" Claude avatar in components/post.tsx, agent-activity.tsx ("Claude is working") and the home Last-reply card becomes the face; StatusBadge (components/bits.tsx) gets the status face in front of the label, so tiles and the thread header show it.
  4. A public, DB-free /faces page (like /themes) rendering the full grid plus both mappings, linked from the avatar menu, so the system is browsable.
  5. Mockup screenshots at 390 / 900px before and after.
Osebotfable-5-141d agothreadide@6f88e24

Shipped on thread/6c1086cf (commit 6f88e24). The face system follows your second reference exactly: ink disc + head shape + eyes + mouth, composed from a parts kit, and /faces lays it out as the shape × expression grid from your first image.

What was built

The kit, components/face-icon.tsx: 9 head shapes (round, skull, flame, burst, bunny, crown, halo, cowboy, cloud) × 13 eyes (dots, wide, wink, happy, sparkle, hearts, squint, sleepy, glasses, look-up, x, shades, angry) × 9 mouths (smile, grin, flat, frown, o, grit, smirk, wavy, none). Pure SVG path data on a 32px grid; 2-unit strokes so the 16px badge version still has 1px lines. Colour is two-tone through --face-ink / --face-paper only, defaulting to the status ink and the page colour, so it works in light, dark and all the terminal palettes without a new token.

The mappings, lib/faces.ts:

Thread statusFaceWhy
openround · dots · smileneutral
runninground · wide eyes · oconcentrating
waitinground · eyes rolled up · wavy mouthwaiting on someone
doneburst · happy · grinfinished
failedskull · x eyesthe run crashed
CI failedround · squint · frownchecks red
readyhalo · sparkle · smilegreen, blessed
mergedcrown · happy · grinshipped

The head shape tells the outcome; the ink is the same colour the solid badge already uses.

Claude is always the round head in the accent ink (an identity, not a status); only the expression follows the post kind: plan = glasses, progress = wide eyes, diff = shades, done = happy grin, question back = eyes up + wavy mouth (in the waiting yellow), failed = x eyes + frown (in the failed red), summary = sleepy.

Where it shows

  • StatusBadge now carries the 16px status face before its label, so home tiles, Last-reply cards and the thread header all have it (inside a solid badge the disc merges with the badge and only the paper head shows, a cut-out).
  • The "C" Claude avatar in posts, in the "Claude is working" strip and in the home Last-reply cards is the face.
  • /faces (avatar menu → Faces, public, no DB) shows both mappings with notes, every ink at the three sizes the app uses, and the whole kit.

Notes for teammates

  • tsc --noEmit is clean. The screenshots are the real components rendered with react-dom/server into static pages that link app/globals.css (the app can't run in the sandbox); checked at 390 / 900 / 1200px, light and dark.
  • Adding a status: one :is(.badge, .face).x { --status: … } rule in globals.css plus an entry in STATUS_FACES.
  • Not touched: the OpenGraph cards (lib/og.tsx) and the Pulp button icons. If you want the faces there too, say so.
/faces page: status faces, Claude per post kind, inks, and the full shape × expression kit (light)
/faces page: status faces, Claude per post kind, inks, and the full shape × expression kit (light)
Thread page mockup: Claude's face changes with the post kind; the status badge carries the status face (light, 900px)
Thread page mockup: Claude's face changes with the post kind; the status badge carries the status face (light, 900px)
Same thread mockup in dark mode
Same thread mockup in dark mode
Home tiles: every status badge with its face (open, running, waiting, done, failed, CI failed, ready, merged)
Home tiles: every status badge with its face (open, running, waiting, done, failed, CI failed, ready, merged)
Status faces at 16px (in badge), 22px and 40px, 2× zoom
Status faces at 16px (in badge), 22px and 40px, 2× zoom
Thread page mockup at 390px
Thread page mockup at 390px
Osebot41d ago

Merged threadide #104 by @osebo (merge, ebac3a0).

oseboasked Osebot41d ago

The open icon has a weird outer container

IMG_8513.jpeg
IMG_8513.jpeg
Osebotfable-5-141d ago

The run crashed before finishing.

Error: Claude Code returned an error result: Credit balance is too low
    at __.readMessages (file:///vercel/sandbox/runner/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs:136:121155)
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
oseboasked Osebot41d ago

Try the last task again

Osebotfable-5-141d ago

Retrying the "open icon" fix. Diagnosis from your screenshot: the open badge is the only status badge that is a framed --fill chip rather than a solid one, and the face inside it still paints its own --faint ink disc. In the solid badges that disc is the same colour as the badge so it disappears (the head reads as a cut-out); in the open badge it shows as a dark circle inside a grey box, which is the "outer container" you're seeing.

Fix: give FaceIcon a separate --face-disc custom property (defaults to the ink), drop it to transparent for any face inside a .badge, and draw the open face's lines in the badge's label colour so the head sits directly on the chip like the solid ones. Nothing changes for standalone faces (/faces, Claude avatar). Then a before/after mockup shot in light and dark.

Osebotfable-5-141d agothreadide@c3c6bfe

Fixed on thread/6c1086cf, commit c3c6bfe.

What was wrong

The open badge is the only status badge that is a framed --fill chip rather than a solid one, and the face inside it painted its own --faint ink disc. On the solid badges that disc is the same colour as the badge so it vanishes and only the head shows (a cut-out); on the open chip it showed up as a dark circle inside a grey box, which is the "outer container" in your screenshot.

What changed

  • components/face-icon.tsx: the backing circle now has its own --face-disc custom property (default = the ink, so nothing else moves).
  • app/globals.css: .badge .face { --face-disc: transparent } because the chip already is the background, and .badge.open .face { --face-ink: currentColor } so the open head is drawn in the same ink as its OPEN label.
  • components/face-gallery.tsx: one sentence on /faces saying that inside a badge the chip stands in for the disc.

Standalone faces (/faces, Claude's avatar, the "Claude is working" strip) and all seven solid badges are untouched; the before/after shots are pixel-identical for those.

Verified

tsc --noEmit clean. Screenshots are the real StatusBadge/StatusFace/ClaudeFace rendered with react-dom/server into tiles linking the live app/globals.css, with a "before" variant that reverts the two rules, in dark and light at 1× and 2×. The app itself can't run in the sandbox.

Note for teammates: if you ever add another framed (non-solid) badge that carries a face, it needs the same currentColor rule; solid badges need nothing.

Home tiles, dark: before (disc inside the open chip) vs after (head drawn straight on the chip)
Home tiles, dark: before (disc inside the open chip) vs after (head drawn straight on the chip)
Same before/after in light mode; solid badges are unchanged
Same before/after in light mode; solid badges are unchanged
After, with the open / running / done badges at 2x zoom at the bottom
After, with the open / running / done badges at 2x zoom at the bottom
Diff · 3 files
--- a/threadide/components/face-icon.tsx
+++ b/threadide/components/face-icon.tsx
@@
 const PAPER = "var(--face-paper)";
+const DISC = "var(--face-disc, var(--face-ink))";
@@
-      <circle cx="16" cy="16" r="16" fill={INK} />
+      <circle cx="16" cy="16" r="16" fill={DISC} />
--- a/threadide/app/globals.css
+++ b/threadide/app/globals.css
@@
 .face { display: inline-block; flex: none; vertical-align: middle; border-radius: 50%; --face-ink: var(--status, var(--faint)); --face-paper: var(--bg); }
-.badge .face { margin: 0 1px 0 -5px; }
+.badge .face { margin: 0 1px 0 -5px; --face-disc: transparent; }
+.badge.open .face { --face-ink: currentColor; }
--- a/threadide/components/face-gallery.tsx
+++ b/threadide/components/face-gallery.tsx
@@
-        One face is four layers: a disc in the status ink, a head shape, eyes and a mouth. The shape says what became
+        One face is four layers: a disc in the status ink, a head shape, eyes and a mouth. Inside a status badge the chip stands in for the disc, so only the head shows. The shape says what became
oseboasked Osebot41d ago

Great! Also the faces aren’t always vertically aligned with the text like in ready for example

Osebotfable-5-141d ago

Diagnosis: inside a badge the ink disc is transparent, so only the head shape is visible, and the shapes with a hat (halo for ready, crown for merged, cowboy, bunny) draw their head LOWER in the 32px grid to leave room for the hat. The SVG box is centred on the label, but the visible head isn't: ready's head sits ~1px below the text centre at 16px, merged's ~0.75px, while open / running / done are exact. Standalone faces don't show it because the disc defines the box.

Fix: each shape declares its head centre, and FaceIcon gets an align="head" mode (used by StatusBadge only) that translates the drawing so the head centre lands on the SVG centre; .badge .face gets overflow: visible so the halo/crown tip isn't clipped. Disc-aligned faces (/faces, avatars) are unchanged. Then measure the head vs label offsets in a Playwright mockup for all eight badges, before and after.

Osebotfable-5-141d agothreadide@de83758

Fixed on thread/6c1086cf, commit de83758 (same PR as the open-chip fix, #106).

What was wrong

Inside a badge the ink disc is transparent, so only the head shape shows. The shapes that wear a hat draw their head LOW in the 32px grid to leave room for the hat inside the disc: halo (ready) at 18.3, crown (merged) at 17.5, and the skull (failed) sits high at 14.75. The 16px SVG box is centred on the label, but the visible head isn't. Measured at 16px: ready's head was 1.15px below the label centre, merged's 0.75px below, failed's 0.6px above; the five round-headed statuses were exact. On a phone at 3x that is 3.5px, which is what you saw.

What changed

  • components/face-icon.tsx: every shape declares headY (centre of the visible head, hat excluded). FaceIcon takes align="disc" | "head"; "head" wraps the drawing in a <g transform="translate(0, 16 - headY)">.
  • components/bits.tsx / components/faces.tsx: StatusBadge passes align="head" through StatusFace. It is the only caller; standalone faces (/faces, Claude's avatar, the working strip) keep the disc alignment and are pixel-identical.
  • app/globals.css: .badge .face { overflow: visible } so the crown tip can poke 1px past the 16px box inside the 18px chip (the halo is ink-on-ink inside a solid badge, so it was never visible there).

Verified

tsc --noEmit clean. Mockup = the real StatusBadge rendered with react-dom/server into tiles linking the live app/globals.css, with a "before" variant that renders the face without align. A Playwright measurement of head centre vs badge centre after the change gives 0.00px for all eight statuses (label centre is also 0.00px). Screenshots in dark at 3x with a guide line through each badge's centre, and the home tiles in light at 2x.

Note for teammates: a new shape must set headY, or it will sit off-centre in badges.

3x: before (top two rows) vs after (bottom two rows), red guide at each badge's centre. Ready, merged and failed heads now sit on the line.
3x: before (top two rows) vs after (bottom two rows), red guide at each badge's centre. Ready, merged and failed heads now sit on the line.
Home tiles, light, 2x: before (main) vs after (this branch) for all eight statuses.
Home tiles, light, 2x: before (main) vs after (this branch) for all eight statuses.
Osebot41d ago

Merged threadide #106 by @osebo (merge, f437f97).