Skip to content

feat(ui): add a design guideline for the UI, and pin its typefaces - #93

Merged
FreshlyBrewedCode merged 2 commits into
mainfrom
design-guideline-and-fonts
Sep 13, 2026
Merged

FreshlyBrewedCode merged 2 commits into
mainfrom
design-guideline-and-fonts

Conversation

@FreshlyBrewedCode

Copy link
Copy Markdown
Owner

Two related changes: a written design guideline for the UI, and the first change made under it.

design/design.md

A rough visual guideline in the google-labs DESIGN.md format — YAML token frontmatter for machine-readable values, prose for the reasoning. Deliberately a guideline, not a design system: the Components section pins down only the six identity-carrying pieces (step card, status pill, section label, floating toolbar, ref chip, waypoint) and explicitly defers everything else to shadcn defaults.

Values are read out of the source rather than eyeballed — styles.css, graph-layout.ts, viewport.ts, use-media-query.ts — and the doc says those files stay canonical where it drifts.

What it names as the identity:

  • Achromatic chrome (chroma literally 0 in OKLCH) with status as the only saturated colour, driven by one --status variable and color-mix tints.
  • Amber oklch(0.86 0.176 89.2) as a highlight, not a brand fill — focus ring, selection, hot graph edges. One of the few values identical in light and dark.
  • Mono for anything CLI-typeable, sans for prose. This is load-bearing: it's what tells a real handle from a description.
  • Flat, border-first elevation. Shadows only for things genuinely floating over the canvas.
  • Square corners for data, rounded for chrome. Cards and tables are sharp on purpose.

Three reference screenshots captured from the running app against a throwaway demo project.

Inter + JetBrains Mono

The UI had no font-family of its own, so it inherited Tailwind's platform stack and rendered differently on every OS. Both families are now pinned, chosen for the sizes this UI actually uses — the scale tops out at 18px and most of the app sits at 11–13px.

JetBrains Mono separates 0/O and 1/l/I unambiguously, which matters given the mono rule above.

Self-hosted via Fontsource rather than linked from a CDN, because wayful ui serves the built client from inside the binary and a CDN link would make the embedded UI depend on the network. The old platform stack stays behind each face, so a failed load degrades to the previous look.

Two things worth a look

  • There's now a brief FOUT on cold cache. Fontsource ships font-display: swap. Inter's metrics are close to the system fallback so the reflow is small, but the UI was genuinely flash-free before and now isn't quite. Preloading the latin subset would close it.
  • JetBrains Mono is wider than the old fallback, so long step names eat more of the 218px graph node — layer-the-graph nearly fills its card now. Noted in the doc as something to design around; if it reads too tight, the node wants to be wider or mono wants to drop to 12px on cards.

Validation

bun check green — lint, typecheck, 49 UI tests and 320 CLI tests, 0 failures. npx @google/design.md lint on the doc reports 0 errors; the 22 warnings are all orphaned-tokens, because the dark palette and status colours are documented in prose rather than wired into components entries. That's deliberate — the status tints are derived at runtime from --status, so hard-coding one onto a component token would misrepresent how they work.

Fonts verified in a real browser, not assumed: document.fonts.check() returns true for both families against the running dev server.

🤖 Generated with Claude Code

FreshlyBrewedCode and others added 2 commits September 13, 2026 12:28
The UI had no font-family of its own, so it inherited Tailwind's platform
stack and rendered differently on every OS. Both families are now pinned.

Inter for sans and JetBrains Mono for mono, chosen for legibility at the
sizes this UI actually uses: the scale tops out at 18px and most of the app
sits at 11-13px. JetBrains Mono separates 0/O and 1/l/I unambiguously, which
matters because mono here is not decorative - every step name, type, ref and
slot is a string someone may retype into the CLI.

Self-hosted via Fontsource rather than linked from a CDN: `wayful ui` serves
the built client from inside the binary, so a CDN link would make the
embedded UI depend on the network. The old platform stack stays behind each
face, so a failed load degrades to the previous look.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Records the design identity the UI already has, in the google-labs
DESIGN.md format (YAML token frontmatter plus prose), so new surfaces land
in the same place. Deliberately a guideline rather than a full design
system: the Components section pins down only the six identity-carrying
pieces and defers the rest to shadcn defaults.

Values are taken from the source - styles.css, graph-layout.ts,
viewport.ts and use-media-query.ts - rather than eyeballed, and those files
stay canonical where the document drifts.

The three reference screenshots are captured from the running app against
a throwaway demo project.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@FreshlyBrewedCode FreshlyBrewedCode changed the title Add a design guideline for the UI, and pin its typefaces feat(ui): add a design guideline for the UI, and pin its typefaces Sep 13, 2026
@FreshlyBrewedCode
FreshlyBrewedCode merged commit 3b38ba2 into main Sep 13, 2026
2 of 3 checks passed
@FreshlyBrewedCode
FreshlyBrewedCode deleted the design-guideline-and-fonts branch September 13, 2026 12:42
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