Skip to content

refactor(user-interface): move color references to keys - #14835

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

kyle-sexton merged 2 commits into
mainfrom
refactor/literal-measurements-color

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #14314

Summary

Problem: color 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."

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

Fix

  • color.md, color/building-scales.md and color/contrast.md name the keys for the hover mix, border alphas, ramp hue spread and triage lightness; recipes use the {{key}} placeholder form from reference/values.md.
  • Contrast floors (4.5:1, 3:1, 7:1, 9:1, 18pt and 14pt) and example values (oklch swatches, sample hex colors) keep their numbers.
  • Two hue-drift mentions the classified list missed (color.md, "about 10°") now name color.ramp.hue_spread_max_deg too.

Verification

  • Taste scan, color stream: 24 rows, 17 pass, 7 moved, 0 remain, 0 without a key. Moved rows: color.md:127 to 130; building-scales.md:18 to 19; contrast.md:100 to 101; contrast.md:103 to 106.
  • Named-key check: 0 failures across 153 key names; 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 color stream of the taste scan both exit 0.
  • The pull request adds a changelog fragment.

Related

Refs #14214

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 9, 2026 14:34
The color references name the color. keys instead of stating their
numbers: surface triage thresholds, ramp endpoints, chroma curve and
hue-drift limit, hover mix, border values and dark-mode desaturation.
Contrast ratios stay stated as numbers.

Refs: #14314

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

Security review: PR #14835

No security issues found.

I read every hunk of all 4 changed files:

  • .changes/user-interface/refactor-literal-measurements-color-aa1bc24e.md: a new changelog fragment.
  • plugins/user-interface/reference/types/web/color.md
  • plugins/user-interface/reference/types/web/color/building-scales.md
  • plugins/user-interface/reference/types/web/color/contrast.md

What the change does. It edits design-guidance prose only. Inline color numbers are replaced with the names of color.* config keys and {{key}} placeholders that point to reference/values.md:

  • triage lightness thresholds
  • ramp endpoints, chroma curve and hue-spread limit
  • hover mix percentage
  • border alpha and dark-border lightness
  • dark-mode brand desaturation

The WCAG contrast floors keep their numbers.

Checks I ran:

  • Instruction surface. No standing guardrail is deleted, narrowed or softened. The changed text is color and design guidance, not a safety, permission or tool rule, so the instruction-surface lens finds nothing to flag. The instruction exception register was not consulted, because the files changed are not instruction controls.
  • Executable surface. No code, workflow, hook, manifest (plugin.json or marketplace.json), userConfig key or trusted path is touched. The {{key}} placeholders are prose that a model fills in from config. They reach no shell, tool input, path or URL.
  • Trust controls and merge holds. Neither is touched.
  • PR context. It holds no embedded instructions aimed at this lane.

Prior findings: none, and this is not a blocking-only review.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

Code review: no findings

I read all 4 changed files in full: the changelog fragment, color.md, color/building-scales.md and color/contrast.md. This is the first review of this pull request, so all findings were in scope, not only blocking ones.

Checks against the code at this head

  • Every key exists. Each key the change names is in reference/defaults.yaml and team.schema.json. The keys are triage.light_surface_min_l, triage.near_white_l, triage.near_black_l, ramp.endpoints_l, ramp.chroma_percent, ramp.hue_spread_max_deg, hover_mix_percent, border.light_alpha, border.dark_solid_l and dark_mode.brand_desaturation_percent. Each default equals the number it replaces: 0.6, 0.85/0.45, 0.25/0.75/0.3, 0.97/0.22, 30/85, 10°, 15, 0.08, 0.285 and 20–30.
  • Hover mix. The recipe changes from var(--color) 85%, black to var(--color), black {{color.hover_mix_percent}}%. With the default of 15 it gives the same color. It follows the "complement" row in values.md: the placeholder holds the share of black, not 100% - x.
  • Placeholder form and pointer. Code-form placeholders ({{key}}) are used only inside code spans; prose names keys. color.md has the one pointer line to ../../values.md, and that path resolves to plugins/user-interface/reference/values.md.
  • Mid-tone band. The band in contrast.md now runs from the mid-tone value of near_black_l to light_surface_min_l, which matches the old 0.3–0.6.
  • Numbers that should stay, stayed. Contrast floors (4.5:1, 3:1, 7:1, 18pt and 14pt bold) and example values (#e0e0e0, oklch(1 0 none / 0.1), the oklch swatches) keep their numbers, as the issue's out-of-scope and AC6 require.

Closing issue #14314

  • Met in the diff: AC3 (one key per role, every mention shares it), AC4 (no default restated next to a key), AC6 (examples keep their numbers), AC15 (no new test or CI check), and a changelog fragment is added (bump: patch, which fits a reference-only change).
  • Not checked: I have no shell, so I could not run the taste scan, the named-key check or node --test. The PR's results for those (0 remain; 171 pass) are the author's claim. AC19 (the build starts only after feat(user-interface): default two-axis touch elements to tap-to-activate #14213 closes) is about ordering and can't be checked from the diff.

Path-scoped rules. .claude/rules/cost-claims.md covers plugins/*/reference/**, but this change makes no cost claim.

No plugin manifest changed, so the manifest checks do not apply. There were no prior findings and no settled threads, and the PR context contained no embedded instructions.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 768ab43 Nov 9, 2026
78 of 79 checks passed
@kyle-sexton
kyle-sexton deleted the refactor/literal-measurements-color branch November 9, 2026 20:12
@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 color references to keys

1 participant