Skip to content

Epic: styling layers — bridge host themes into a2tea #54

Description

@joestump-agent

Tracking epic for the styling/theming work proposed in docs/proposals/styling-layers.md.

Context

The A2UI theming model works in layers: agents send semantic hints only (usageHint: "h1", button primary/borderless), the catalog maps hints to styled components and owns the theming solution (on the web: --a2ui-* CSS variables with minimal specificity), and the host/platform overrides those tokens.

a2tea is the catalog implementation for terminals, and it already has the right skeleton: render.Styles + DefaultStyles() + WithStyles (#31), monochrome by construction so the host theme wins. This epic completes that story so a host like crush can map its full semantic palette onto surfaces:

  • complete the style token set (per-component slots + chrome glyphs — the terminal analog of the web catalog's CSS variables)
  • honor more semantic hints from the basic catalog
  • support lossless live restyling for hosts with runtime theme switching

Two invariants are not changing:

Issues

Bug (ship first, independent):

Core (in order):

Hint upgrades (parallel after #56):

Docs:

Standing:

Sequencing

  1. TextField variant: "obscured" renders the value in cleartext #55 (bug fix, independent of everything else)
  2. Expand render.Styles into a complete token set (component slots + Glyphs) #56 (token set) — everything else styling-related builds on it
  3. Add Surface.SetStyles for lossless live restyling #57 + Give Button variant: "primary" a visual identity via ButtonPrimary slots #58/Optional per-level heading styles (H1–H5) #59/Honor Image variant size hint (icon/avatar vs feature/header placeholders) #60 (parallelizable after Expand render.Styles into a complete token set (component slots + Glyphs) #56)
  4. wire-format.md: audit and document every dropped hint (Weight, Accessibility, Checks, Align/Justify, field variants) #61/Website: add a Theming page documenting Styles, Glyphs, WithStyles, and SetStyles #62/Refresh stale AGENTS.md (styling architecture, events, interactivity, deps) #63 (docs, once the API is settled)

The consuming side (crush mapping its quickstyle palette onto these tokens, A2UI-over-MCP) is tracked in the crush fork — see docs/proposals/a2ui-mcp.md there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions