Skip to content

feat(user-interface): add the full taste-measurement key set - #14820

Merged
kyle-sexton merged 3 commits into
mainfrom
feat/literal-measurements-full-key-set
Nov 9, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
feat/literal-measurements-full-key-set

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Closes #14312

Why

Problem: most user-interface measurements are stated inline, so a team cannot change them through config. Intent: "Everything should be configurable and extensible. We should never be hardcoding specific font sizes or ranges or any specific measurements and approaches."

This adds every approved taste key to the defaults file, the schema and the README, so the sweep phases can point references at them.

What changed

  • The full key set: 101 roles in 112 leaves, including animation.scale.press_min (default 0.95), the lower limit audit will report a project press scale below (owner decision Q11; the audit check itself lands in a later phase).
  • Each default records its source: course keys in docs/upstream/aiforui-course.md, Emil Kowalski keys in docs/upstream/emilkowalski-skills.md, independent values in a new links-only record docs/upstream/user-interface-default-sources.md, and heuristics labeled in the defaults comments.
  • Floor-bounded keys and touch.target_desktop_px carry schema minimums; a team value below one is refused and the default applies.

Scope

Verification

  • node --test plugins/user-interface/tests/*.test.mjs: 171 pass, 0 fail.
  • A team file setting touch.target_desktop_px: 20 resolves to 40 and lists the key in the team layer's error_keys; detect.mjs --config output is 26,617 characters, under the 28,000 limit.
  • The named-key check finds 0 failures across 137 key names and 72 README rows; changelog fragments and typos are clean; the diff holds no course text and no path into the course files.

Changed defaults and heuristics (AC8)

  • Changed: animation.easing.out moves from 0.23, 1, 0.32, 1 to 0.32, 0.72, 0, 1 (course). Hover leaves animation.duration_ms.medium for its own animation.duration_ms.hover, 150. animation.blur_max_px now has a source and is no longer a heuristic.
  • Heuristics (no upstream source): animation.easing.in; color.subtle_mix_percent; icon.size_px; layout.breakout_width, grid_track_min_width, media_aspect_ratio, media_small, panel_max_height, sidebar_width; radius.l; spacing.control_padding, spacing.section and the heading parts of spacing.flow; typography.fluid_body, fluid_scale, fluid_max_ratio.
  • The 15 eval files holding the old ease-out curve were read; none has a grader tied to that curve, so none changed.

Acceptance criteria

  • AC3: Each taste role or scale has one key in the defaults file and schema.
  • AC5: Every default follows this order: the course record on a conflict, then Emil Kowalski's latest source, then today's number; where mentions differ and he is silent, research picks, then the most common number labeled heuristic. A floor holds over any of these.
  • AC6: Default values live only in reference/defaults.yaml; the defaults test and README are the only other copies.
  • AC7: Each default records its source; a value with no upstream records it in one links-only record under docs/upstream; a value with none is labeled heuristic in the defaults comment.
  • AC8: The owner received a list of every default whose shipped number changed and every heuristic.
  • AC10: A taste key bounded by a floor has a schema minimum.
  • AC15: No new test or CI check is added; each new key joins the existing defaults test, written first.
  • AC19: The build starts only after feat(user-interface): default two-axis touch elements to tap-to-activate #14213 closes.

Related

Refs #14214

Review

Local code review: 0 critical, 2 important, 3 suggestions. Fixed: icon.size_px no longer requires exactly 5 sizes, since an unnamed ladder is one list. Kept as planned: typography.fluid_scale.size_wide_rem has no 16px-equivalent minimum; the plan puts the floor only on the narrow end. Not changed: the focus_ring.width floor sits inside max(), where a schema cannot check it; the course-sourced px keys stay integers.

Follow-ups

  • Pre-existing (advisory): the README prose after the key table still says "the spacing key" and "the typography key" as if each namespace held one key.

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 9, 2026 14:00
Phase 3 of the literal-measurements plan: every taste role gets a config
key in defaults.yaml, team.schema.json, the README key table and the
defaults test, 101 roles in 112 leaves, including animation.scale.press_min
(0.95, the lower limit the audit reports a press scale below).

- touch.target_desktop_px, typography.fluid_body.min_rem and
  typography.fluid_scale.size_narrow_rem carry schema minimums at their
  floors (24px target size, 16px body).
- animation.easing.out moves to 0.32, 0.72, 0, 1; hover gets its own
  duration key and leaves medium; duration keys are stated as both the
  value a recipe writes and the role's ceiling.
- Sources: course keys per unit in aiforui-course.md, Emil keys at the
  pin in emilkowalski-skills.md, independent keys in the new
  user-interface-default-sources.md, heuristics labeled in defaults.yaml.

Refs: #14312

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

PR body contract — issue linkage

This PR body does not yet satisfy the issue-linkage contract:

  • Missing a "## Summary" section. Describe what this PR changes and why, in a sentence or two.
  • Missing a "## Fix" section. State the concrete change and how it addresses the problem.

Edit the body and this comment updates itself on the next run.

@github-actions github-actions Bot added the needs-issue-linkage Pull request body has no issue linkage line; set by the check-contract step, advisory. label Nov 9, 2026
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 9, 2026 19:08
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T19:08:33.389920Z
We couldn’t complete this review. Comment @codex review to try again.
cd95280 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed cd95280701caf0dc6bb6e26731fddba1cda6c0af: read 8 of 8 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #14820 (feat(user-interface): add the full taste-measurement key set)

Result: no security issues found.

I read every hunk of all 8 changed files in .claude-lane/pr.diff.

What changed

  • The user-interface plugin gets new design-measurement keys: animation, color, css, icon, layout, performance, radius, spacing, states, touch and typography. They are added to reference/defaults.yaml, reference/team.schema.json and the README key table.
  • tests/defaults.test.mjs gets matching contract values, plus tests that a value below a key's floor is refused.
  • There are new and expanded provenance records under docs/upstream/ and one changelog fragment.

Why there is nothing to report

  • No trust controls touched. None of the 8 files matches a TRUSTED PATHS: glob. The diff does not change anything under .github/, the trusted-actor list, the token broker, the kill switch, any merge hold or any workflow.
  • No plugin manifest changed. No plugin.json or marketplace.json is in the diff. The test passes values in through userConfig names such as touch_target_desktop_px, but the resolver maps those names, and no userConfig field is added or changed.
  • The schema only gets tighter. Every new key has an explicit type, every new object sets additionalProperties: false, and several new keys get floors (touch.target_desktop_px minimum 24, typography.fluid_body.min_rem and typography.fluid_scale.size_narrow_rem minimum 1). I found no loosened constraint and no new code path.
  • CSS string values have no exploit path. Some new keys are free-form strings, for example layout.*, radius.*, spacing.*, css.edge_fade.length and css.focus_ring.width. Skills will write them into a project's CSS. They come from the team's own config cascade or the plugin defaults, not from an untrusted outside party, and this diff adds no code that reads them. Later sweep phases (refactor(user-interface): move motion references to keys #14313 to refactor(user-interface): move write-css layout and audit scope to keys #14316) will add those reads, and that is where this would be checked.
  • The upstream docs are links only. docs/upstream/user-interface-default-sources.md adds some links to default branches with no pin (Radix, Material Web, Primer, Polaris, Phosphor, react-icons). They are reading material for a person re-checking a default. Nothing fetches or runs them automatically, so they are not a supply-chain risk.
  • No standing instruction deleted. The only removed text is changed comment and description wording in defaults.yaml and the schema, for example blur_max_px no longer described as a heuristic. No guardrail is removed.
  • No embedded directives. The PR context contains no text telling the lane to pass, skip or drop anything.

There are no prior findings, and this is the lane's first review of the pull request, so the review was not blocking only.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed cd95280701caf0dc6bb6e26731fddba1cda6c0af: read 8 of 8 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

I read every hunk of all 8 changed files in .claude-lane/pr.diff. This is the first review of this pull request (0 earlier heads, not blocking only), and there were no settled threads.

What the change does: it adds the full set of user-interface taste keys to reference/defaults.yaml, reference/team.schema.json, the README key table and tests/defaults.test.mjs. It also records where each default comes from in the upstream records, and adds a minor-bump changelog fragment.

Checks against the code:

  • Values match: I checked every new leaf. Its default in defaults.yaml matches the CONTRACT object in the test and the README row, in value and in order. Examples are color.triage.near_black_l, animation.duration_ms (hover sits between press and small), layout.* and typography.fluid_scale.*.
  • No name collisions: config-cascade.mjs turns each schema key into a flat userConfig name, and throws when two keys produce the same name (plugins/user-interface/scripts/lib/config-cascade.mjs, flatNames). I found no collision among the new keys. The tests call resolve() against the schema, so a collision would fail them.
  • New floor tests: the new tests use names such as touch_target_desktop_px and animation_scale_press_min. They follow the same path.join("_") mapping as the tests already in the file.
  • Updated padding test: the control-padding test now spreads defaults.spacing. Without that, its "valid" case would drop the new spacing keys from the defaults layer.

Closing issue #14312, acceptance criteria:

  • AC3: met. Each new key appears in both the defaults file and the schema.
  • AC6: met. Values appear only in defaults.yaml, the test and the README. The upstream records list key names and links only. The changelog fragment holds provenance, which the issue's constraints allow.
  • AC7: met. Every new key either has a source row in aiforui-course.md, emilkowalski-skills.md or the new user-interface-default-sources.md, or is labeled heuristic in a defaults.yaml comment. I checked them one by one.
  • AC10: met, and a test can fail if it breaks. touch.target_desktop_px has minimum: 24, and typography.fluid_body.min_rem and typography.fluid_scale.size_narrow_rem have minimum: 1. The new test "a floor-bounded key refuses a value below its floor and keeps its default" covers all three, as does the press_min test.
  • AC15: met. The new tests join the existing defaults test file, and no CI check is added.
  • Owner decision Q11 (animation.scale.press_min, default 0.95): met, and tested.
  • Not checked from the diff: AC5 (which number wins), AC8 (the list the owner received), AC19 (the order the work started in) and the eval-file read are process criteria. The PR body says they were done; that claim is the author's and unverified.

Author-claimed and unverified: I did not run these myself.

  • 171 tests pass.
  • The detect.mjs --config output is 26,617 characters.
  • The named-key check found 0 failures.

Path-scoped rules: .claude/rules/cost-claims.md matches the docs/**/*.md and reference/** files. None of the changed text makes a cost claim.

Spend: none. This change adds no billing and no lane-run spend.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit f310b01 Nov 9, 2026
92 of 106 checks passed
@kyle-sexton
kyle-sexton deleted the feat/literal-measurements-full-key-set branch November 9, 2026 19:27
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) needs-issue-linkage Pull request body has no issue linkage line; set by the check-contract step, advisory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(user-interface): add the full key set with recorded sources

1 participant