Skip to content

fix(theme): text fields and checkbox and radio boxes get an edge at 3:1 - #11658

Open
cixzhang wants to merge 32 commits into
mainfrom
fix/color-border-control
Open

cixzhang wants to merge 32 commits into
mainfrom
fix/color-border-control

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

Accessibility fix with one new theme role. Text fields and checkbox and radio boxes get an edge people can find.

User impact

  • Anyone finding a text field on a page: the field's edge is often the only cue to where it is, because the field surface differs from the page by about 1.1:1. That edge used --color-border-emphasized, which reached only 1.37–2.22:1 in Core's default theme, below the 3:1 that WCAG 2.2 SC 1.4.11 asks for. It now uses a new role, --color-border-control, at 3:1 or more against the surface and the page body in Core, in every first-party theme, and in generated themes.
  • Checkbox and radio users: unchecked boxes use the same edge. Checked and disabled boxes are unchanged.
  • One trade-off, Butter dark: Butter's dark checkbox and radio boxes had a stronger edge than its fields. They now share the field edge, so they get lighter, from 4.33:1 to 3.08:1 against the card, which still meets 3:1.
  • Everything else: cards, dividers, the raised ChatComposer and every other use of --color-border-emphasized keep their lighter edge. The flat ChatComposer (elevation="none") is the one exception: its edge is the only cue to where you type, so it draws the control edge.
  • Theme authors: a theme that doesn't set --color-border-control gets Core's default. A custom theme that set only --color-border-emphasized for its field edges now gets Core's default control edge, and can set --color-border-control to suit its palette.

Authority

Behavior Record and clause
The new role and what uses it architecture:theme-tokens DEC-2 (owner decision), INV10 (control is a role)
3:1 against the surface and the page body architecture:theme-tokens INV13
The hover ring follows the edge; InputGroupText, PanelSearchInput and PowerSearch follow; generated themes derive the role Rulings on INV13 and DEC-2

Change

  • Core: --color-border-control is light-dark(#878D95, #666A70) (light 3.35:1 on the surface, 3.03:1 on the body; dark 3.02:1 and 3.47:1).

  • Field shell: inputStyles (resting edge, hover ring and disabled edge), the five restores in inputDisabledFocus (including a disabled collapsed Tokenizer placeholder that takes focus itself), Tokenizer's disabled sheet trigger, Selector's pointer-restored focus, FileInput's triggers and InputGroupText. That covers TextInput, TextArea, NumberInput, DateInput, DateRangeInput, DateTimeInput, TimeInput, FileInput, Selector, MultiSelector, ComplexSelector, Typeahead, Tokenizer, PanelSearchInput and PowerSearch.

  • Boxes: the unchecked edge (and its hover mix) in CheckboxIndicator and RadioIndicator, which reach CheckboxInput, CheckboxList, RadioList, the DropdownMenu checkbox and radio items, and Tokenizer's sheet.

  • ChatComposer (flat): elevation="none" has no shadow, so its border is the only cue to the editable area. Its resting edge and hover ring read the control edge. The raised low variant keeps its own edge, because its shadow is also a cue (component:ChatComposer FR7 names no token).

  • First-party themes: each sets a palette stop (Chocolate a hex) at 3:1 or more against its own surface, page body and card, light and dark:

    Theme Light Dark
    Butter neutral 60, 3.61 / 3.46 neutral 55, 3.50 / 3.80
    Chocolate #A67A50, 3.72 / 3.72 #7C6855, 3.39 / 3.57
    Gothic n/a (dark only) neutral 55, 3.80 / 3.80
    Matcha neutral 45, 3.74 / 3.25 neutral 35, 3.28 / 3.53
    Neutral neutral 55, 3.74 / 3.31 neutral 50, 3.38 / 3.85
    Stone neutral 55, 3.72 / 3.28 neutral 50, 3.85 / 4.25
    Y2K neutral 20 (its existing heavy outline), 13.25 / 8.76 neutral 45, 3.23 / 3.51

    The numbers are contrast against the surface and against the page body. Butter's own field overrides (text input, text area, number, date and time inputs, Selector, MultiSelector, Typeahead, Tokenizer) set their border to --color-border; they now read --color-border-control, so Butter fields reach 3:1 too. The CLI theme templates match the theme packages, and the selected palette refs are regenerated.

  • Generated themes: expandColorScale derives the control edge by walking its tone until it reaches 3:1 against both the surface and the page body. The emphasized output is unchanged.

  • Palette engine: Core's palette mapping (packages/core/src/palette/mapping.ts) carries --color-border-control at Neutral's stops 55/50, and the CLI's copy is regenerated from it with node scripts/generate-cli-palette-engine.mjs, so the theme editor maps the control edge from a palette like every other role.

  • Projections: the token docs, the theme editor's neutral stop list, the docsite theme playground's token list, the theme template's guarantee note and token-family list, and the Indicator doc's custom-box example all name the new role. Butter's input comment and expandColorScale's contrast comment describe the control edge.

  • Theme editor: since main's editor moves "the edge the fields draw" with a whole-theme --color-border (the nearest shade that keeps 3:1 on the field fill), and finds that edge from what the inputs draw, it now moves --color-border-control. The emphasized border (cards, dividers, and Neutral's switch and progress tracks drawn from it) keeps moving exactly as it does on main, by the same 3:1 rule on the field fill, so card and divider output for a set border is byte-identical to main. FOLLOWS (in _settings.mjs) names both. The follow notes say what each one draws ("fields kept at 3:1" for the control edge, "cards and dividers kept at 3:1" for the emphasized border), and the whole-theme border answer says the control edge follows at 3:1. This also delivers the follow-up theme-edit-control-edge-follows-border.

  • Records: the Indicator record (radio FR5, its anatomy row and evidence row), the InputGroupText record (FR3) and the Y2K theme record (its field and box rows) name the control edge instead of the emphasized one.

Testing

  • New INV13 test in contrast.test.ts: it resolves --color-border-control against the surface and the page body, light and dark, for Core, each of the seven theme templates, and four generated themes. On the base, all 12 cases fail (the role doesn't exist). With this change, all pass.

  • New flat-composer test in ChatComposer.test.tsx, "ChatComposer flat edge": a flat composer draws the control edge at rest, and that edge meets 3:1 against the page body, surface and card it sits on, in light and dark (INV13's measure). For information: in Core's dark defaults the edge is 2.67:1 against the composer's own popover fill (#666A70 on #28292C); WCAG 1.4.11 asks the boundary to separate the component from what is adjacent outside it.

  • Theme editor follow tests (after the main merge with the editor's field-edge rule): in theme-border-follows and theme-field-edge-follows-border only the field-edge assertions now name --color-border-control. A new case proves the emphasized border's output for a faint and a strong set border equals the control edge's, which is main's emphasized value. Every "emphasized follows the border" assertion stays as written.

  • Theme editor tests: four tests whose expected lines quoted the inputs' old edge now expect the control edge, because the editor names what inputs draw: theme-how-clause-scope, theme-titles-shadows-alpha-state, theme-fix-lines-keep-role and theme-how-roles-and-sides. The palette-engine drift test passes.

  • Updated tests: the INV10 name grammar admits --color-border-control, the InputGroupText audit expects the new edge, four tests that rebuild the field's StyleX classes (DateRangeInput, DateTimeInput, TimeInput, TokenizerBottomSheet) expect the control edge, and the Neutral selected-ref count is now 101. The DateRangeInput, DateTimeInput, TimeInput, TokenizerBottomSheet and contrast suites pass (795 tests), as do the Butter and Y2K theme, palette-ref and template checks.

  • New Tokenizer test: a disabled unfocusedLayer placeholder draws the control edge at rest. It fails before the selfRing change and passes after.

  • Suites run: the theme, Indicator, InputGroup, Field and FileInput suites pass (2,188 tests), and so do the theme packages, palette-ref and theme-template checks. The theme tooling suites pass except for failures caused by this Mac's case-insensitive file system and /private/var temporary paths (case-twin folders, symlink targets, a lock); none involves colors, and CI runs them on Linux.

  • Lint, types: eslint and Core's tsc are clean.

  • Real-Chrome stills (headed Chrome, DPR 2, 1280×900 and 390×844; main 7b31541 vs this head 53c63bfc). One page holds a Card with a heading, text and a Divider, plus a form with TextInput, Selector, CheckboxList and RadioList. The highlighted Email row is the checked style, not hover. Contact sheet: contact sheet

    Measured control edge contrast against the card surface, before → after: Default light 1.51 → 3.35, dark 1.93 → 3.02; Neutral light 1.48 → 3.74, dark 2.20 → 3.85; Gothic dark 2.07 → 3.45; Stone light 3.72 → 3.72 (it already met 3:1); generated 3.08 → 3.42. Against the page body, see the theme table above. The Card border, the Divider, the surfaces and the body text are unchanged in every theme.

Theme Mode Before (main) After 390 px before 390 px after
Default light before after before after
Default dark before after before after
Neutral light before after before after
Neutral dark before after before after
Gothic dark before after before after
Stone light before after before after
Generated (accent #B7410E, warm) light before after before after

Butter and Y2K at this head (18d5d7f)

Same capture method; before is the merge base 7b31541. Contact sheet: Butter and Y2K contact sheet

  • Butter: fields go from 1.29:1 to 3.61:1 in light (3.61 on the surface, 3.46 on the body), and from about 1.3:1 to 3.08:1 in dark (3.08 on the card, 3.50 on the surface, 3.80 on the body). Checkbox and radio boxes in dark go from 4.33:1 to 3.08:1 against the card (the trade-off above), still at 3:1 or more.
  • Y2K: unchanged (light 13.25:1, dark 3.23:1).
  • Recheck: the Default, Neutral, Gothic, Stone and generated cells are identical to the earlier capture.
  • Computed colours: computed-table.tsv.
Theme Mode Before (merge base) After (18d5d7f) 390 px before 390 px after
Butter light before after before after
Butter dark before after before after
Y2K light before after before after
Y2K dark before after before after

At this head (d097d23, main merged at 7ee32e5, on Linux): the theme editor changes are out (see Change). Every generated file (the palette refs, the CLI theme copies, the Swift Generated/ themes) regenerates byte-identically with the repository's generators. Core and theme suites pass (945 files, 24,543 tests); Core tsc, check:knowledge and check:changesets are clean. The CLI, scripts and native node suites pass except 9 tests that fail the same way on main at this base (theme-edit sample-page pictures, a part's growth note and icon-definition-groups).

Writing rubric results

Two record lines change: Indicator FR5 (with its anatomy and evidence rows) and InputGroupText FR3. Each still states one present-tense fact about what the component draws, names the token that sets it, and adds no history, proposals or status. pnpm check:knowledge passes.

Related

Owner and land path

  • Owner: Astryx maintainers, fix-loop lane 1.
  • Land path: draft until code review approves this head; real-Chrome stills; then ready for review, CI and merge.

A field's edge is often the only cue to where it is, but it used
--color-border-emphasized, which reached only 1.4-2.2:1 in Core's default
theme. A new role, --color-border-control, holds 3:1 against the surface
and the page body (theme-tokens INV13, DEC-2).

- Core: light-dark(#878D95, #666A70).
- The field shell (resting edge, hover ring, disabled edge and its
  restores), FileInput, InputGroupText, and the unchecked checkbox and
  radio box edges use it.
- Every first-party theme and its CLI template set their own value at 3:1
  against their surface, body and card; generated themes derive one.
- Cards, dividers and every other emphasized border keep their lighter edge.

Test: contrast.test.ts resolves the role against the surface and the page
body, light and dark, for Core, each theme template and four generated
themes. Every case fails before this change.
@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 22, 2026 5:12am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 14, 2026
@astracat-bot

astracat-bot Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 22, 2026, 7:44 AM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 14, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 53c63bf

@cixzhang cixzhang added the ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) label Nov 14, 2026
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · ce2c13a

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
ChatComposer 90.9 kB (+9 B) · 13.5 kB CSS (+30 B) — — · ✗ · —
FileInput · Storybook 77.8 kB (+8 B) · 12.9 kB CSS (+31 B) 794 (0) — · ✗ · —
InputGroup 63.9 kB (+13 B) · 8.9 kB CSS (+25 B) — — · ✗ · —
220 more components
Component Size LoC Visual · A11y · RTL
Tokenizer · Storybook 113.0 kB (+9 B) · 21.9 kB CSS (+25 B) 2,680 (0) — · ✗ · —
ChatComposerInput 88.0 kB (+9 B) · 12.5 kB CSS (+20 B) — — · ✗ · —
lab/MediaPlayButton 224.7 kB (+67 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaVolume 224.7 kB (+67 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaCaptionsButton 224.7 kB (+66 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaFullscreenButton 224.7 kB (+66 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaPlaybackRate 224.7 kB (+66 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaSeekButton 224.7 kB (+66 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaTime 224.7 kB (+66 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaTimeSlider 224.7 kB (+65 B) · 1.5 kB CSS (0) — — · — · —
PowerSearch 319.4 kB (+15 B) · 27.4 kB CSS (+43 B) — — · — · —
Overlay 24.0 kB (+35 B) · 4.1 kB CSS (+19 B) — — · — · —
lab/AudioPlayer 234.7 kB (+53 B) · 1.8 kB CSS (0) — — · — · —
lab/VideoPlayer 232.3 kB (+52 B) · 2.1 kB CSS (0) — — · — · —
Markdown 210.2 kB (+25 B) · 23.5 kB CSS (+25 B) — — · — · —
Toast 107.4 kB (+30 B) · 11.5 kB CSS (+19 B) — — · — · —
Lightbox 151.3 kB (+27 B) · 12.3 kB CSS (+20 B) — — · — · —
ContextMenu 106.0 kB (+16 B) · 19.7 kB CSS (+30 B) — — · — · —
DateInput 209.2 kB (+9 B) · 19.0 kB CSS (+36 B) — — · — · —
ComplexSelector 84.1 kB (+12 B) · 13.3 kB CSS (+32 B) — — · — · —
DateTimeInput · Storybook 233.1 kB (+7 B) · 20.7 kB CSS (+35 B) 3,691 (0) — · ✓ · —
TimeInput · Storybook 181.3 kB (+9 B) · 17.9 kB CSS (+32 B) 1,881 (0) — · ✓ · —
DropdownMenu 114.1 kB (+11 B) · 19.8 kB CSS (+29 B) — — · — · —
ListItem 81.8 kB (+11 B) · 12.6 kB CSS (+29 B) — — · — · —
TextInput 101.6 kB (+9 B) · 12.9 kB CSS (+31 B) — — · — · —
Typeahead 95.1 kB (+12 B) · 14.5 kB CSS (+28 B) — — · — · —
MultiSelector 109.6 kB (+8 B) · 19.0 kB CSS (+31 B) — — · — · —
CheckboxListItem 82.7 kB (+9 B) · 12.6 kB CSS (+29 B) — — · — · —
Pagination 154.2 kB (+9 B) · 20.1 kB CSS (+29 B) — — · — · —
CheckboxInput 71.7 kB (+10 B) · 10.7 kB CSS (+27 B) — — · — · —
RadioListItem 78.7 kB (+12 B) · 11.2 kB CSS (+25 B) — — · — · —
TextArea 95.2 kB (+11 B) · 10.0 kB CSS (+26 B) — — · — · —
DateRangeInput · Storybook 106.5 kB (+9 B) · 14.3 kB CSS (+27 B) 704 (0) — · ✓ · —
NumberInput 106.5 kB (+9 B) · 13.1 kB CSS (+27 B) — — · — · —
TableSelectionToolbar 78.1 kB (+12 B) · 14.5 kB CSS (+24 B) — — · — · —
TopNavMegaMenuItem 15.5 kB (+17 B) · 4.2 kB CSS (+19 B) — — · — · —
CommandPaletteInput 34.3 kB (+14 B) · 8.0 kB CSS (+21 B) — — · — · —
DropdownMenuCheckboxItem 29.5 kB (+15 B) · 7.7 kB CSS (+20 B) — — · — · —
Table 125.4 kB (+6 B) · 21.3 kB CSS (+29 B) — — · — · —
TableCell 107.2 kB (+8 B) · 20.3 kB CSS (+27 B) — — · — · —
charts/Chart 249.5 kB (+34 B) · 516 B CSS (0) — — · — · —
MoreMenu 114.4 kB (+5 B) · 19.8 kB CSS (+29 B) — — · — · —
Selector 121.1 kB (+4 B) · 19.7 kB CSS (+30 B) — — · ✓ · —
TableHeaderCell 107.1 kB (+5 B) · 20.0 kB CSS (+29 B) — — · — · —
TopNavHeading 87.9 kB (+14 B) · 12.4 kB CSS (+20 B) — — · — · —
AlertDialog 133.9 kB (+13 B) · 16.2 kB CSS (+20 B) — — · — · —
AspectRatio 4.1 kB (+11 B) · 3.6 kB CSS (+22 B) — — · — · —
AvatarGroupOverflow 53.0 kB (+13 B) · 6.1 kB CSS (+20 B) — — · — · —
ChatMessageBubble 7.7 kB (+13 B) · 3.8 kB CSS (+20 B) — — · ✓ · —
AvatarStatusDot 7.8 kB (+12 B) · 3.6 kB CSS (+20 B) — — · — · —
ChatMessage 17.4 kB (+10 B) · 3.7 kB CSS (+22 B) — — · ✓ · —
CommandPaletteFooter 17.7 kB (+12 B) · 3.7 kB CSS (+20 B) — — · — · —
DialogHeader 70.9 kB (+12 B) · 12.8 kB CSS (+20 B) — — · — · —
FormLayout 7.0 kB (+12 B) · 3.5 kB CSS (+20 B) — — · — · —
MobileNavToggle 67.9 kB (+12 B) · 11.1 kB CSS (+20 B) — — · — · —
OverflowList 12.7 kB (+12 B) · 3.7 kB CSS (+20 B) — — · — · —
ProgressBar 12.5 kB (+11 B) · 6.7 kB CSS (+21 B) — — · — · —
SideNavHeading 88.2 kB (+11 B) · 12.5 kB CSS (+21 B) — — · — · —
Token 30.2 kB (+12 B) · 5.0 kB CSS (+20 B) — — · — · —
AppShell 102.1 kB (+10 B) · 14.9 kB CSS (+21 B) — — · — · —
AvatarGroup 49.8 kB (+11 B) · 6.1 kB CSS (+20 B) — — · — · —
Banner 69.7 kB (+10 B) · 11.7 kB CSS (+21 B) — — · — · —
BaseTypeahead 84.0 kB (+11 B) · 12.1 kB CSS (+20 B) — — · — · —
Card 10.5 kB (+10 B) · 7.0 kB CSS (+21 B) — — · — · —
Center 4.5 kB (+11 B) · 4.6 kB CSS (+20 B) — — · — · —
ChatMessageList 28.7 kB (+11 B) · 7.4 kB CSS (+20 B) — — · ✓ · —
ChatMessageMetadata 21.0 kB (+12 B) · 4.2 kB CSS (+19 B) — — · ✓ · —
Citation 21.3 kB (+11 B) · 4.5 kB CSS (+20 B) — — · — · —
ClickableCard 19.5 kB (+10 B) · 7.9 kB CSS (+21 B) — — · — · —
CollapsibleGroup 7.1 kB (+11 B) · 3.4 kB CSS (+20 B) — — · — · —
CommandPaletteItem 13.7 kB (+11 B) · 3.6 kB CSS (+20 B) — — · — · —
CommandPaletteList 16.6 kB (+11 B) · 3.4 kB CSS (+20 B) — — · — · —
Drawer 58.2 kB (+11 B) · 8.8 kB CSS (+20 B) — — · — · —
DrawerHeader 71.0 kB (+12 B) · 14.3 kB CSS (+19 B) — — · — · —
DropdownMenuGroup 6.6 kB (+11 B) · 3.4 kB CSS (+20 B) — — · — · —
DropdownMenuRadioGroup 6.7 kB (+11 B) · 3.4 kB CSS (+20 B) — — · — · —
Grid 4.7 kB (+11 B) · 3.8 kB CSS (+20 B) — — · — · —
Kbd 17.4 kB (+12 B) · 3.6 kB CSS (+19 B) — — · — · —
Link 58.2 kB (+12 B) · 7.4 kB CSS (+19 B) — — · — · —
SegmentedControl 103.6 kB (+13 B) · 7.3 kB CSS (+18 B) — — · — · —
SideNav 125.2 kB (+10 B) · 12.6 kB CSS (+21 B) — — · — · —
StatusDot 34.8 kB (+11 B) · 5.7 kB CSS (+20 B) — — · — · —
TableFooter 3.7 kB (+11 B) · 3.3 kB CSS (+20 B) — — · — · —
TableHeader 3.7 kB (+11 B) · 3.3 kB CSS (+20 B) — — · — · —
Timestamp 28.0 kB (+11 B) · 11.4 kB CSS (+20 B) — — · — · —
TopNav 81.6 kB (+11 B) · 12.1 kB CSS (+20 B) — — · — · —
TopNavMegaMenuFeaturedCard 8.6 kB (+11 B) · 3.6 kB CSS (+20 B) — — · — · —
Avatar 47.0 kB (+10 B) · 6.0 kB CSS (+20 B) — — · — · —
Breadcrumbs 16.7 kB (+10 B) · 3.4 kB CSS (+20 B) — — · — · —
Calendar 78.8 kB (+10 B) · 11.8 kB CSS (+20 B) — — · — · —
Carousel 77.8 kB (+11 B) · 12.1 kB CSS (+19 B) — — · — · —
ChatComposerDrawer 18.5 kB (+10 B) · 4.8 kB CSS (+20 B) — — · ✓ · —
ChatDictationButton 68.2 kB (+10 B) · 11.2 kB CSS (+20 B) — — · ✓ · —
Code 3.9 kB (+12 B) · 3.5 kB CSS (+18 B) — — · — · —
CodeBlock 83.7 kB (+9 B) · 12.9 kB CSS (+21 B) — — · — · —
CommandPalette 83.8 kB (+10 B) · 13.5 kB CSS (+20 B) — — · — · —
CommandPaletteEmpty 6.6 kB (+11 B) · 3.5 kB CSS (+19 B) — — · — · —
DropdownMenuRadioItem 29.6 kB (+10 B) · 7.7 kB CSS (+20 B) — — · — · —
GridSpan 3.8 kB (+10 B) · 3.4 kB CSS (+20 B) — — · — · —
IconButton 67.6 kB (+10 B) · 11.1 kB CSS (+20 B) — — · — · —
MetadataList 17.5 kB (+11 B) · 3.8 kB CSS (+19 B) — — · — · —
MetadataListItem 7.2 kB (+11 B) · 3.6 kB CSS (+19 B) — — · — · —
NavHeadingMenu 18.9 kB (+10 B) · 3.5 kB CSS (+20 B) — — · — · —
NavIcon 3.8 kB (+12 B) · 3.5 kB CSS (+18 B) — — · — · —
Section 8.0 kB (+10 B) · 6.4 kB CSS (+20 B) — — · — · —
SideNavCollapseButton 68.5 kB (+10 B) · 11.2 kB CSS (+20 B) — — · — · —
SideNavItem 82.5 kB (+10 B) · 12.3 kB CSS (+20 B) — — · — · —
Slider 117.2 kB (+10 B) · 9.3 kB CSS (+20 B) — — · — · —
Step 32.3 kB (+10 B) · 5.7 kB CSS (+20 B) — — · — · —
TableBody 6.8 kB (+10 B) · 3.3 kB CSS (+20 B) — — · — · —
TabList 48.6 kB (+10 B) · 6.8 kB CSS (+20 B) — — · — · —
TopNavMegaMenu 81.8 kB (+9 B) · 13.0 kB CSS (+21 B) — — · — · —
lab/DialogHeroHeader 92.3 kB (+30 B) · 372 B CSS (0) — — · — · —
Badge 7.3 kB (+10 B) · 4.1 kB CSS (+19 B) — — · — · —
BottomSheetSwitcher 19.2 kB (+11 B) · 3.5 kB CSS (+18 B) — — · — · —
BreadcrumbItem 102.6 kB (+10 B) · 14.0 kB CSS (+19 B) — — · — · —
Button 67.6 kB (+9 B) · 11.1 kB CSS (+20 B) — — · — · —
ChatLayout 91.3 kB (+9 B) · 11.7 kB CSS (+20 B) — — · ✓ · —
ChatSystemMessage 7.2 kB (+10 B) · 3.8 kB CSS (+19 B) — — · ✓ · —
ChatTokenizedText 7.7 kB (+11 B) · 4.1 kB CSS (+18 B) — — · ✓ · —
Collapsible 30.1 kB (+9 B) · 4.6 kB CSS (+20 B) — — · — · —
CommandPaletteGroup 3.8 kB (+10 B) · 3.5 kB CSS (+19 B) — — · — · —
ContextMenuItem 39.0 kB (+10 B) · 7.3 kB CSS (+19 B) — — · — · —
InputGroupText 7.1 kB (+12 B) · 3.9 kB CSS (+17 B) — — · — · —
MobileNav 79.8 kB (+9 B) · 11.8 kB CSS (+20 B) — — · — · —
Outline 26.8 kB (+10 B) · 4.2 kB CSS (+19 B) — — · — · —
ResizeHandle 22.4 kB (+9 B) · 4.3 kB CSS (+20 B) — — · — · —
SegmentedControlItem 19.4 kB (+11 B) · 4.3 kB CSS (+18 B) — — · — · —
Stepper 69.4 kB (+8 B) · 11.3 kB CSS (+21 B) — — · — · —
Switch 111.7 kB (+9 B) · 10.5 kB CSS (+20 B) — — · — · —
TableRow 7.3 kB (+10 B) · 4.1 kB CSS (+19 B) — — · — · —
TabMenu 84.4 kB (+9 B) · 12.3 kB CSS (+20 B) — — · — · —
Timer 14.1 kB (+9 B) · 6.4 kB CSS (+20 B) — — · — · —
TopNavItem 14.8 kB (+10 B) · 4.0 kB CSS (+19 B) — — · — · —
TopNavMenu 87.3 kB (+8 B) · 12.4 kB CSS (+21 B) — — · — · —
TreeList 47.5 kB (+9 B) · 6.0 kB CSS (+20 B) — — · — · —
TypeaheadItem 6.7 kB (+11 B) · 3.6 kB CSS (+18 B) — — · — · —
Blockquote 3.9 kB (+9 B) · 3.6 kB CSS (+19 B) — — · — · —
ButtonGroup 44.9 kB (+11 B) · 3.7 kB CSS (+17 B) — — · — · —
ChatComposerTokenElement 88.0 kB (+8 B) · 12.5 kB CSS (+20 B) — — · ✓ · —
ChatSendButton 68.0 kB (+9 B) · 11.2 kB CSS (+19 B) — — · — · —
DropdownMenuItem 28.7 kB (+8 B) · 7.1 kB CSS (+20 B) — — · — · —
DropdownMenuSubMenu 80.7 kB (+10 B) · 11.0 kB CSS (+18 B) — — · — · —
LayoutPanel 22.4 kB (+8 B) · 5.1 kB CSS (+20 B) — — · — · —
Popover 105.0 kB (+9 B) · 15.5 kB CSS (+19 B) — — · — · —
SelectableCard 19.6 kB (+10 B) · 8.1 kB CSS (+18 B) — — · — · —
SelectorOption 24.8 kB (+9 B) · 6.8 kB CSS (+19 B) — — · — · —
SideNavSection 7.2 kB (+9 B) · 3.8 kB CSS (+19 B) — — · — · —
Skeleton 4.1 kB (+9 B) · 3.8 kB CSS (+19 B) — — · — · —
Tab 15.2 kB (+9 B) · 4.3 kB CSS (+19 B) — — · — · —
ToggleButton 94.9 kB (+8 B) · 11.3 kB CSS (+20 B) — — · — · —
ToggleButtonGroup 42.2 kB (+11 B) · 3.7 kB CSS (+17 B) — — · — · —
Toolbar 48.4 kB (+11 B) · 8.6 kB CSS (+17 B) — — · — · —
ChatLayoutScrollButton 68.2 kB (+7 B) · 11.3 kB CSS (+20 B) — — · — · —
ChatToolCalls 33.1 kB (+7 B) · 8.8 kB CSS (+20 B) — — · ✓ · —
Item 21.0 kB (+7 B) · 6.2 kB CSS (+20 B) — — · — · —
lab/ListInput 97.5 kB (+27 B) · 922 B CSS (0) — — · — · —
Thumbnail 72.0 kB (+5 B) · 12.7 kB CSS (+21 B) — — · — · —
lab/CommentThread 382.8 kB (+25 B) · 2.4 kB CSS (0) — — · — · —
charts/ChartTooltip 226.0 kB (+22 B) · 451 B CSS (0) — — · — · —
Field 61.7 kB (0) · 7.7 kB CSS (+21 B) — — · ✓ · —
charts/ChartLegend 42.2 kB (+20 B) · 224 B CSS (0) — — · — · —
CheckboxList 75.8 kB (0) · 8.2 kB CSS (+20 B) — — · — · —
FieldStatus 10.9 kB (0) · 3.7 kB CSS (+20 B) — — · — · —
Heading 12.5 kB (0) · 5.8 kB CSS (+20 B) — — · — · —
RadioList 63.2 kB (0) · 7.7 kB CSS (+20 B) — — · — · —
Text 11.6 kB (0) · 5.8 kB CSS (+20 B) — — · — · —
BottomSheet 76.4 kB (0) · 7.9 kB CSS (+19 B) — — · — · —
Dialog 28.6 kB (0) · 7.3 kB CSS (+19 B) — — · — · —
FieldLabel 57.3 kB (0) · 6.1 kB CSS (+19 B) — — · ✓ · —
HoverCard 31.1 kB (0) · 4.8 kB CSS (+19 B) — — · — · —
ScrollableArea 11.6 kB (0) · 4.4 kB CSS (+19 B) — — · — · —
InfoTip 52.0 kB (−1 B) · 5.7 kB CSS (+19 B) — — · — · —
Spinner 25.3 kB (−2 B) · 6.6 kB CSS (+20 B) — — · — · —
Tooltip 33.1 kB (0) · 4.8 kB CSS (+18 B) — — · — · —
lab/Comments 389.8 kB (+16 B) · 2.5 kB CSS (0) — — · — · —
NavHeadingMenuItem 17.1 kB (−6 B) · 6.7 kB CSS (+20 B) — — · — · —
lab/ChatReactionBar 129.9 kB (+13 B) · 1.1 kB CSS (0) — — · — · —
richtext/RichTextView 287.7 kB (+13 B) · 2.4 kB CSS (0) — — · — · —
lab/ChatUnreadDivider 3.9 kB (+12 B) · 348 B CSS (0) — — · — · —
lab/Stat 4.4 kB (+12 B) · 646 B CSS (0) — — · — · —
lab/TabBar 84.6 kB (+12 B) · 1.8 kB CSS (0) — — · — · —
lab/ChartDotGL 7.7 kB (+11 B) · 20 B CSS (0) — — · — · —
lab/ChartHeatmapGL 8.8 kB (+11 B) · 20 B CSS (0) — — · — · —
lab/ChartStreamGL 7.7 kB (+11 B) · 20 B CSS (0) — — · — · —
lab/ChatTypingIndicator 26.6 kB (+11 B) · 612 B CSS (0) — — · — · —
lab/CircleCheckIndicator 4.7 kB (+11 B) · 1.0 kB CSS (0) — — · — · —
lab/CircularProgress 9.2 kB (+11 B) · 859 B CSS (0) — — · — · —
lab/CommentPin 61.8 kB (+11 B) · 1.2 kB CSS (0) — — · — · —
lab/EmojiPicker 121.2 kB (+11 B) · 751 B CSS (0) — — · — · —
lab/SVGIcon 8.1 kB (+11 B) · 765 B CSS (0) — — · — · —
lab/ThreeDScatterGL 7.9 kB (+11 B) · 20 B CSS (0) — — · — · —
lab/WeightedSVGIcon 5.2 kB (+11 B) · 1.1 kB CSS (0) — — · — · —
charts/ChartAxis 7.1 kB (+10 B) · 112 B CSS (0) — — · — · —
lab/ChartDotGLInteractive 8.6 kB (+10 B) · 20 B CSS (0) — — · — · —
lab/CodeEditor 14.7 kB (+10 B) · 743 B CSS (0) — — · — · —
lab/LineClamp 14.2 kB (+10 B) · 168 B CSS (0) — — · — · —
lab/LogStream 8.4 kB (+10 B) · 1.6 kB CSS (0) — — · — · —
lab/MediaPlayer 31.3 kB (+10 B) · 165 B CSS (0) — — · — · —
lab/MediaPlayerElement 7.0 kB (+10 B) · 177 B CSS (0) — — · — · —
lab/PageControl 79.1 kB (+10 B) · 709 B CSS (0) — — · — · —
lab/TourStep 96.8 kB (+10 B) · 691 B CSS (0) — — · — · —
lab/ChatReasoning 7.4 kB (+9 B) · 967 B CSS (0) — — · — · —
lab/ChatVirtualizer 57.8 kB (+9 B) · 223 B CSS (0) — — · — · —
lab/CommentComposer 186.5 kB (+9 B) · 1.9 kB CSS (0) — — · — · —
lab/NavigationScreen 86.5 kB (+9 B) · 1.5 kB CSS (0) — — · — · —
lab/NavigationStack 86.5 kB (+9 B) · 1.5 kB CSS (0) — — · — · —
lab/Schedule 118.6 kB (+9 B) · 3.9 kB CSS (0) — — · — · —
lab/TabBarMoreList 105.0 kB (+9 B) · 1.8 kB CSS (0) — — · — · —
lab/TransferList 139.8 kB (+9 B) · 1.2 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 128.7 kB (+8 B) · 773 B CSS (0) — — · — · —
lab/SelectableCardGroup 72.1 kB (+7 B) · 162 B CSS (0) — — · — · —
richtext/RichTextEditor 311.1 kB (+7 B) · 2.7 kB CSS (0) — — · — · —
lab/DiffViewer 95.9 kB (+6 B) · 2.1 kB CSS (0) — — · — · —
lab/TransferListSelector 151.7 kB (+3 B) · 1.4 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 316.3 kB (+3 B) · 454 B CSS (0) — — · — · —
CheckIndicator 9.0 kB (0) · 681 B CSS (0) — — · — · —
lab/TabBarItem 3.9 kB (0) · 1.8 kB CSS (0) — — · — · —
CheckboxIndicator 2.9 kB (0) · 844 B CSS (−5 B) — — · — · —
RadioIndicator 2.6 kB (−1 B) · 824 B CSS (−7 B) — — · ✓ · —

Package size:

  • @astryxdesign/cli 6.27 MB packed (+763 B); no new dependencies
  • @astryxdesign/core 7.98 MB packed (+506 B); no new dependencies
  • @astryxdesign/theme-butter 346.8 kB packed (+132 B); no new dependencies
6 more packages
  • @astryxdesign/theme-chocolate 406.6 kB packed (+68 B); no new dependencies
  • @astryxdesign/theme-gothic 413.8 kB packed (+53 B); no new dependencies
  • @astryxdesign/theme-matcha 333.1 kB packed (+133 B); no new dependencies
  • @astryxdesign/theme-neutral 114.2 kB packed (+102 B); no new dependencies
  • @astryxdesign/theme-stone 608.7 kB packed (+58 B); no new dependencies
  • @astryxdesign/theme-y2k 589.6 kB packed (+49 B); no new dependencies

API changes: core +2 · ~3 · −0; theme-butter +1 · ~0 · −0; theme-chocolate +1 · ~0 · −0; theme-gothic +1 · ~0 · −0; theme-matcha +1 · ~0 · −0; theme-neutral +1 · ~0 · −0; theme-stone +1 · ~0 · −0; theme-y2k +1 · ~0 · −0

12 API changes (advisory)
Package Where Signature Usage
+ core . · Values · const colorDefaults --color-border-control: 'light-dark(#878D95, #666A70)' import {colorDefaults} from '@astryxdesign/core'
+ core Stylesheets · var --color-border-control (./astryx.css) var --color-border-control (./astryx.css) .my-scope { --color-border-control: …; }
~ core . · Values · const colorVars const colorVars: stylex.VarGroup<Readonly<{ readonly '--color-accent': "light-dark(#0064E0, #0171E3)"; readonly '--color-accent-muted': "light-dark(#0082FB33, #0082FB3F)"; reado … #fa199be4 → const colorVars: stylex.VarGroup<Readonly<{ readonly '--color-accent': "light-dark(#0064E0, #0171E3)"; readonly '--color-accent-muted': "light-dark(#0082FB33, #0082FB3F)"; reado … #085e04f1 import {colorVars} from '@astryxdesign/core'
~ core . · Values · const inputWrapperStyles const inputWrapperStyles: Readonly<{ readonly base: Readonly<{ readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">; readonly position: stylex.StyleXClassNameFor<"pos … #e86e7c58 → const inputWrapperStyles: Readonly<{ readonly base: Readonly<{ readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">; readonly position: stylex.StyleXClassNameFor<"pos … #69e10dec import {inputWrapperStyles} from '@astryxdesign/core'
~ core ./Selector/selectorPresentation.stylex · Values · const selectorPresentationStyles const selectorPresentationStyles: Readonly<{ readonly pointerRestoredFocus: Readonly<{ readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "light-dark(#CCD3DB, #494D53)">; readonly bo … #f1b692cc → const selectorPresentationStyles: Readonly<{ readonly pointerRestoredFocus: Readonly<{ readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "light-dark(#878D95, #666A70)">; readonly bo … #eccf2b48 import {selectorPresentationStyles} from '@astryxdesign/core/Selector/selectorPresentation.stylex'
+ theme-butter Stylesheets · var --color-border-control (./theme.css) var --color-border-control (./theme.css) .my-scope { --color-border-control: …; }
+ theme-chocolate Stylesheets · var --color-border-control (./theme.css) var --color-border-control (./theme.css) .my-scope { --color-border-control: …; }
+ theme-gothic Stylesheets · var --color-border-control (./theme.css) var --color-border-control (./theme.css) .my-scope { --color-border-control: …; }
+ theme-matcha Stylesheets · var --color-border-control (./theme.css) var --color-border-control (./theme.css) .my-scope { --color-border-control: …; }
+ theme-neutral Stylesheets · var --color-border-control (./theme.css) var --color-border-control (./theme.css) .my-scope { --color-border-control: …; }
+ theme-stone Stylesheets · var --color-border-control (./theme.css) var --color-border-control (./theme.css) .my-scope { --color-border-control: …; }
+ theme-y2k Stylesheets · var --color-border-control (./theme.css) var --color-border-control (./theme.css) .my-scope { --color-border-control: …; }

Wide change (shared styles: packages/core/src/theme/expandColorScale.ts, packages/core/src/theme/tokens.stylex.ts, packages/themes/butter/src/butterPaletteRefs.generated.ts, and 11 more): add ci:run-visual for Visual, ci:run-rtl for RTL.

Accessibility: 5 violation(s)

Accessibility Audit

Status: 5 accessibility violation(s) found — 5 serious.

ChatComposer - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 1/21 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
ChatComposerInput - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 1/18 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
FileInput - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 3/16 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
InputGroup - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 1/26 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
Tokenizer - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 2/32 stories · Learn more
    • WCAG: 1.4.3 (Level AA)

Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot 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.

Requesting changes. The new --color-border-control role is decided by the theme-token record, and Core's values clear 3:1, but four things need fixing first:

  • Four tests that rebuild the field's StyleX classes still expect the emphasized edge and now fail (DateRangeInput.test.tsx:174, DateTimeInput.test.tsx:406, TimeInput.test.tsx:201, TokenizerBottomSheet.test.tsx:2116), so switch their default to --color-border-control.
  • Butter's own field overrides (butterTheme.ts:580-653, in both copies) still set borderColor: 'var(--color-border)', so Butter text inputs, selectors and pickers keep an edge of about 1.3:1 and the "every first-party theme reaches 3:1" claim does not hold for them.
  • The Indicator record's FR5 and the InputGroupText record's FR3 still describe an emphasized border, so amend them to the control edge that the theme-token decision already sets.
  • Y2K's light control edge (y2kTheme.ts:229, Neutral Light 45, 5.37:1) is fainter than the Neutral Light 20 edge Y2K fields had (13.25:1) and fainter than Y2K's own cards, against the decision that only the controls darken, so keep Neutral Light 20 for the light half.

Non-blocking: ChatComposer's elevation="none" border still copies the old field treatment, and neither the theme template's token inventory nor the docsite playground's token list mentions the new role yet.

Claims and files checked
  • Claim: Core's old field edge was about 1.4 to 2.2:1 and the field surface about 1.1:1 against the page. Verified: 1.37 to 2.22:1; 1.10:1 light.
  • Claim: Core's new edge is #878D95 / #666A70 at 3.35 and 3.03:1 light, 3.02 and 3.47:1 dark. Verified (contrast test and resolved values).
  • Claim: the field shell, hover ring, disabled edge and restores, Selector, Tokenizer, FileInput and InputGroupText use the role. Verified in code; RichTextEditor also follows.
  • Claim: unchecked checkbox and radio boxes use it; checked and disabled boxes are unchanged. Verified (CheckboxIndicator.tsx:47-82, RadioIndicator.tsx:47-51).
  • Claim: cards, dividers and other emphasized uses keep their lighter edge. False for Y2K light (finding above).
  • Claim: fields reach 3:1 in every first-party theme. False for Butter (finding above); all seven theme values and all 14 table cells match.
  • Claim: generated themes derive a 3:1 edge and the emphasized output is unchanged. Verified (5,616-pair sweep, worst 3.00:1).
  • Claim: CLI templates match the packages, palette refs are regenerated and the Neutral count is 101. Verified (bundle test, six palette checks).
  • Claim: token docs, editor stop list, template note and Indicator doc name the role. Verified (token-docs check passes at 287).
  • Claim: the new contrast test fails on the base and passes here. Verified (the role is absent on the base; 24 tests pass here).
  • Claim: the theme, Indicator, InputGroup, Field and FileInput suites pass, and lint and Core types are clean. Verified; the Tokenizer and Date/Time suites fail (finding above).
  • Claim: real-Chrome stills will follow in a comment. Not posted yet.
  • Files with findings: packages/core/src/Field/inputDisabledFocus.ts and packages/core/src/Tokenizer/Tokenizer.tsx (tests not updated); packages/themes/butter/src/butterTheme.ts and its CLI copy (overrides); packages/themes/y2k/src/y2kTheme.ts and its CLI copy (light value); packages/core/src/Indicator/RadioIndicator.tsx and packages/core/src/InputGroup/InputGroupText.tsx (records); .changeset/form-control-border-role.md (two claims).
  • Files clear: tokens.stylex.ts, expandColorScale.ts, inputStyles.stylex.ts, FileInput.tsx, CheckboxIndicator.tsx, selectorPresentation.stylex.ts, contrast.test.ts, tokens.test.ts, InputGroupTextAudit.a11y.chromium.spec.ts, Indicator.doc.mjs, the Chocolate, Gothic, Matcha, Neutral and Stone theme files and their CLI copies, all twelve *PaletteRefs.generated.ts files, tokens-color.doc.mjs, tokens.doc.mjs, theme-edit/_palette.mjs, theme.template.ts, and generate-neutral-palette-refs.test.mjs.

Automated review (maintainer link)

Comment thread packages/themes/y2k/src/y2kTheme.ts Resolved
Review fixes for the control-border role:

- Butter's field overrides (text-input, text-area, number, date and time
  inputs, selector, multi-selector, typeahead, tokenizer) set their own
  border to --color-border, so Butter fields stayed at about 1.3:1. They
  now read --color-border-control.
- Y2K's light control edge keeps Neutral Light 20, its heavy outline, so
  fields stay as strong as Y2K's cards (13.25:1 on white, 8.76:1 on the
  body).
- The Indicator record (radio FR5, anatomy, evidence row) and the
  InputGroupText record (FR3) name the control edge.
- Four tests that rebuild the field's StyleX classes expect the control
  edge.
- The docsite theme playground lists the new role.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 14, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 18d5d7f

@cixzhang

Copy link
Copy Markdown
Contributor Author

Decision: D-20261114-078

Records the owner's decision of 2026-11-13 that form controls get their own border role, --color-border-control, held at 3:1 against the surface and the page body. This head adds the token to Core, every theme template and colour-scale themes, points field shells and checkbox and radio boxes at it, and names it in the Indicator and InputGroupText records; every other border keeps its role.

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 14, 2026

@astracat-bot astracat-bot 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.

Approved pending CI: this head is a draft, so CI has not run on it yet; it runs once the pull request is marked ready for review.

The new --color-border-control role is decided by the theme-token record, and every value clears 3:1 against its surface and page body: Core, each first-party theme, and colour-scale themes. All four earlier requests are fixed: the restore tests expect the new edge and pass, Butter's fields read it, Y2K light keeps its heavy outline, and the Indicator and InputGroupText records name it.

Non-blocking, your call:

  • Miss: Butter's dark control stop (Neutral Dark 55, 3.50:1 at butterTheme.ts:253) is fainter than the Neutral Dark 60 (4.92:1) its unchecked boxes and InputGroupText cell had before; Neutral Dark 60 also clears 3:1 on surface, body and card if no control should lose contrast.
  • Miss: the Y2K theme record (y2k.spec.md:104-105) and two comments (expandColorScale.ts:245, butterTheme.ts:576) still describe field edges as the emphasized border; ChatComposer's flat variant and the theme template's family list still don't use or name the new role.
Claims and files checked
  • Claim: a field's surface differs from the page by about 1.1:1 and the old edge reached only 1.37 to 2.22:1 in Core. Verified: 1.10:1 light; 1.37 to 2.22:1.
  • Claim: the new role reaches 3:1 or more against the surface and page body in Core, every first-party theme and generated themes. Verified: contrast test, built values, and a 5,220-pair sweep of generated themes (lowest 3.00:1).
  • Claim: Core's edge is #878D95 / #666A70 at 3.35 and 3.03:1 light, 3.02 and 3.47:1 dark. Verified.
  • Claim: unchecked checkbox and radio boxes use the edge; checked and disabled boxes are unchanged. Verified in browser computed styles.
  • Claim: cards, dividers and other emphasized borders keep their lighter edge. Verified: no emphasized value changes.
  • Claim: a theme that doesn't set the role gets Core's default, including custom themes that set only the emphasized border. Verified (Core default fallback).
  • Claim: the field shell, hover ring, disabled edge, the four focus restores, Tokenizer, Selector, FileInput and InputGroupText use the role, covering the fifteen listed fields. Verified; the rich-text editor follows too.
  • Claim: the boxes reach CheckboxInput, CheckboxList, RadioList, the menu checkbox and radio items and Tokenizer's sheet. Verified.
  • Claim: all fourteen theme-table cells, and 3:1 against each theme's card. Verified (lowest card pair 3.01:1).
  • Claim: Butter's own field overrides now read the role. Verified in the built theme and the browser.
  • Claim: the CLI templates match the theme packages and the palette refs are regenerated. Verified (bundle test, six palette checks).
  • Claim: generated themes walk the tone to 3:1 and the emphasized output is unchanged. Verified.
  • Claim: the token docs, theme-editor stop list, playground token list, template guarantee note and Indicator doc example name the role. Verified (token-doc check passes at 287).
  • Claim: the two records name the control edge. Verified.
  • Claim: the new contrast test fails all 12 cases on the base and passes here. Verified by running it on both.
  • Claim: the updated tests and the named suites pass, and lint and Core types are clean. Verified for the suites rerun here (1,964 tests), lint (0 errors) and Core, Butter and Y2K typechecks.
  • Claim: the knowledge check passes. Verified.
  • Claim: the changeset's colours, field list, box list and custom-theme note. Verified.
  • Files with notes: packages/themes/butter/src/butterTheme.ts and its CLI copy (dark stop, stale comment); expandColorScale.ts (stale comment above the emphasized walk); theme.template.ts (family list).
  • Files clear: tokens.stylex.ts, tokens.test.ts, contrast.test.ts, inputStyles.stylex.ts, inputDisabledFocus.ts, FileInput.tsx, Tokenizer.tsx, selectorPresentation.stylex.ts, InputGroupText.tsx, CheckboxIndicator.tsx, RadioIndicator.tsx, Indicator.doc.mjs, the four restore tests, InputGroupTextAudit.a11y.chromium.spec.ts, generate-neutral-palette-refs.test.mjs, the Chocolate, Gothic, Matcha, Neutral, Stone and Y2K theme files and their CLI copies, all ten palette-ref files, tokens-color.doc.mjs, tokens.doc.mjs, theme-edit/_palette.mjs, the playground constants.ts, both records and the changeset.

Automated review (maintainer link)

// Border — softer taupe card outline (emphasized) in light mode.
'--color-border': [neutral.light[85], withAlpha(neutral.dark[90], '1a')],
'--color-border-emphasized': [neutral.light[75], neutral.dark[60]],
'--color-border-control': [neutral.light[60], neutral.dark[55]],

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.

Non-blocking: in dark mode this stop (Neutral Dark 55, #79786a) measures 3.50:1 on Butter's surface, while the Neutral Dark 60 (#939184) that Butter's unchecked boxes, the InputGroupText cell and the fields Butter does not override painted before measures 4.92:1. It still clears 3:1, so this is your call; neutral.dark[60] also clears 3:1 on the surface, body and card (4.92, 5.34 and 4.33:1) if no control should lose contrast. The CLI copy has the same line.

cixzhang added a commit that referenced this pull request Nov 14, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 0eb946b

@astracat-bot astracat-bot 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.

Approved pending CI: CI is still running on this head, and the merge waits for the required checks to pass.

The new --color-border-control role is decided by the theme-token record, and every value clears 3:1 against its surface and page body in Core, each first-party theme and colour-scale themes.

Non-blocking, your call:

  • Butter's dark control stop (Neutral Dark 55 at butterTheme.ts:253) leaves its unchecked boxes and InputGroupText cell at 3.08:1 on the card, down from 4.33:1; Neutral Dark 60 also clears 3:1 on surface, body and card if no control should lose contrast.
  • The Y2K theme record (y2k.spec.md:104-105) and two comments (expandColorScale.ts:245, butterTheme.ts:576) still describe field edges as the emphasized border; ChatComposer's flat variant and the theme template's family list still don't use or name the new role.
Claims and files checked

Review mode: same-head; reason: none

  • Claim: a field's surface differs from the page by about 1.1:1, and the old edge reached only 1.37 to 2.22:1 in Core. Verified: 1.10:1 light; 1.37 to 2.22:1 from Core's values.
  • Claim: the new role reaches 3:1 or more against the surface and page body in Core, every first-party theme and generated themes. Verified: the new contrast test passes here and fails all 12 new cases on the base.
  • Claim: Core's edge is #878D95 / #666A70, at 3.35 and 3.03:1 light and 3.02 and 3.47:1 dark. Verified from the built stylesheet and browser computed styles.
  • Claim: unchecked checkbox and radio boxes use the edge, while checked and disabled boxes are unchanged. Verified: browser probes show checked boxes and radios unchanged; disabled boxes keep their own rule in the indicator styles.
  • Claim: Butter's dark boxes get lighter, from 4.33:1 to 3.08:1 against the card, and still meet 3:1. Verified by browser probe.
  • Claim: cards, dividers and every other emphasized border keep their edge. Verified: no emphasized value changes and card edges are identical in every frame.
  • Claim: a theme that doesn't set the role gets Core's default, including a custom theme that set only the emphasized border. Verified: Core's defaults supply the role.
  • Claim: the field shell, hover ring, disabled edge, the four focus restores, Tokenizer, Selector, FileInput and InputGroupText use the role, covering the fifteen listed fields. Verified in the changed style lines and the passing restore tests.
  • Claim: the boxes reach CheckboxInput, CheckboxList, RadioList, the menu checkbox and radio items and Tokenizer's sheet. Verified: they all render the two changed indicators.
  • Claim: every cell of the first-party theme table, and 3:1 against each theme's card. Verified from the built theme stylesheets (lowest card pair 3.01:1).
  • Claim: Butter's own field overrides now read the role. Verified: nine rules in Butter's built stylesheet and the browser frames.
  • Claim: the CLI theme templates match the theme packages and the palette refs are regenerated. Verified: regenerating the templates changes nothing and all six palette-ref checks pass.
  • Claim: generated themes walk the tone to 3:1 and the emphasized output is unchanged. Verified in the code and the generated test cases.
  • Claim: the token docs, theme-editor stop list, playground token list, template guarantee note and Indicator doc example name the role. Verified; the token-doc check passes at 287 tokens.
  • Claim: the Indicator and InputGroupText records name the control edge. Verified.
  • Claim: the updated tests and named suites pass. Verified: 1,975 tests across the named suites pass at this head.
  • Claim: lint and Core types are clean. Verified: ESLint over the changed source files reports no errors and Core's typecheck passes.
  • Claim: the before and after measurements for Default, Neutral, Gothic, Stone and Butter, and Y2K unchanged. Verified by browser probes (Butter dark's old field edge measures about 1.3:1 against the field surface); the generated theme's exact 3.42:1 was not re-measured, but its cases pass 3:1.
  • Claim: the knowledge check passes. Verified.
  • Changeset: old and new colours, the field and box lists, every theme meeting 3:1, generated themes deriving the role, other borders unchanged, and the custom-theme note. Verified against the same evidence.
  • Files with notes: packages/themes/butter/src/butterTheme.ts and its CLI copy (dark stop, stale comment); packages/core/src/theme/expandColorScale.ts (stale comment above the emphasized walk); packages/cli/assets/theme.template.ts (family list).
  • Files clear: the changeset, the playground constants.ts, both records, theme-edit/_palette.mjs, tokens-color.doc.mjs, tokens.doc.mjs, the Chocolate, Gothic, Matcha, Neutral, Stone and Y2K theme files and their CLI copies, all ten palette-ref files, the four restore tests, Field/inputDisabledFocus.ts, Field/inputStyles.stylex.ts, FileInput.tsx, CheckboxIndicator.tsx, RadioIndicator.tsx, Indicator.doc.mjs, InputGroupText.tsx, InputGroupTextAudit.a11y.chromium.spec.ts, selectorPresentation.stylex.ts, Tokenizer.tsx, contrast.test.ts, tokens.stylex.ts, tokens.test.ts and generate-neutral-palette-refs.test.mjs.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 14, 2026 21:30
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 5af8528

@astracat-bot astracat-bot 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.

Approved pending CI: the pull request is a draft, so CI has not run on this head yet; it runs once the pull request is marked ready, and the merge waits for the required checks.

The new field and box edge still holds 3:1 against the surface and the page body in Core, every first-party theme and generated themes, and the record rewordings carry a spec approval for this head. The one new commit credits rubyycheung's #7662 and #7766 in the changeset, which matches both pull requests and passes the changeset check.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none

Claims (description and changeset):

  • Field edges used the emphasized role at about 1.4 to 2.2:1 in Core, and the field surface is about 1.1:1 from the page: verified (1.51 / 1.37 light, 1.93 / 2.22 dark; 1.10:1).
  • The new role meets 3:1 against the surface and the page body in Core, every first-party theme and generated themes: verified (the contrast test passes).
  • Core's values are #878D95 and #666A70, at 3.35 and 3.03:1 light and 3.02 and 3.47:1 dark: verified.
  • Each theme's stop and ratios in the theme table: verified for all seven themes from their built stylesheets.
  • Unchecked boxes use the edge; checked and disabled boxes are unchanged: verified.
  • Butter's dark boxes go from 4.33:1 to 3.08:1 on the card, and Butter's field overrides now read the role: verified.
  • Cards, dividers, the raised composer and every other emphasized use keep their edge, and the flat ChatComposer takes the control edge: verified.
  • Themes that do not set the role get Core's default; emphasized-only custom themes now get Core's control edge: verified.
  • The field shell, its hover ring and disabled edge, the five disabled-focus restores, Tokenizer's disabled sheet trigger, Selector's pointer-restored focus, FileInput's triggers and InputGroupText use the edge, covering the listed fields and boxes: verified.
  • The CLI theme templates match the theme packages and the palette refs are regenerated: verified (byte-identical; the palette-ref tests pass).
  • Generated themes walk the tone to 3:1 against surface and body, and their emphasized output is unchanged: verified.
  • Core's palette mapping carries the role and the CLI copy is regenerated from it: verified (the byte-identical test and check pass).
  • The token docs, playground list, template note, Indicator doc example and comments name the role: verified.
  • The theme editor names the control edge as what inputs draw, its whole-theme border answer says the control edge keeps its value, and its follow note says the emphasized border is the one cards and dividers draw: verified.
  • The theme editor does not yet move the control edge with the border, shipped themes are unaffected, and setting the role yourself works: verified.
  • The Indicator, InputGroupText and Y2K records name the control edge: verified.
  • The new contrast test fails on the base and passes here: verified.
  • The flat-composer test passes, and the dark edge is 2.67:1 on the composer's own fill: verified.
  • The updated theme-editor tests, the palette-engine drift test, the name grammar, the four field-ring rebuilds, the Neutral ref count of 101 and the InputGroupText audit line pass or match the source: verified.
  • The new Tokenizer placeholder test passes: verified.
  • The measured before and after edges on the card (Default, Neutral, Gothic, Stone and the generated theme): verified.
  • Every generated file regenerates identically; the knowledge check and the changeset check are clean: verified.
  • The quoted suite counts and the whole CLI, scripts and native suites passing: verified only for the suites run here; the earlier at-this-head paragraph describes an earlier revision.
  • Two record lines change and the knowledge check passes: narrower than the change (the Y2K rows also change), and the check passes.
  • The change builds on rubyycheung's #7662 and #7766: verified (both are hers and about non-text contrast; both are still open).
  • #7766 defines the per-treatment 3:1 review and #7662 darkens Neutral's emphasized border, which this change does through a separate role instead: verified as descriptions of those open proposals.
  • The changeset's list of fields, boxes, flat composer, themes, generated themes, theme editor, custom-theme note and credit: verified.

Files:

  • .changeset/form-control-border-role.md: clear (the new credit line passes the changeset check).
  • packages/core/src/theme/tokens.stylex.ts, expandColorScale.ts, packages/core/src/palette/mapping.ts: clear.
  • packages/core/src/Field/inputStyles.stylex.ts, Field/inputDisabledFocus.ts, FileInput/FileInput.tsx, Indicator/CheckboxIndicator.tsx, Indicator/RadioIndicator.tsx, InputGroup/InputGroupText.tsx, Selector/selectorPresentation.stylex.ts, Tokenizer/Tokenizer.tsx, Chat/ChatComposer.tsx: clear.
  • The seven theme sources under packages/themes/*/src/, their five palette-ref files and their copies under packages/cli/assets/templates/themes/: clear.
  • packages/cli/api/theme-edit/_edit.mjs, _how-question.mjs: clear.
  • docs/specs/components/Indicator/Indicator.spec.md, docs/specs/components/InputGroup/InputGroupText.spec.md, packages/themes/y2k/y2k.spec.md: clear.
  • apps/docsite/src/app/playground/themeEditor/constants.ts, packages/cli/assets/theme.template.ts, packages/core/src/Indicator/Indicator.doc.mjs: clear.
  • Tests: contrast.test.ts, tokens.test.ts, ChatComposer.test.tsx, Tokenizer.test.tsx, TokenizerBottomSheet.test.tsx, DateRangeInput.test.tsx, DateTimeInput.test.tsx, TimeInput.test.tsx, InputGroupTextAudit.a11y.chromium.spec.ts, scripts/generate-neutral-palette-refs.test.mjs and the five changed theme-editor tests: clear.
  • Generated: nine Swift theme files, packages/cli/api/theme/palette/generate/mapping.mjs, tokens-color.doc.mjs, tokens.doc.mjs, docs-topics.json: clear.

Automated review (maintainer link)

@astracat-bot astracat-bot 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.

Changes requested: the new field and box edge holds 3:1 in Core, every first-party theme and generated themes, and the record rewordings carry a spec approval for this head, but CI on this head merged with main shows a collision with the theme editor's new border rules.

  • Found by CI: merged with main, a whole-theme border colour in astryx experimental theme editor moves --color-border-control and no longer moves --color-border-emphasized (cards, dividers and the Switch and ProgressBar parts drawn from it), so nine theme-editor tests fail in test-node and the changeset's theme-editor line, the description's Theme editor bullet and the editor answer at packages/cli/api/theme-edit/_how-question.mjs:23377 wrongly say the control edge keeps its value; please update onto main, keep the emphasized border following as this pull request's own theme-border-follows.test.mjs:73 expects, move main's field-edge tests to the control edge, and reword those three sentences.

The one pr-interaction failure, a Switch touch storyboard, involves nothing this pull request changes, and the update onto main should clear it.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none

Claims (description and changeset):

  • Field edges used the emphasized role at about 1.4 to 2.2:1 in Core, and the field surface is about 1.1:1 from the page: verified (1.51 / 1.37 light, 1.93 / 2.22 dark; 1.10:1).
  • The new role meets 3:1 against the surface and the page body in Core, every first-party theme and generated themes: verified (the contrast test passes, here and in CI's UI tests).
  • Core's values are #878D95 and #666A70, at 3.35 and 3.03:1 light and 3.02 and 3.47:1 dark: verified.
  • Each theme's stop and ratios in the theme table: verified for all seven themes.
  • Unchecked boxes use the edge; checked and disabled boxes are unchanged: verified.
  • Butter's dark boxes go from 4.33:1 to 3.08:1 on the card, and Butter's field overrides now read the role: verified.
  • Cards, dividers, the raised composer and every other emphasized use keep their edge, and the flat ChatComposer takes the control edge: verified.
  • Themes that do not set the role get Core's default; emphasized-only custom themes now get Core's control edge: verified.
  • The field shell, its hover ring and disabled edge, the five disabled-focus restores, Tokenizer's disabled sheet trigger, Selector's pointer-restored focus, FileInput's triggers and InputGroupText use the edge: verified.
  • The CLI theme templates match the theme packages and the palette refs are regenerated: verified.
  • Generated themes walk the tone to 3:1 against surface and body, and their emphasized output is unchanged: verified.
  • Core's palette mapping carries the role and the CLI copy is regenerated from it: verified (CI's API report lists the same rows).
  • The token docs, playground list, template note, Indicator doc example and comments name the role: verified.
  • The theme editor names the control edge as what inputs draw, says the control edge keeps its value, and names cards and dividers as what follows the border: true at this head, false once merged with main (finding above).
  • The theme editor does not yet move the control edge with the border, and shipped themes are unaffected: true at this head; merged with main, the control edge follows and the emphasized border does not (finding above).
  • The Indicator, InputGroupText and Y2K records name the control edge: verified.
  • The new contrast test fails on the base and passes here: verified.
  • The flat-composer test passes, and the dark edge is 2.67:1 on the composer's own fill: verified.
  • The updated theme-editor tests, the palette-engine drift test, the name grammar, the four field-ring rebuilds, the Neutral ref count of 101 and the InputGroupText audit line pass: verified at this head; merged with main, the updated border-follow test fails (finding above).
  • The new Tokenizer placeholder test passes: verified.
  • The measured before and after edges on the card: verified.
  • Every generated file regenerates identically; the knowledge check and the changeset check are clean: verified.
  • The quoted suite counts and the CLI, scripts and native suites passing: they describe an earlier revision; this head merged with main fails nine theme-editor tests (finding above).
  • Two record lines change and the knowledge check passes: narrower than the change (the Y2K rows also change), and the check passes.
  • The change builds on rubyycheung's #7662 and #7766, which define the per-treatment 3:1 review and darken Neutral's emphasized border: verified as descriptions of those open proposals.
  • The changeset's list of fields, boxes, flat composer, themes, generated themes, custom-theme note and credit: verified; its theme-editor line is the finding above.
  • The land path (ready for review once code review approved this head): matches.

Files:

  • .changeset/form-control-border-role.md: finding (its theme-editor line, once merged with main).
  • packages/cli/api/theme-edit/_edit.mjs, _how-question.mjs, theme-border-follows.test.mjs: finding (merged with main).
  • packages/cli/api/theme-edit/theme-fix-lines-keep-role.test.mjs, theme-how-clause-scope.test.mjs, theme-how-roles-and-sides.test.mjs, theme-titles-shadows-alpha-state.test.mjs: clear.
  • packages/core/src/theme/tokens.stylex.ts, expandColorScale.ts, packages/core/src/palette/mapping.ts: clear.
  • packages/core/src/Field/inputStyles.stylex.ts, Field/inputDisabledFocus.ts, FileInput/FileInput.tsx, Indicator/CheckboxIndicator.tsx, Indicator/RadioIndicator.tsx, InputGroup/InputGroupText.tsx, Selector/selectorPresentation.stylex.ts, Tokenizer/Tokenizer.tsx, Chat/ChatComposer.tsx: clear.
  • The seven theme sources under packages/themes/*/src/, their five palette-ref files and their copies under packages/cli/assets/templates/themes/: clear.
  • docs/specs/components/Indicator/Indicator.spec.md, docs/specs/components/InputGroup/InputGroupText.spec.md, packages/themes/y2k/y2k.spec.md: clear.
  • apps/docsite/src/app/playground/themeEditor/constants.ts, packages/cli/assets/theme.template.ts, packages/core/src/Indicator/Indicator.doc.mjs: clear.
  • Tests: contrast.test.ts, tokens.test.ts, ChatComposer.test.tsx, Tokenizer.test.tsx, TokenizerBottomSheet.test.tsx, DateRangeInput.test.tsx, DateTimeInput.test.tsx, TimeInput.test.tsx, InputGroupTextAudit.a11y.chromium.spec.ts, scripts/generate-neutral-palette-refs.test.mjs: clear.
  • Generated: nine Swift theme files, packages/cli/api/theme/palette/generate/mapping.mjs, tokens-color.doc.mjs, tokens.doc.mjs, docs-topics.json: clear.

Automated review (maintainer link)

Comment thread .changeset/form-control-border-role.md Resolved
…) at 3:1 and the emphasized border as before
@cixzhang
cixzhang marked this pull request as draft November 21, 2026 19:47
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 3594a39

@astracat-bot astracat-bot 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.

Approved pending CI: the pull request is a draft, so CI has not run on this head yet; it runs once the pull request is marked ready, and the merge waits for the required checks.

The theme editor now moves --color-border-control with a set --color-border at 3:1 and keeps moving --color-border-emphasized as main does, which fixes the collision the last review found; the editor's border suites pass with main merged. Two optional touch-ups: the comment above the "thick borders on everything" answer in packages/cli/api/theme-edit/_how-question.mjs (lines 23188-23189) still says inputs draw the emphasized border, and the follow note at packages/cli/api/theme-edit/_edit.mjs:8234 names only inputs and selectors where the border answer also names checkbox and radio boxes.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none

Claims (description and changeset):

  • Field edges used the emphasized role at about 1.4 to 2.2:1 in Core, and the field surface is about 1.1:1 from the page: verified (1.51 / 1.37 light, 1.93 / 2.22 dark on surface / body; 1.10:1).
  • The new role meets 3:1 against the surface and the page body in Core, every first-party theme and generated themes: verified (the contrast test passes, card included).
  • Core's values are #878D95 and #666A70, at 3.35 and 3.03:1 light and 3.02 and 3.47:1 dark: verified.
  • Each theme's stop and its ratios in the theme table: verified for all seven themes (the contrast test passes, card included, and the built theme.css values reproduce every listed ratio).
  • Unchecked boxes use the edge; checked and disabled boxes are unchanged: verified (disabled boxes draw --color-border).
  • Butter's dark boxes go from 4.33:1 to 3.08:1 on the card, and Butter's field overrides now read the role: verified.
  • Cards, dividers, the raised composer and every other emphasized use keep their edge, and the flat ChatComposer takes the control edge: verified.
  • Themes that do not set the role get Core's default; emphasized-only custom themes now get Core's control edge: verified.
  • The field shell, its hover ring and disabled edge, the five disabled-focus restores, the Tokenizer sheet trigger, the Selector pointer-restored focus, the FileInput triggers and InputGroupText use the edge: verified (source, and computed colours in the captured stories).
  • The CLI theme templates match the theme packages and the palette refs are regenerated: verified (byte-identical copies; every palette-ref check passes).
  • Generated themes walk the tone to 3:1 against surface and body, and their emphasized output is unchanged: verified.
  • Core's palette mapping carries the role at Neutral stops 55 and 50, and the CLI copy is regenerated from it: verified (the engine check passes).
  • The token docs, playground list, template note and family list, Indicator doc example and comments name the role: verified.
  • The theme editor moves the control edge with a set border at 3:1, keeps moving the emphasized border as main does, names both as followers, and its notes and border answer say so: verified (the follow tests and the 24 border-related editor suites pass).
  • The changeset's theme-editor line (a set border moves the control edge to the nearest 3:1 shade; cards and dividers follow as before): verified.
  • The Indicator, InputGroupText and Y2K records name the control edge: verified.
  • The new contrast test passes here; on the base the role is unset, which the test scores as 0:1, so it fails there: verified from the test's code.
  • The flat-composer test passes, and the dark edge is 2.67:1 on the composer's own fill: verified.
  • The follow tests change only their field-edge assertions and add a case that the emphasized border equals the control edge: verified against the previous head; they pass.
  • The four updated theme-editor expectations, the name grammar, the four field-ring rebuilds, the Neutral ref count of 101 and the InputGroupText audit line: verified (the tests pass; the audit line matches the source).
  • The new Tokenizer placeholder test passes: verified.
  • The measured before and after edges in the stills: verified (the frames captured here compute the same colours).
  • Every generated file regenerates identically; the knowledge and changeset checks are clean: verified.
  • The quoted suite counts, the Mac and Linux runs and the paragraph about an earlier head: describe earlier revisions; the suites run here pass.
  • Two record lines change and the knowledge check passes: narrower than the change (the Y2K rows also change); the check passes.
  • The change builds on rubyycheung's #7662 and #7766: verified as descriptions of those open proposals.
  • The change delivers the editor follow-up for the control edge: matches (the editor now moves it).
  • The land path (draft until code review approves this head): matches.

Files:

  • .changeset/form-control-border-role.md: clear.
  • packages/cli/api/theme-edit/_settings.mjs, _edit.mjs: clear (one non-blocking wording note).
  • packages/cli/api/theme-edit/_how-question.mjs: clear (one non-blocking stale comment above the changed answer).
  • packages/cli/api/theme-edit/theme-border-follows.test.mjs, theme-field-edge-follows-border.test.mjs, theme-fix-lines-keep-role.test.mjs, theme-how-clause-scope.test.mjs, theme-how-roles-and-sides.test.mjs, theme-titles-shadows-alpha-state.test.mjs: clear.
  • packages/core/src/theme/tokens.stylex.ts, expandColorScale.ts, packages/core/src/palette/mapping.ts: clear.
  • packages/core/src/Field/inputStyles.stylex.ts, Field/inputDisabledFocus.ts, FileInput/FileInput.tsx, Indicator/CheckboxIndicator.tsx, Indicator/RadioIndicator.tsx, InputGroup/InputGroupText.tsx, Selector/selectorPresentation.stylex.ts, Tokenizer/Tokenizer.tsx, Chat/ChatComposer.tsx: clear.
  • The seven theme sources under packages/themes/*/src/, their five palette-ref files and their copies under packages/cli/assets/templates/themes/: clear.
  • docs/specs/components/Indicator/Indicator.spec.md, docs/specs/components/InputGroup/InputGroupText.spec.md, packages/themes/y2k/y2k.spec.md: clear.
  • apps/docsite/src/app/playground/themeEditor/constants.ts, packages/cli/assets/theme.template.ts, packages/core/src/Indicator/Indicator.doc.mjs: clear.
  • Tests: contrast.test.ts, tokens.test.ts, ChatComposer.test.tsx, Tokenizer.test.tsx, TokenizerBottomSheet.test.tsx, DateRangeInput.test.tsx, DateTimeInput.test.tsx, TimeInput.test.tsx, InputGroupTextAudit.a11y.chromium.spec.ts, scripts/generate-neutral-palette-refs.test.mjs: clear.
  • Generated: nine Swift theme files, packages/cli/api/theme/palette/generate/mapping.mjs, tokens-color.doc.mjs, tokens.doc.mjs, docs-topics.json: clear.

Automated review (maintainer link)

Comment thread packages/cli/api/theme-edit/_edit.mjs Resolved
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 187a470

@astracat-bot astracat-bot 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.

Approved pending CI: the pull request is a draft, so CI has not run on this head yet; it runs once the pull request is marked ready, and the merge waits for the required checks.

Since the last review this head only merges main, cleanly, so the field and box edge, the theme stops and the theme editor's border rule are unchanged, and the border-related theme-editor suites, including the ones main added, pass with it. Two optional touch-ups remain: the comment above the "thick borders on everything" answer in packages/cli/api/theme-edit/_how-question.mjs (lines 23275-23278) still says inputs draw the emphasized border, and the follow note at packages/cli/api/theme-edit/_edit.mjs:8234 names only inputs and selectors where the border answer also names checkbox and radio boxes.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none

Claims (description and changeset):

  • Field edges used the emphasized role at about 1.4 to 2.2:1 in Core, and the field surface is about 1.1:1 from the page: verified (1.51 / 1.37 light, 1.93 / 2.22 dark on surface / body; 1.10:1).
  • The new role meets 3:1 against the surface and the page body in Core, every first-party theme and generated themes: verified (the contrast test passes, card included).
  • Core's values are #878D95 and #666A70, at 3.35 and 3.03:1 light and 3.02 and 3.47:1 dark: verified.
  • Each theme's stop and its ratios in the theme table: verified for all seven themes from the built theme files.
  • Unchecked boxes use the edge; checked and disabled boxes are unchanged: verified (disabled boxes draw --color-border).
  • Butter's dark boxes go from 4.33:1 to 3.08:1 on the card, and Butter's field overrides now read the role: verified.
  • Cards, dividers, the raised composer and every other emphasized use keep their edge, and the flat ChatComposer takes the control edge: verified.
  • Themes that do not set the role get Core's default; emphasized-only custom themes now get Core's control edge: verified.
  • The field shell, its hover ring and disabled edge, the five disabled-focus restores, the Tokenizer sheet trigger, the Selector pointer-restored focus, the FileInput triggers and InputGroupText use the edge: verified (source, and computed colours in the captured stories).
  • The CLI theme templates match the theme packages and the palette refs are regenerated: verified (byte-identical copies; every palette-ref check passes).
  • Generated themes walk the tone to 3:1 against surface and body, and their emphasized output is unchanged: verified.
  • Core's palette mapping carries the role at Neutral stops 55 and 50, and the CLI copy is regenerated from it: verified (the engine check passes).
  • The token docs, playground list, template note and family list, Indicator doc example and comments name the role: verified.
  • The theme editor moves the control edge with a set border at 3:1, keeps moving the emphasized border as main does, names both as followers, and its notes and border answer say so: verified (the follow tests and the border-related editor suites pass).
  • The changeset's theme-editor line (a set border moves the control edge to the nearest 3:1 shade; cards and dividers follow as before): verified.
  • The Indicator, InputGroupText and Y2K records name the control edge: verified.
  • The new contrast test passes here; on the base the role is unset, which the test scores as 0:1, so all 12 cases fail there: verified from the test's code.
  • The flat-composer test passes, and the dark edge is 2.67:1 on the composer's own fill: verified.
  • The follow tests change only their field-edge assertions and add a case that the emphasized border equals the control edge: verified; they pass.
  • The four updated theme-editor expectations, the name grammar, the four field-ring rebuilds, the Neutral ref count of 101 and the InputGroupText audit line: verified (the tests pass; the audit line matches the source).
  • The new Tokenizer placeholder test passes: verified.
  • The measured before and after edges in the stills: verified (the frames captured here compute the same colours).
  • Every generated file regenerates identically; the knowledge and changeset checks and lint are clean: verified.
  • The quoted suite counts, the Mac and Linux runs and the paragraph about an earlier revision: describe earlier revisions; the suites run here pass.
  • Two record lines change and the knowledge check passes: narrower than the change (the Y2K rows also change); the check passes.
  • The change builds on rubyycheung's #7662 and #7766: verified as descriptions of those proposals.
  • The change delivers the editor follow-up for the control edge: matches (the editor now moves it).
  • The land path (draft until code review approves this head): matches.

Files:

  • .changeset/form-control-border-role.md: clear.
  • packages/cli/api/theme-edit/_settings.mjs, _edit.mjs: clear (one non-blocking wording note).
  • packages/cli/api/theme-edit/_how-question.mjs: clear (one non-blocking stale comment above the changed answer).
  • packages/cli/api/theme-edit/theme-border-follows.test.mjs, theme-field-edge-follows-border.test.mjs, theme-fix-lines-keep-role.test.mjs, theme-how-clause-scope.test.mjs, theme-how-roles-and-sides.test.mjs, theme-titles-shadows-alpha-state.test.mjs: clear.
  • packages/core/src/theme/tokens.stylex.ts, expandColorScale.ts, packages/core/src/palette/mapping.ts: clear.
  • packages/core/src/Field/inputStyles.stylex.ts, Field/inputDisabledFocus.ts, FileInput/FileInput.tsx, Indicator/CheckboxIndicator.tsx, Indicator/RadioIndicator.tsx, InputGroup/InputGroupText.tsx, Selector/selectorPresentation.stylex.ts, Tokenizer/Tokenizer.tsx, Chat/ChatComposer.tsx: clear.
  • The seven theme sources under packages/themes/*/src/, their five palette-ref files and their copies under packages/cli/assets/templates/themes/: clear.
  • docs/specs/components/Indicator/Indicator.spec.md, docs/specs/components/InputGroup/InputGroupText.spec.md, packages/themes/y2k/y2k.spec.md: clear.
  • apps/docsite/src/app/playground/themeEditor/constants.ts, packages/cli/assets/theme.template.ts, packages/core/src/Indicator/Indicator.doc.mjs: clear.
  • Tests: contrast.test.ts, tokens.test.ts, ChatComposer.test.tsx, Tokenizer.test.tsx, TokenizerBottomSheet.test.tsx, DateRangeInput.test.tsx, DateTimeInput.test.tsx, TimeInput.test.tsx, InputGroupTextAudit.a11y.chromium.spec.ts, scripts/generate-neutral-palette-refs.test.mjs: clear.
  • Generated: nine Swift theme files, packages/cli/api/theme/palette/generate/mapping.mjs, tokens-color.doc.mjs, tokens.doc.mjs, docs-topics.json: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 22, 2026 04:11

@astracat-bot astracat-bot 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.

Changes requested: the code is unchanged since the last review, but main has since gained a test that fails once this pull request merges with it.

  • Regression: main now has RadioIndicator presentation > draws an emphasized border on the surface when unchecked (packages/core/src/Indicator/Indicator.test.tsx:376-385), which expects --color-border-emphasized on the unchecked radio and fails against packages/core/src/Indicator/RadioIndicator.tsx:45 after a clean merge (CI on this head merged into an older main, so it stays green); merge main and make that test expect --color-border-control, as the updated Indicator FR5 says.

Everything else stands: the role, the theme stops and the editor's follow rule match the theme-token decision, and the record rewordings carry an owner approval for this head. Two optional touch-ups remain: the comment above the "thick borders on everything" answer in packages/cli/api/theme-edit/_how-question.mjs (lines 23275-23278) still says inputs draw the emphasized border, and the follow note at packages/cli/api/theme-edit/_edit.mjs:8234 names only inputs and selectors where the border answer also names checkbox and radio boxes.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none

Claims (description and changeset):

  • Field edges used the emphasized role at about 1.4 to 2.2:1 in Core, and the field surface is about 1.1:1 from the page: verified (1.51 / 1.37 light, 1.93 / 2.22 dark on surface / body; 1.10:1).
  • The new role meets 3:1 against the surface and the page body in Core, every first-party theme and generated themes: verified (the contrast test passes, card included).
  • Core's values are #878D95 and #666A70, at 3.35 and 3.03:1 light and 3.02 and 3.47:1 dark: verified.
  • Each theme's stop and its ratios in the theme table: verified for all seven themes from the built theme files.
  • Unchecked boxes use the edge; checked and disabled boxes are unchanged: verified (disabled boxes draw --color-border).
  • Butter's dark boxes go from 4.33:1 to 3.08:1 on the card, and Butter's field overrides now read the role: verified.
  • Cards, dividers, the raised composer and every other emphasized use keep their edge, and the flat ChatComposer takes the control edge: verified.
  • Themes that do not set the role get Core's default; emphasized-only custom themes now get Core's control edge: verified.
  • The field shell, its hover ring and disabled edge, the five disabled-focus restores, the Tokenizer sheet trigger, the Selector pointer-restored focus, the FileInput triggers and InputGroupText use the edge: verified (source, and computed colours in the captured stories).
  • The CLI theme templates match the theme packages and the palette refs are regenerated: verified (byte-identical copies; every palette-ref check passes).
  • Generated themes walk the tone to 3:1 against surface and body, and their emphasized output is unchanged: verified.
  • Core's palette mapping carries the role at Neutral stops 55 and 50, and the CLI copy is regenerated from it: verified (the engine check passes).
  • The token docs, playground list, template note and family list, Indicator doc example and comments name the role: verified.
  • The theme editor moves the control edge with a set border at 3:1, keeps moving the emphasized border as main does, names both as followers, and its notes and border answer say so: verified (the follow tests and the border-related editor suites pass).
  • The changeset's theme-editor line (a set border moves the control edge to the nearest 3:1 shade; cards and dividers follow as before): verified.
  • The Indicator, InputGroupText and Y2K records name the control edge: verified (merged with main, its new RadioIndicator test still expects the old edge; see the regression).
  • The new contrast test passes here; on the base the role is unset, which the test scores as 0:1, so all 12 cases fail there: verified from the test's code.
  • The flat-composer test passes, and the dark edge is 2.67:1 on the composer's own fill: verified.
  • The follow tests change only their field-edge assertions and add a case that the emphasized border equals the control edge: verified; they pass.
  • The four updated theme-editor expectations, the name grammar, the four field-ring rebuilds, the Neutral ref count of 101 and the InputGroupText audit line: verified (the tests pass; the audit line matches the source).
  • The new Tokenizer placeholder test passes: verified.
  • The measured before and after edges in the stills: verified (the frames captured here compute the same colours).
  • Every generated file regenerates identically; the knowledge and changeset checks and lint are clean: verified.
  • The quoted suite counts, the Mac and Linux runs and the paragraph about an earlier revision: describe earlier revisions; the suites run here pass.
  • Two record lines change and the knowledge check passes: narrower than the change (the Y2K rows also change); the check passes.
  • The change builds on rubyycheung's #7662 and #7766: verified as descriptions of those proposals.
  • The change delivers the editor follow-up for the control edge: matches (the editor now moves it).
  • The land path (draft until code review approves this head, then ready for review, CI and merge): matches; the pull request is now ready and CI is running at this head.

Files:

  • .changeset/form-control-border-role.md: clear.
  • packages/cli/api/theme-edit/_settings.mjs, _edit.mjs: clear (one non-blocking wording note).
  • packages/cli/api/theme-edit/_how-question.mjs: clear (one non-blocking stale comment above the changed answer).
  • packages/cli/api/theme-edit/theme-border-follows.test.mjs, theme-field-edge-follows-border.test.mjs, theme-fix-lines-keep-role.test.mjs, theme-how-clause-scope.test.mjs, theme-how-roles-and-sides.test.mjs, theme-titles-shadows-alpha-state.test.mjs: clear.
  • packages/core/src/theme/tokens.stylex.ts, expandColorScale.ts, packages/core/src/palette/mapping.ts: clear.
  • packages/core/src/Indicator/RadioIndicator.tsx: the regression above, once merged with main.
  • packages/core/src/Field/inputStyles.stylex.ts, Field/inputDisabledFocus.ts, FileInput/FileInput.tsx, Indicator/CheckboxIndicator.tsx, InputGroup/InputGroupText.tsx, Selector/selectorPresentation.stylex.ts, Tokenizer/Tokenizer.tsx, Chat/ChatComposer.tsx: clear.
  • The seven theme sources under packages/themes/*/src/, their five palette-ref files and their copies under packages/cli/assets/templates/themes/: clear.
  • docs/specs/components/Indicator/Indicator.spec.md, docs/specs/components/InputGroup/InputGroupText.spec.md, packages/themes/y2k/y2k.spec.md: clear.
  • apps/docsite/src/app/playground/themeEditor/constants.ts, packages/cli/assets/theme.template.ts, packages/core/src/Indicator/Indicator.doc.mjs: clear.
  • Tests: contrast.test.ts, tokens.test.ts, ChatComposer.test.tsx, Tokenizer.test.tsx, TokenizerBottomSheet.test.tsx, DateRangeInput.test.tsx, DateTimeInput.test.tsx, TimeInput.test.tsx, InputGroupTextAudit.a11y.chromium.spec.ts, scripts/generate-neutral-palette-refs.test.mjs: clear.
  • Generated: nine Swift theme files, packages/cli/api/theme/palette/generate/mapping.mjs, tokens-color.doc.mjs, tokens.doc.mjs, docs-topics.json: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as draft November 22, 2026 04:33
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec ce2c13a

@astracat-bot astracat-bot 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.

Approved pending CI: CI is still running on this head; its node, build, Swift, docsite, typecheck and lint jobs already pass, and the merge guard waits for the rest.

The new --color-border-control edge, the theme stops, the generated edge and the editor's follow rule match the theme-token decision, and the record rewordings carry an owner approval for this head. Two optional points:

  • Earlier reviews missed that the core-token list astryx docs tokens prints first still names only --color-border and --color-border-emphasized as borders (scripts/generate-token-docs.mjs:435), so someone building their own field from it gets the old 1.51:1 edge; adding --color-border-control there and regenerating fixes it.
  • Butter's dark unchecked boxes drop from 4.33:1 to 3.08:1 on the card (packages/themes/butter/src/butterTheme.ts:401), still above 3:1.
Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none

Claims (description and changeset):

  • Field edges used the emphasized role at about 1.4 to 2.2:1 in Core, and the field surface is about 1.1:1 from the page: verified (1.51 / 1.37 light, 1.93 / 2.22 dark on surface / body; 1.10:1).
  • The new role meets 3:1 against the surface and the page body in Core, every first-party theme and generated themes: verified (the contrast test passes, card included).
  • Core's values are #878D95 and #666A70, at 3.35 and 3.03:1 light and 3.02 and 3.47:1 dark: verified.
  • Each theme's stop and its ratios in the theme table: verified for all seven themes from the built theme files.
  • Unchecked boxes use the edge; checked and disabled boxes are unchanged: verified.
  • Butter's dark boxes go from 4.33:1 to 3.08:1 on the card, and Butter's field overrides now read the role: verified.
  • Cards, dividers, the raised composer and every other emphasized use keep their edge, and the flat ChatComposer takes the control edge: verified.
  • Themes that do not set the role get Core's default; emphasized-only custom themes now get Core's control edge: verified.
  • The field shell, its hover ring and disabled edge, the five disabled-focus restores, the Tokenizer sheet trigger, the Selector pointer-restored focus, the FileInput triggers and InputGroupText use the edge: verified (source, and computed colours in the captured stories).
  • The CLI theme templates match the theme packages and the palette refs are regenerated: verified (byte-identical copies; every palette-ref check passes).
  • Generated themes walk the tone to 3:1 against surface and body, and their emphasized output is unchanged: verified.
  • Core's palette mapping carries the role at Neutral stops 55 and 50, and the CLI copy is regenerated from it: verified.
  • The token docs, playground list, template note and family list, Indicator doc example and comments name the role: verified; the core-token summary list does not (the optional point above).
  • The theme editor moves the control edge with a set border at 3:1, keeps moving the emphasized border as main does, names both as followers, and its notes and border answer say what each draws: verified (the follow tests and the border-related editor suites pass).
  • The changeset's theme-editor line (the editor names the control edge as what inputs draw; a set border moves it to the nearest 3:1 shade; cards and dividers follow as before): verified.
  • The Indicator, InputGroupText and Y2K records name the control edge: verified, and main's RadioIndicator test agrees with them.
  • The new contrast test passes here; on the base the role is unset, which the test scores as 0:1, so all 12 cases fail there: verified from the test's code.
  • The flat-composer test passes, and the dark edge is 2.67:1 on the composer's own fill: verified.
  • The follow tests change only their field-edge assertions and add a case that the emphasized border equals the control edge: verified; they pass.
  • The four updated theme-editor expectations, the name grammar, the four field-ring rebuilds, the Neutral ref count of 101 and the InputGroupText audit line: verified (the tests pass; the audit line matches the source).
  • The new Tokenizer placeholder test passes: verified.
  • The measured before and after edges in the stills: verified (frames captured for this head compute the same colours).
  • Every generated file regenerates identically; the knowledge and changeset checks and lint are clean: verified (CI's lint and node tests pass at this head).
  • The quoted suite counts and the Mac and Linux runs: describe earlier revisions; CI's node tests pass at this head.
  • Two record lines change and the knowledge check passes: narrower than the change (the Y2K rows also change, as the Change section says); the check passes.
  • The change builds on earlier contrast proposals and delivers the editor follow-up for the control edge: matches.
  • The land path (draft until code review approves this head, then ready for review, CI and merge): matches; the pull request is now ready and CI is running.

Files:

  • .changeset/form-control-border-role.md: clear.
  • packages/cli/api/theme-edit/_settings.mjs, _edit.mjs, _how-question.mjs: clear.
  • packages/cli/api/theme-edit/theme-border-follows.test.mjs, theme-field-edge-follows-border.test.mjs, theme-fix-lines-keep-role.test.mjs, theme-how-clause-scope.test.mjs, theme-how-roles-and-sides.test.mjs, theme-titles-shadows-alpha-state.test.mjs: clear.
  • packages/core/src/theme/tokens.stylex.ts, expandColorScale.ts, packages/core/src/palette/mapping.ts: clear.
  • packages/core/src/Field/inputStyles.stylex.ts, Field/inputDisabledFocus.ts, FileInput/FileInput.tsx, Indicator/CheckboxIndicator.tsx, Indicator/RadioIndicator.tsx, InputGroup/InputGroupText.tsx, Selector/selectorPresentation.stylex.ts, Tokenizer/Tokenizer.tsx, Chat/ChatComposer.tsx: clear.
  • The seven theme sources under packages/themes/*/src/, their five palette-ref files and their copies under packages/cli/assets/templates/themes/: clear (Butter's dark trade-off is a non-blocking note).
  • docs/specs/components/Indicator/Indicator.spec.md, docs/specs/components/InputGroup/InputGroupText.spec.md, packages/themes/y2k/y2k.spec.md: clear.
  • apps/docsite/src/app/playground/themeEditor/constants.ts, packages/cli/assets/theme.template.ts, packages/core/src/Indicator/Indicator.doc.mjs: clear.
  • Tests: Indicator.test.tsx, contrast.test.ts, tokens.test.ts, ChatComposer.test.tsx, Tokenizer.test.tsx, TokenizerBottomSheet.test.tsx, DateRangeInput.test.tsx, DateTimeInput.test.tsx, TimeInput.test.tsx, InputGroupTextAudit.a11y.chromium.spec.ts, scripts/generate-neutral-palette-refs.test.mjs: clear.
  • Generated: nine Swift theme files, packages/cli/api/theme/palette/generate/mapping.mjs, tokens-color.doc.mjs, docs-topics.json: clear; tokens.doc.mjs: clear for its change, with the core-token list note.

Automated review (maintainer link)

This branch was successfully deployed

1 active deployment
Preview — ce2c13a6 Deployed Nov 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot. lane:2 Astryx fix-loop lane 2 owns this needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant