Skip to content

refactor(user-interface): move write-css layout and audit scope to keys - #14852

Merged
kyle-sexton merged 5 commits into
mainfrom
refactor/literal-measurements-write-css-layout-audit
Nov 9, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
refactor/literal-measurements-write-css-layout-audit

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Closes #14316

session: Emil Kowalski X Posts

Summary

Problem: write-css layout, spacing, scroll, text and media recipes and the audit's launch scope 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 recipes now write each configurable value as a {{key}} placeholder, and one new key covers the text-relative icon gap.

Fix

  • Adds icon.label_gap_em (default 0.5, heuristic) beside icon.label_gap_px, the way icon.size_em sits beside icon.size_px (owner decision Q12, 2026-11-09); the two text-relative icon-gap recipes write it.
  • Rewrites write-css foundations, layout, scroll-and-viewport, spacing-and-shape and text-and-media, and audit launch-scope, to name keys; floors stay stated.
  • The WCAG 1.4.4 text-resize limit stays stated as 2.5, and the schema refuses a typography.fluid_max_ratio above it.
  • The breakout track can no longer collapse: max({{layout.breakout_width}}, var(--content) + var(--gutter) * 2).
  • The audit holds each motion role to its own ceiling (duration_ms.large for a dialog or sheet, duration_ms.page for a page transition).

Verification

  • Taste scan, remaining-files stream: 78 rows, 77 pass, 1 moved, 0 remain, 0 without a key.
  • Named-key check: 0 failures; node --test plugins/user-interface/tests/*.test.mjs: 171 pass, 0 fail.
  • scripts/check-affected.sh: 14 passed, 2 skipped; changelog fragments (17) and typos clean.
  • A local code review found 0 critical and 3 important findings: the breakout collapse, the 2.5 ceiling and the page-motion cap. All three are fixed above.

Changed defaults (AC8)

Three recipes now follow their key's default:

  • The content width is layout.content_width (1200px; was 64rem). The breakout track is therefore about 40px a side at a 16px root (was 128px).
  • The prose flow base is spacing.flow (1lh; was 1em).
  • The code-block scrollbar width is spacing.xs.

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; the README Default column stays.
  • 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 remaining-files stream of the taste scan both exit 0.
  • The pull request adds a changelog fragment.

Related

Refs #14214

🤖 Generated with Claude Code

https://claude.ai/code/session_01UJUn7KASirHW2j2WiD68Ur

kyle-sexton and others added 4 commits November 9, 2026 14:38
The write-css foundations, layout, scroll-and-viewport, spacing-and-shape
and text-and-media recipes write each taste value as a {{key}} placeholder,
and each file's header points at reference/values.md. The audit launch
scope names animation.duration_ms.large, animation.skip_frequency and
states.wait_indicator_ms in place of their numbers.

Refs: #14316

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…g safe

The content grid floors --breakout at the content plus two gutters, so a
px content width and a rem breakout width can no longer collapse the
breakout tracks. typography.fluid_max_ratio refuses a value above 2.5,
and foundations.md states that WCAG 1.4.4 ceiling. The launch scope holds
each product-UI motion role to its own duration ceiling, the button icon
gap uses icon.label_gap_em, and the section pair rules and the concentric
card border use spacing.l and css.border_px.standard.

Refs: #14316

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UJUn7KASirHW2j2WiD68Ur
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 9, 2026 20:33
@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:33:16.714491Z
We couldn’t complete this review. Comment @codex review to try again.
d9df09e 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 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on d9df09e29e04c26c60c624a09886c96587690795; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review (incremental, blocking only): PR #14852 at fb3de5c3

Scope. This is an incremental review. I read every hunk in the one file this push changed, plugins/user-interface/skills/write-css/reference/text-and-media.md. This lane already reviewed an earlier head, so this pass reports only blocking findings and manifest flags.

What changed. Line 160: the .button-with-icon gap was {{icon.label_gap_em}}em and is now {{spacing.xs}}. This fixes the advisory finding from the last round, the unexplained switch from rem to em (thread):

  • The button row now uses spacing.xs, which is 0.5rem. That matches its original 0.5rem value, and .card and .cards use the same key.
  • In the full diff, only the two rows that were originally 0.5em (.with-icon and .notice) still write icon.label_gap_em. That matches owner decision Q12 on refactor(user-interface): move write-css layout and audit scope to keys #14316, which assigns the key to "the two gap: 0.5em icon-label rows".
  • The changelog fragment no longer says "three recipes". It now says "the icon-beside-text recipes write it". The PR body's "Changed defaults (AC8)" list stays accurate, because the button gap is back to its original value.

Findings. None. The earlier thread is resolved and its point is fixed, so I did not raise it again.

Closing issue #14316. This push doesn't change how the PR meets the criteria I assessed last round. The PR's reported verification results are the author's claims; I did not check them, because this lane can't run commands.

Manifest. This push changes no plugin.json or marketplace.json.

Trusted paths. The changed file doesn't match any trusted-path glob. Nothing here calls for a cost or security hold.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #14852 (incremental, d9df09e → fb3de5c)

No security issues found. This review covers only the changes since d9df09e. It is blocking only, since this lane already reviewed an earlier head.

Scope

I read the one hunk of the one file in scope, plugins/user-interface/skills/write-css/reference/text-and-media.md. A CSS example in that reference prose changes gap: {{icon.label_gap_em}}em; to gap: {{spacing.xs}};. It is a template placeholder the model fills when it writes CSS for a user's project.

Checks run

  • Trusted paths: the changed file matches no glob on the TRUSTED PATHS: list.
  • Trust controls: none are touched. The change has no workflow, action, merge-hold, token or pipeline-config edits.
  • Plugin manifests: no plugin.json or marketplace.json changes.
  • Instruction-surface lens: no standing instruction is deleted, narrowed or softened. Only one example value's placeholder changes.
  • Injection or data flow: no script, hook or command reads this placeholder, so the change adds no new sink.
  • Embedded instructions: none in the scoped diff.
  • Prior findings: the earlier review of d9df09e reported 0 findings, so there is nothing to carry forward or repeat.

Cost: none. The change cannot start a charge and adds no lane runs.

critical-findings: 0

The button gap was 0.5rem, not 0.5em; only the two em rows take icon.label_gap_em (owner Q12).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UJUn7KASirHW2j2WiD68Ur
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit d383566 Nov 9, 2026
50 checks passed
@kyle-sexton
kyle-sexton deleted the refactor/literal-measurements-write-css-layout-audit branch November 9, 2026 22:17
@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 write-css layout and audit scope to keys

1 participant