feat(rituals): override space/radius/border tokens to match app (design #51) #73

Merged
peterswimm merged 1 commit from feat/rituals-space-radius-border-override into main 2026-07-29 01:02:29 +00:00
Owner

Summary

Resolves #51 (option a, per ville's + Peter's discussion on the issue): adds Brand/UDG/products/rituals/dtcg/{space,radius,border}.json overrides so the canonical DTCG tokens match the values the Rituals Flutter app already ships in production (token_registry.dart), instead of silently colliding under the same names (e.g. space.5 20px vs. canonical 32px).

  • space: overrides space.3/4/5/6/8 to the app's linear values. space.7 intentionally omitted (no app equivalent) per ville's stated preference — baseline keeps 56px, unconsumed.
  • radius: overrides sm/md/lg to 4/8/12px (app values). full (999px) already matches, not overridden.
  • border: overrides width 1px→2px (ville's 2026-07-02 1px retirement, token_registry.dart:224). Adds new canonical width-accent (2px) for the app's borderAccent token, which had no upstream name. Does not add a name for focusRing — verified dead code (zero production callers) in the app; filed Toolville_Rituals#191 to remove it there instead of inventing an upstream name for an unused token.
  • Bumps rituals 1.1.0 → 1.2.0 in udg/products/rituals/meta.yml + udg/config/sync-manifest.yml (the publish gate rejects a duplicate version).

Blast radius (per docs/reviews/token-divergence-2026-07-23.md's per-surface audit): the Rituals Flutter/macOS app requires zero code changes — it already ships these exact values. Only rituals-web (consumes dist/rituals/skin.css via package-bump) and this repo's own design-tool previews/artifact move to match the app on their next build. Flagging for whoever next bumps the udg dependency in rituals-web: layouts sourced from var(--space-3..8) will resize to match the app's linear scale.

Also in this PR (found while reproducing CI locally, unrelated to #51)

  • Docs drift: regenerated stale artifact.{docx,pdf,pptx}/template.potx/block-catalog.svg for fux-capacity, peterswimm, spelwork, tctd, toilville — just check's docs gate was already failing on main before this PR (left behind by the last merged ux.yml-extension commit).
  • Workflow fix: udg-native-sync.yml (the workflow this PR's own dist/rituals/udg_tokens.* changes will trigger) ran actions/checkout@v4 on a bare host runner with no Node available. Pinned container: python:3.12-slim + added a Node-install step, matching the established pattern in udg-dist-check.yml.

Known pre-existing failures NOT fixed here

test_bespoke_canonical_palettes_are_covered and test_missing_primary_role_skips_primary_states in generator/tests/unit/test_derived_states.py fail on main (before this PR too). They assert a per-product CSS-var naming scheme that contradicts the explicit "keeps the standard contract" intent documented in the affected color.json files' own $description, and don't match the files' actual data shape (e.g. asserting fux-capacity has no primary token, when it has a real brand.primary). Filed #72 for ville to clarify intent — did not touch real brand color data to force these to pass.

Test plan

  • just build — regenerates dist/rituals/* with the new override values
  • just check — full gate (drift, docs, WCAG AA, forgeblock) passes clean
  • python -m pytest generator/tests/ — 155 passed, 2 known-failing (see above, tracked in #72)
  • yamllint --strict .forgejo/workflows/ — clean
  • Manually diffed dist/rituals/skin.css space/radius/border block against the app's token_registry.dart values
  • Comment posted on #51 summarizing this direction before opening the PR
  • Toolville_Rituals#191 filed and linked (focusRing cleanup)
  • toilville-design#72 filed and linked (stale derived-states tests)
## Summary Resolves #51 (option **a**, per ville's + Peter's discussion on the issue): adds `Brand/UDG/products/rituals/dtcg/{space,radius,border}.json` overrides so the canonical DTCG tokens match the values the Rituals Flutter app already ships in production (`token_registry.dart`), instead of silently colliding under the same names (e.g. `space.5` 20px vs. canonical 32px). - **space**: overrides space.3/4/5/6/8 to the app's linear values. `space.7` intentionally omitted (no app equivalent) per ville's stated preference — baseline keeps 56px, unconsumed. - **radius**: overrides sm/md/lg to 4/8/12px (app values). `full` (999px) already matches, not overridden. - **border**: overrides `width` 1px→2px (ville's 2026-07-02 1px retirement, `token_registry.dart:224`). Adds new canonical `width-accent` (2px) for the app's `borderAccent` token, which had no upstream name. Does **not** add a name for `focusRing` — verified dead code (zero production callers) in the app; filed Toolville_Rituals#191 to remove it there instead of inventing an upstream name for an unused token. - Bumps `rituals` 1.1.0 → 1.2.0 in `udg/products/rituals/meta.yml` + `udg/config/sync-manifest.yml` (the publish gate rejects a duplicate version). **Blast radius** (per `docs/reviews/token-divergence-2026-07-23.md`'s per-surface audit): the Rituals Flutter/macOS app requires **zero code changes** — it already ships these exact values. Only `rituals-web` (consumes `dist/rituals/skin.css` via package-bump) and this repo's own design-tool previews/artifact move to match the app on their next build. Flagging for whoever next bumps the `udg` dependency in rituals-web: layouts sourced from `var(--space-3..8)` will resize to match the app's linear scale. ## Also in this PR (found while reproducing CI locally, unrelated to #51) - **Docs drift**: regenerated stale `artifact.{docx,pdf,pptx}`/`template.potx`/`block-catalog.svg` for fux-capacity, peterswimm, spelwork, tctd, toilville — `just check`'s docs gate was already failing on `main` before this PR (left behind by the last merged ux.yml-extension commit). - **Workflow fix**: `udg-native-sync.yml` (the workflow this PR's own `dist/rituals/udg_tokens.*` changes will trigger) ran `actions/checkout@v4` on a bare host runner with no Node available. Pinned `container: python:3.12-slim` + added a Node-install step, matching the established pattern in `udg-dist-check.yml`. ## Known pre-existing failures NOT fixed here `test_bespoke_canonical_palettes_are_covered` and `test_missing_primary_role_skips_primary_states` in `generator/tests/unit/test_derived_states.py` fail on `main` (before this PR too). They assert a per-product CSS-var naming scheme that contradicts the explicit "keeps the standard contract" intent documented in the affected `color.json` files' own `$description`, and don't match the files' actual data shape (e.g. asserting fux-capacity has no `primary` token, when it has a real `brand.primary`). Filed #72 for ville to clarify intent — did not touch real brand color data to force these to pass. ## Test plan - [x] `just build` — regenerates `dist/rituals/*` with the new override values - [x] `just check` — full gate (drift, docs, WCAG AA, forgeblock) passes clean - [x] `python -m pytest generator/tests/` — 155 passed, 2 known-failing (see above, tracked in #72) - [x] `yamllint --strict .forgejo/workflows/` — clean - [x] Manually diffed `dist/rituals/skin.css` space/radius/border block against the app's `token_registry.dart` values - [x] Comment posted on #51 summarizing this direction before opening the PR - [x] Toolville_Rituals#191 filed and linked (focusRing cleanup) - [x] toilville-design#72 filed and linked (stale derived-states tests)
feat(rituals): override space/radius/border tokens to match app (design #51)
Some checks failed
UDG dist drift gate / dist/ matches dtcg + udg sources (pull_request) Successful in 24s
Test Generator / lint-workflows (pull_request) Successful in 26s
Security Scans / Gitleaks secret scan (pull_request) Successful in 29s
Test Generator / lint-prose (pull_request) Successful in 29s
Security Scans / Trivy filesystem scan (pull_request) Successful in 35s
Test Generator / test (pull_request) Failing after 48s
e7dcd4a194
Adds Brand/UDG/products/rituals/dtcg/{space,radius,border}.json overrides
so the canonical DTCG tokens match the values the Rituals Flutter app
already ships (deliberate prior design decisions per token_registry.dart),
resolving the silent same-name/different-value collision documented in
docs/reviews/token-divergence-2026-07-23.md. space7 intentionally omitted
(no app equivalent); border.width-accent added as a new canonical name for
the app's borderAccent token (no canonical name previously existed).
Bumps rituals 1.1.0 -> 1.2.0 per the sync-manifest version gate.

Also fixes two unrelated pre-existing CI gates found while reproducing
`just check`/pytest locally before push:
- Regenerates stale docs (docx/pdf/pptx/potx/svg) for fux-capacity,
  peterswimm, spelwork, tctd, and toilville, left behind by the last
  merged ux.yml-extension commit.
- Pins a container + installs Node before the first JS action in
  udg-native-sync.yml (the workflow this PR's own dist/rituals/udg_tokens.*
  changes would trigger), matching the established :host-executor pattern.

Not fixed here (filed separately, see linked issues): two test_derived_states.py
tests assert a per-product CSS-var naming scheme that contradicts the
explicitly documented "keeps the standard contract" intent in the affected
color.json files and doesn't match their actual data shape - toilville-design#72.
peterswimm deleted branch feat/rituals-space-radius-border-override 2026-07-29 01:02:29 +00:00
Sign in to join this conversation.
No description provided.