Skip to content

T-ROYV-design-language-layer-consumer-hygiene

Status: open/ready · Impact: medium · Complexity: small

Two costs @determined/ui imposes on every consumer, both found by the zoo adoption review (#1509): the layer’s .stories.ts/.test.ts files get swept into consumer typecheck programs (forcing per-app @types/* additions and tsconfig excludes — zoo had to work around it), and a consumer that also imports Tailwind itself ships the preflight/base layer twice (zoo’s built CSS fell 422KB → 234KB when deduped; sdf desktop has the same redundant import today). Fix both at the layer, once.

LocationRole today
packages/ts/ui/Ships stories/tests inside the layer dir with no consumer-side exclusion; ships main.css importing tailwindcss.
apps/zoo/src-nuxt/nuxt.config.tsCarries the workaround: typescript.tsConfig.exclude for the layer’s stories + added @types/node/@types/bun.
solutions/ontological/desktop/src-nuxt/Still carries a redundant tailwind/@nuxt/ui import (same duplicate-preflight cost, unmeasured).

The layer excludes its stories/tests from consumer type programs itself (tsconfig/layer config, so zoo’s workaround becomes deletable), and the one-import rule for the layer’s CSS is enforced: consumers don’t import tailwindcss/@nuxt/ui css that the layer already provides. sdf desktop’s redundant import removed; other consumers audited.

  1. Reproduce the consumer typecheck sweep in a minimal consumer; fix at the layer (exclude patterns where the layer declares its files, or move stories/tests out of the consumed app/ tree).
  2. Delete zoo’s workaround; verify zoo CI still green.
  3. Sweep every consumer for duplicate tailwind/@nuxt/ui css imports (desktop confirmed; check shell, suspenders, pumice, agentpants, learn_web, vimit_prototype, augmented_web); remove, measure built-CSS delta, screenshot parity per the repo rule.
  4. Note the one-import rule in design-system.md / S-0010.
LocationKindChange
packages/ts/ui/modifystories/tests excluded from consumer programs
apps/zoo/src-nuxt/nuxt.config.tsmodifydrop the workaround
solutions/ontological/desktop/src-nuxt/modifydrop the redundant css import
packages/ts/ui/docs/design-system.mdmodifyone-import rule
  • AC-1: A consumer extending the layer typechecks without naming the layer’s stories/tests or adding @types/* for them.
  • AC-2: zoo’s workaround is gone and zoo CI is green.
  • AC-3: No consumer ships the preflight twice (built-CSS spot checks; desktop’s redundant import removed with pixel parity).
  • Land after the Phase 3 adoption PRs merge (they add the consumers to audit, and zoo’s workaround lands in #1509).
  • Zoo adoption review (2026-08-28, #1509): CI-only typecheck failures from the layer’s stories/tests; 422KB → 234KB built CSS after deduping the preflight; desktop named as carrying the same pattern.

← Back to Tasks