Skip to content

feat(app): shared card, badge, tone and empty-state pieces - #137

Merged
httpsphl merged 3 commits into
mainfrom
feat/design-primitives
Oct 3, 2026
Merged

httpsphl merged 3 commits into
mainfrom
feat/design-primitives

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Design system, slice 3: the shared pieces the audit found missing. The look is unchanged except where the old copies disagreed.

New in app/src/ui/

  • tone.ts: one table of classes per tone (accent, work, ok, warn, danger, quiet) for text, soft fill, border, notice frame and solid fill. Words in the accent use accent-text (from feat(app): color and corner tokens that read in both themes #136).
  • Badge.tsx: Badge (a word in a soft pill, optionally with an icon) and CountBadge (the round number).
  • ChatCard.tsx: IconBadge (the round icon at a card's head), RequestCard (compact, with the border in its tone), SectionCard (head, body and footer), NoteInput / NoteArea (the owner's note), and SettledLine (the one line an answered card shrinks to, optionally opening to show what was asked).
  • EmptyState.tsx: the resting mascot with a title and text.

Moved onto them

  • Cards: command / tool approval, site, browser help, plan, bot suggestion, routine request and question. About 400 lines of repeated markup are gone.
  • Selos: the chief badge, "Bypass" in the bot header, "Resting" / "Live" in the browser panel and "New" in the files panel.
  • Counts: the unread count on crews (sidebar and crews page) and the question count.
  • Tones: Callout, the chat notices and the bot state use the tone table.
  • Empty states: the empty browser, files, screens and question box.

Small visual changes (the old copies disagreed)

  • Soft fills are all at /12: the chief, bypass and "live" badges were at /10.
  • Notice borders are all at /40: Callout was at /45.
  • The "New" file tag gets the standard pill padding.
  • Badge icons are 12 px: "Resting" had 11.
  • The archived crew's round icon has a 15 px glyph instead of 14.

Checks

  • pnpm check passes (327 tests).
  • Checked in the pnpm dev preview: the command request, the plan card, the sidebar counts and the question box.

Spec 15.3 lists the shared pieces. Next slices: a living catalog page (4), docs/design-system.md (5), and a guard test for hex colors and off-scale corners (6).

ui/tone.ts holds one class table per tone; ui/ChatCard.tsx has the
round icon, the compact request card, the card in sections, the note
fields and the settled line. The approval, site, help, plan,
suggestion, routine request and question cards are built from them.
Badge and CountBadge replace the hand-written pills and counts; the
Callout, the chat notices and the bot state read the one tone table, so
notice borders agree at /40; EmptyState draws the empty browser, files,
screens and question box. Spec 15.3 lists the shared pieces.
@httpsphl
httpsphl merged commit a3538fe into main Oct 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant