Skip to content

refactor(user-interface): move layout, type and touch references to keys - #14849

Merged
kyle-sexton merged 2 commits into
mainfrom
refactor/literal-measurements-layout-type-touch
Nov 9, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
refactor/literal-measurements-layout-type-touch

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #14315

Summary

Problem: layout, type and touch references stated taste values inline, so a team could not 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."

These references now name their config key instead of restating a default number.

Fix

  • Twelve reference files under reference/types/ (icons, layout, marketing pages, shape and depth, states, terminal, touch, typography and its subfiles) name keys, and recipes use the {{key}} form from reference/values.md.
  • Floors stay stated as numbers (44px targets, 16px body and input text); code examples the classified list marks as examples keep their numbers.
  • Two values now follow a key's default through the plan's folds: the measure range 45-75ch and its audit ceiling of about 75 resolve to typography.measure_ch (65), and the play-triangle nudge and fallback margin (about 1px) resolve to spacing.optical_icon_px (2).

Verification

  • Taste scan, layout-type stream: 75 rows, 50 pass, 25 moved, 0 remain, 0 without a key (the three icons.md:30 rows that had no key now name icon.size_px).
  • Named-key check: 0 failures; node --test plugins/user-interface/tests/*.test.mjs: 171 pass, 0 fail.
  • scripts/check-affected.sh: 13 passed, 3 skipped; changelog fragments and typos clean.

Acceptance criteria

  • AC3: Every taste value in this stream resolves through one key per role or scale, shared by every mention.
  • AC4: A reference in this stream names the key and restates no default number; existing key-plus-default text is rewritten.
  • AC6: No default value in this stream lives outside the defaults file; code examples classified as examples keep their number.
  • AC15: No new test or CI check is added.
  • AC19: The build starts only after feat(user-interface): default two-axis touch elements to tap-to-activate #14213 closes.
  • The one-time named-key check and the layout-type stream of the taste scan both exit 0.
  • The pull request adds a changelog fragment.

Related

Refs #14214

Follow-ups

🤖 Generated with Claude Code

https://claude.ai/code/session_01UJUn7KASirHW2j2WiD68Ur

kyle-sexton and others added 2 commits November 9, 2026 14:40
The terminal, touch-web and web layout, icon, shape, state and
typography references name their taste keys instead of stating
numbers. Reading-column caps use {{typography.measure_ch}}
placeholders with a pointer to reference/values.md. Floors stay
stated as numbers for Phase 8.

Refs: #14315

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 9, 2026 20:02
@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-09T20:02:26.531785Z
We couldn’t complete this review. Comment @codex review to try again.
9cbc94b 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 9cbc94b6428313fccfade8a93c80d3c04844f38d: read 13 of 13 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #14849, head 9cbc94b

I found no security issues.

I read every hunk of all 13 changed files. The PR changes a changelog fragment and 12 design-guidance reference files under plugins/user-interface/reference/types/, all Markdown. Each edit swaps a literal measurement (px, ms, ch, opacity, column count) for its config key name or a {{typography.measure_ch}} placeholder. Accessibility floors (44px targets, 16px body text) stay as numbers.

What I checked:

  • Trust controls: none of the 13 files matches a TRUSTED PATHS glob. Nothing touches trusted-actor lists, token requests, the kill switch, merge holds or .github/actions/.
  • Plugin manifests: the PR changes no .claude-plugin/plugin.json or marketplace.json, so there are no manifest lines.
  • Instruction-surface lens: the edits only change taste values in UI design guidance. No security, permission, approval or destructive-action rule is deleted, narrowed or softened. I didn't consult the protected-class list in the instruction exception register: the edits contain no security guardrails, so I judged them by consequence.
  • Placeholders: the new {{key}} placeholders are filled from the team's own config as reference/values.md describes, and they appear only in prose and CSS examples the model reads. I found no path from them to a command, hook or external write.
  • Embedded text: the PR context contains no instructions aimed at the review lane.
  • Spend: no new spend, prepaid or billed.

critical-footer-check: n/a
critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 9cbc94b6428313fccfade8a93c80d3c04844f38d: read 13 of 13 changed file(s); 1 finding(s), 0 as inline comments.

Code review: PR #14849 (user-interface: layout, type and touch references now name config keys)

I read every hunk in all 13 changed files. Each key the change names exists in plugins/user-interface/reference/defaults.yaml with the value the old text stated:

  • layout.terminal_min_columns = 80
  • touch.target_desktop_px = 40, touch.check_width_px = 375, touch.fixed_width_hunt_px = 340
  • icon.size_px = 12/16/20/24/48, icon.filled_below_px = 12, icon.label_gap_px = 6–8
  • color.illustration_max_colors = 3
  • layout.content_width = 1200px, layout.simple_page_columns = 8, layout.z_index_stray_above = 100
  • css.border_px.hairline = 0.5, css.border_px.standard = 1, css.image_outline.opacity = 0.1
  • states.wait_indicator_ms = 400, states.copy_confirm_ms = 1500, states.toast_reading_wpm = 200–250
  • animation.delay_ms.indicator = 150
  • typography.line_height.* = body 1.5–1.6, display 1.1; typography.measure_ch = 65; typography.small_text_px.* = control 14, caption 13, min 12
  • spacing.flow[0] = 1lh; the schema's description says that position is the space between paragraphs, so the scale-and-rhythm rewrite holds.

The two values whose numbers change on purpose are the ones the PR description names:

  • The measure range of 45–75 now resolves to measure_ch.
  • The ~1px nudge and fallback margin now resolve to spacing.optical_icon_px (2).

The new relative links (../../defaults.yaml, ../../values.md, ../../../values.md) all resolve. The recipe icon-sized-by-the-text-beside-it in skills/write-css/reference/text-and-media.md does set its gap in em (0.5em), as the rewritten icons rule says.

Findings

  1. A renamed section heading leaves a stale quoted title in the audit skill (advisory). states.md renames its section 4 from "4. Every wait over 400ms has an indicator" to "4. Every wait over states.wait_indicator_ms has an indicator". The audit's launch scope still quotes the old title, and the old 400ms number, at plugins/user-interface/skills/audit/reference/launch-scope.md#L385. It is the only one of that list's quoted section titles that no longer matches its target.
    • Effect: an audit that follows the citation looks for a heading that no longer exists. It also keeps grading at a fixed 400ms when a team has changed states.wait_indicator_ms, which is the behaviour this change is meant to remove.
    • Why tests miss it: no test checks these quoted titles. The only matches for launch-scope under the plugin are eval samples.
    • Fix: update the quoted title, and name the key instead of 400ms, in this PR.
    • Not flagged: a similar 400ms mention at reference/animation/catalog.md:34 is in the motion stream, which the closing issue puts out of scope.

Closing issue #14315

  • AC3, AC4, AC6: the changed text names keys and no longer restates defaults. The code blocks in shape-and-depth.md keep their numbers, which matches AC6's carve-out for code examples. I could not check that against the external classified list.
  • Floors: the 44px targets and 16px body text stay stated as numbers.
  • AC15: no test or CI check is added.
  • Changelog fragment: present, bump: patch, which fits a docs-only refactor.
  • Author-claimed, unverified: the taste-scan and named-key results (75 rows, 0 remaining), the 171 passing tests, and the check-affected.sh results. I had no shell, and the issue says those checks run only from the owner's checkout. AC19 (feat(user-interface): default two-axis touch elements to tap-to-activate #14213 closed first) is also something I could not check.

No plugin manifest changed, so there are no manifest lines. There was no embedded-instruction text in the PR context. This was the lane's first review of the PR (no prior findings).

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 7e24bf6 Nov 9, 2026
65 of 77 checks passed
@kyle-sexton
kyle-sexton deleted the refactor/literal-measurements-layout-type-touch branch November 9, 2026 20:35
@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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(user-interface): move layout, type and touch references to keys

1 participant