Repository navigation
Adopt reviewed Matcha color palette - #7671
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Visual Regression46 of 494 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 26 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
Approval is waiting on a maintainer: no current spec records Matcha's palette or its role mappings, so a maintainer needs to provide or identify the governing authority (for example a theme:matcha record) for the new Tea Gold ramp and the changed warning, yellow and syntax colors. Two fixes are needed regardless of that decision:
scripts/generate-matcha-palette-refs.test.mjsfails under Node 24 on x64 Linux because 13 receiptdiagnosticsvalues differ in their last floating-point digits, so keep exact checks for the palette module, request and hashes and comparediagnosticswith a tolerance.- The changeset should name the old and new colors of the changed roles and how to keep the old look (extend
matchaThemewith token overrides), as AST-017 FR3 requires for visual changes.
[Automated review]
| expect( | ||
| JSON.parse( | ||
| fs.readFileSync( | ||
| path.join(temp, 'matchaPalettes.generated.receipt.json'), | ||
| 'utf8', | ||
| ), | ||
| ), | ||
| ).toEqual( | ||
| JSON.parse( | ||
| fs.readFileSync( | ||
| path.join( | ||
| root, | ||
| 'packages/themes/matcha/src/matchaPalettes.generated.receipt.json', | ||
| ), | ||
| 'utf8', | ||
| ), | ||
| ), | ||
| ); |
There was a problem hiding this comment.
This exact comparison fails under Node 24 on x64 Linux, the CI test platform: 13 diagnostics numbers in the regenerated receipt differ from the committed file in their last digits (for example minimumFamilyDeltaE 6.717003506684842 vs 6.717003506684838), while the palette module, request, candidateSha256 and preview match. Keeping exact checks for those fields and comparing numbers with a tolerance would make the receipt check platform-stable, for example:
function expectReceiptClose(actual, expected) {
if (typeof expected === 'number') {
expect(actual).toBeCloseTo(expected, 9);
} else if (expected && typeof expected === 'object') {
expect(Object.keys(actual).sort()).toEqual(Object.keys(expected).sort());
for (const key of Object.keys(expected)) {
expectReceiptClose(actual[key], expected[key]);
}
} else {
expect(actual).toBe(expected);
}
}The Gothic test in the parent pull request has the same issue.
| '@astryxdesign/cli': patch | ||
| --- | ||
|
|
||
| [feat] Adopt a reviewed, reproducible Matcha palette and map Matcha's existing color roles to selected light and dark palette stops. Ship the same palette request, generated candidate, receipt, and runtime-sized references in the Matcha CLI template. |
There was a problem hiding this comment.
AST-017 FR3 asks a visual change's changeset to name the old and new appearance and how to keep the old look. Please name the changed roles (warning and yellow category #FFB600/#ffc940 → #f2c000/#f6d066; yellow text #cc9200/#ffd960 → #c19800/#ffe08b; syntax number/constant, string, light punctuation, and dark attribute and property), note that all other roles keep their values, and mention that apps can keep the old colors by extending matchaTheme with explicit tokens overrides.
bf33e93 to
4c6d4ff
Compare
6c32478 to
9475b76
Compare
4c6d4ff to
9a81155
Compare
9475b76 to
283325b
Compare
9a81155 to
6e64ba5
Compare
283325b to
6521932
Compare
There was a problem hiding this comment.
Approval needs a maintainer to provide or identify the governing spec for Matcha's new palette direction: no current spec owns Matcha's palette or role mappings, and the proposed theme:matcha record cannot approve itself, so a maintainer needs to approve or reject its decisions (the Tea Gold ramp from #E8B800 and the 25 changed warning, yellow and syntax values). The earlier receipt-test and changeset issues are fixed, and nothing else is needed from you right now.
[Automated review]
6e64ba5 to
661cc80
Compare
6521932 to
30a0946
Compare
There was a problem hiding this comment.
Approval needs a maintainer to provide or identify the governing spec for Matcha’s new palette direction: no current spec owns Matcha’s palette or role mappings, and the proposed theme:matcha record cannot approve itself. A maintainer needs to approve or reject its decisions DEC-1 to DEC-4, which set the Tea Gold ramp from #E8B800 and change 25 warning, yellow and syntax values (for example warning #FFB600/#ffc940 → #f2c000/#f6d066). Everything else checks out at this head, and nothing more is needed from you right now.
[Automated review]
661cc80 to
3c61d4f
Compare
30a0946 to
f9bb474
Compare
There was a problem hiding this comment.
Approval is waiting on a maintainer decision about Matcha’s new palette direction: no current spec owns Matcha’s palette or role mappings, and the proposed theme:matcha record cannot approve itself. A maintainer needs to approve or reject its decisions DEC-1 to DEC-4, which set the Tea Gold ramp from #E8B800 and change 25 light and dark values (for example warning #FFB600/#ffc940 → #f2c000/#f6d066, plus yellow text and several code colors). Separately, please restate DEC-4 and the “Build and artifact contract” as guarantees a consumer can observe (for example, the runtime theme and CSS carry only the resolved values Matcha uses, and ejecting Matcha reproduces the same palette) instead of the generator’s write and check modes and private file list, which docs/architecture/knowledge-contracts.md (INV18) keeps out of new product records.
[Automated review]
3c61d4f to
8ae5d61
Compare
f9bb474 to
a180ee2
Compare
There was a problem hiding this comment.
Approval is waiting on a maintainer decision: no current spec owns Matcha's palette or its role mappings, and the new theme:matcha record cannot approve itself, so a maintainer needs to approve or reject DEC-1 to DEC-4 (the private light/dark palette, the unanchored Tea Gold ramp from #E8B800, the role mapping that moves warning and Yellow to #F2C000/#F6D066 and changes six syntax colours, and the selected-reference module). Whatever that decision, two record fixes are needed:
- The contrast-exception list in
matcha.spec.md(lines 87–96) leaves out pairs below its own 4.5:1 bar, such as the light warning field text at 2.52:1, Badge success text at 3.58:1 and destructive Button text at 4.06:1, and AST-008 FR12 asks theme evidence to name text size, component state and non-colour cues. - DEC-4 and the build contract prescribe the generator's write and check modes and private files, which
architecture:knowledge-contractsINV18 allows only for an intentional public contract; describe the observable guarantees instead, or have the deciding maintainer record that the mechanism is intentional.
[Automated review]
| semantic and categorical states. A palette stop alone is not an accessibility | ||
| claim; contextual component evidence remains authoritative. | ||
|
|
||
| Known exceptions in the maintained mappings are: |
There was a problem hiding this comment.
This list reads as complete, but several pairs that components render with this mapping fall under the same 4.5:1 bar and are missing, for example light FieldStatus warning text (--color-text-yellow on --color-warning-muted) at 2.52:1, Badge success (--color-on-success on --color-success) at 3.58:1 light / 4.25:1 dark, and destructive Button text (--color-on-error on --color-error) at 4.06:1 light / 3.23:1 dark. AST-008 FR12 also asks theme evidence to name text size, component state and non-colour cues. Could the list either cover every measured sub-threshold pair with those details, or say which states it covers?
| **Decider:** `rubyycheung`, `2026-10-17` | ||
|
|
||
| Matcha's selected-reference module contains exactly the family, mode, and stop | ||
| values referenced by the maintained theme. Write mode synchronizes package and |
There was a problem hiding this comment.
architecture:knowledge-contracts INV18 says a new record requirement must not prescribe internal modules, files or tool modes unless the mechanism is an intentional public contract. The write/check modes here (and the file list in the build contract above) would make today's generator layout normative. Consider stating the observable guarantees instead, such as runtime output carrying only the selected values, no full-palette export, template parity and no regeneration during builds.
b407c31 to
465b9be
Compare
47b9099 to
6911079
Compare
There was a problem hiding this comment.
Approval is waiting on a maintainer decision: no current spec owns Matcha's palette or its role mappings, and the new theme:matcha record cannot approve itself, so a maintainer needs to approve or reject DEC-1 to DEC-4 (the private light/dark palette, the unanchored Tea Gold ramp from #E8B800, the mapping that moves warning and Yellow to #F2C000/#F6D066 and changes six syntax colours, and the selected-reference guarantees). Whatever that decision, two small record fixes are needed:
matcha.spec.mdlines 94, 96 and 103 give 16px for Badge labels, which render at 13px (--text-supporting-size), and AST-008 FR12 asks theme evidence to name the exact text size.- Lines 119–120 say verification fails when the complete palette enters runtime, but no test or build step checks that, so please add such a check (for example, that
matchaTheme.tsimports no palette module other than./matchaPaletteRefs.generated) or name only the checks that exist.
[Automated review]
| - success Badge labels at 16px are 3.58:1 light and 4.25:1 dark; the label and | ||
| solid semantic fill identify the state; | ||
| - error Badge labels and destructive Button labels at 16px are 4.06:1 light and | ||
| 3.23:1 dark; the written action or status, component shape, and error fill are | ||
| independent cues; | ||
| - light warning FieldStatus text at 13px is 2.52:1; its warning icon and message | ||
| text identify the state; | ||
| - light Green, Orange, Red, and Yellow categorical text is respectively 4.21:1, | ||
| 4.03:1, 4.14:1, and 2.41:1 on its tinted surface. These pairings appear in | ||
| 16px Badge labels, 13px Token labels, and normal-sized Card content, where the |
There was a problem hiding this comment.
Badge labels render at 13px in Matcha, not 16px: Badge uses --text-supporting-size (0.8125rem), and every Badge variant renders at 13px (weight 500). Destructive Button labels are 16px. AST-008 FR12 asks theme evidence to name the exact text size, so lines 94, 96 and 103 should say 13px for Badge labels (the 4.5:1 bar and every ratio stay the same).
| Verification fails when package and template output diverge, when a selected | ||
| value is stale or missing, or when the full private palette enters runtime. |
There was a problem hiding this comment.
The first two conditions have checks (the CLI theme-bundle test and the --check in the package build), but nothing fails when the complete palette enters runtime: a theme source that imports matchaPalettes and reads a stop from it passes the selected-reference check and the literal guard. The guarantee holds today (no unselected stop reaches the built JS or CSS); could this either gain a check, for example a test that matchaTheme.ts imports no palette module other than ./matchaPaletteRefs.generated, or name only the checks that exist?
465b9be to
bf22a51
Compare
6911079 to
6d7dff3
Compare
There was a problem hiding this comment.
Approval is waiting on a maintainer decision: no current spec owns Matcha's palette or its role mappings, and the new theme:matcha record cannot approve itself, so a maintainer needs to approve or reject DEC-1 to DEC-4 and its contrast exceptions (the private light/dark palette, the unanchored Tea Gold ramp from #E8B800, the mapping that moves warning and Yellow to #F2C000/#F6D066 and changes six syntax colours, and the runtime guarantees). Whatever that decision, two small fixes are needed:
matchaColorMapping.test.tsrejects only./matchaPalettes.generated, so a theme that imports the full palette through./matchaPalettesstill passes every check and the build puts all unselected stops indist/source.mjs; pinning the theme's relative imports to./iconsand./matchaPaletteRefs.generatedcloses that gap.matcha.spec.mdlines 117–118 say built output never contains the complete palette, but the build emits it indist/matchaPalettes.generated.d.tsanddist/matchaPalettes.d.ts; exclude those modules fromtsconfig.build.jsonor narrow the sentence to runtime JavaScript and CSS.
[Automated review]
| it('imports only the selected runtime palette projection', () => { | ||
| expect(source).toContain("from './matchaPaletteRefs.generated'"); | ||
| expect(source).not.toContain("from './matchaPalettes.generated'"); | ||
| }); |
There was a problem hiding this comment.
This only rejects the ./matchaPalettes.generated specifier. src/matchaPalettes.ts re-exports the whole palette, and a theme source that adds import {matchaPalettes} from './matchaPalettes' and reads matchaPalettes.yellow.light[80] passes all four tests here, the refs --check and the package build, while dist/source.mjs and dist/source.js then carry all 290 unselected palette values. matcha.spec.md lines 119–121 say verification fails in that case. Pinning the relative imports closes it:
it('imports only the selected runtime palette projection', () => {
const relative = [...source.matchAll(/from '(\.[^']+)'/g)].map(m => m[1]).sort();
expect(relative).toEqual(['./icons', './matchaPaletteRefs.generated']);
});| runtime mappings. Default runtime exports and built output contain only the | ||
| selected values the theme consumes, never the complete private candidate. |
There was a problem hiding this comment.
The package build emits declarations for all of src (tsconfig.build.json includes src), so dist/matchaPalettes.generated.d.ts and dist/matchaPalettes.d.ts (about 17.5 KB each) list all 290 unselected palette values as literal types. Runtime JavaScript and CSS are clean. Either exclude src/matchaPalettes*.ts from tsconfig.build.json or say "runtime JavaScript and CSS" here instead of "built output".
bf22a51 to
3ce2b8f
Compare
6d7dff3 to
e0923ab
Compare
There was a problem hiding this comment.
Approval is waiting on a maintainer decision: no current spec owns Matcha's palette or its role mappings, and the new theme:matcha record cannot approve itself, so a maintainer needs to approve or reject DEC-1 to DEC-4 and its contrast exceptions (the private light/dark palette, the unanchored Tea Gold ramp from #E8B800, the mapping that moves warning and Yellow to #F2C000/#F6D066 and shifts six code colours, and the runtime guarantees). Both fixes from the previous review are in place, and nothing else is needed from you right now. Two points for the deciding maintainer:
- The light warning icon and field rim measure 1.71:1 on white (1.76:1 today), below 3:1, and the record does not list them.
- The exception ratios for Banner descriptions, warning field text and category labels assume a white surface; on Matcha's light page background they are lower (Banner descriptions down to 3.11:1), and pink category labels there (4.37:1) are not listed.
[Automated review]
3ce2b8f to
f24c611
Compare
e0923ab to
1fed7dc
Compare
There was a problem hiding this comment.
Approval is waiting on a maintainer decision: no current spec owns Matcha's palette or its role mappings, and the new theme:matcha record cannot approve itself, so a maintainer needs to approve or reject DEC-1 to DEC-4 and its contrast exceptions (the private light/dark palette, the unanchored Tea Gold ramp from #E8B800, the mapping that moves warning and Yellow to #F2C000/#F6D066 and shifts six code colours, and the runtime guarantees). Whatever that decision, two small record fixes are needed:
- The contrast exceptions on translucent fills (
matcha.spec.mdlines 91–104) are measured over white but name no surface, which AST-008 FR12 asks for; on Matcha's light page background they read lower and pink category labels fall to 4.37:1, so please name the surface or add those figures. - Lines 120–122 say verification fails when the theme imports anything besides its icon registry and palette projection, though it also imports
@astryxdesign/core/themeand the guard checks relative imports only, and DEC-4 says built output omits the full palette while the declaration files carry it, so please narrow both to what the checks prove.
For the deciding maintainer: approving DEC-3 as written also accepts the light warning icon and rim at 1.71:1 on white and dark JSON keys and string values sharing #6ccaaa.
[Automated review]
| - light Banner descriptions at 13px are 3.89:1 for info, 3.83:1 for success, | ||
| 4.10:1 for warning, and 3.54:1 for error; the status icon, title, and written | ||
| description identify each state independently of color; | ||
| - success Badge labels at 13px are 3.58:1 light and 4.25:1 dark; the label and | ||
| solid semantic fill identify the state; | ||
| - error Badge labels at 13px and destructive Button labels at 16px are 4.06:1 | ||
| light and 3.23:1 dark; the written action or status, component shape, and error fill are | ||
| independent cues; | ||
| - light warning FieldStatus text at 13px is 2.52:1; its warning icon and message | ||
| text identify the state; | ||
| - light Green, Orange, Red, and Yellow categorical text is respectively 4.21:1, | ||
| 4.03:1, 4.14:1, and 2.41:1 on its tinted surface. These pairings appear in | ||
| 13px Badge and Token labels, and normal-sized Card content, where the | ||
| written category and component form remain independent cues; and |
There was a problem hiding this comment.
These ratios hold over a white surface, but the fills behind Banner descriptions, warning FieldStatus text and category labels are translucent, and the list names no surface. On Matcha's light body (#f0f0e0) they read lower (Banner error 3.11:1, FieldStatus 2.23:1, Yellow 2.15:1), and pink category labels drop to 4.37:1, which the list omits. AST-008 FR12 asks theme evidence to name the exact background, so could each translucent pairing name its surface and either add the body figures or say these are measured on white surfaces only?
| Verification fails when package and template output diverge, when a selected | ||
| value is stale or missing, or when the maintained theme source imports anything | ||
| other than its icon registry and selected palette projection. |
There was a problem hiding this comment.
matchaTheme.ts also imports @astryxdesign/core/theme, and the guard in matchaColorMapping.test.ts checks relative imports only, so this sentence is false as written. The verification map's wording on line 133 ("A relative import other than …") matches the check.
| reviewed selected palette values. Default package exports and built theme output | ||
| omit the complete private candidate, and normal builds consume committed values |
There was a problem hiding this comment.
The build writes the complete palette (all 290 unselected values) into dist/matchaPalettes.d.ts and dist/matchaPalettes.generated.d.ts, which lines 118–119 allow; "runtime JavaScript and CSS" here would match both that sentence and the check.
| constant: [yellow.light[45], yellow.dark[75]], | ||
| tag: [pink.light[30], pink.dark[65]], | ||
| attribute: [orange.light[30], yellow.dark[70]], | ||
| property: [teal.light[55], teal.dark[75]], |
There was a problem hiding this comment.
With this mapping dark string (line 24) and property both resolve to teal.dark[75] (#6ccaaa), so JSON and YAML keys and their string values share one colour in dark CodeBlocks (they were #70c4b0 and #7bc49e); light punctuation (line 37) likewise shares neutral.light[30] with keyword. Worth confirming with the approver that DEC-3 intends these merges.
1fed7dc to
5cc150f
Compare
There was a problem hiding this comment.
Approval is waiting on a maintainer decision: no current spec owns Matcha's palette or its role mappings, and the new theme:matcha record cannot approve itself, so a maintainer needs to provide the governing spec by approving or rejecting its DEC-1 to DEC-4 and contrast exceptions (the private light/dark palette, the unanchored Tea Gold ramp from #E8B800, the mapping that moves warning and Yellow to #F2C000/#F6D066 and shifts six code colours, and the runtime guarantees). Both record fixes from the previous review are in place, and nothing else is needed from you right now. For the deciding maintainer, approving DEC-3 as written also accepts:
- the light warning icon and field rim at 1.71:1 on white, below the 3:1 non-text level;
- dark JSON keys and string values sharing one colour,
#6ccaaa.
[Automated review]
|
/approve-spec 5cc150f |
f24c611 to
330fd36
Compare
There was a problem hiding this comment.
This looks good to approve: a design owner approved the new theme:matcha record at this exact head, and the colour changes, generated palette and runtime references all match it. Note that any new commit voids that approval and needs a fresh /approve-spec with the new head SHA. Two things the approved record accepts without naming, in case you want to list them:
- the light warning field rim and icon at 1.71:1 on white, below the 3:1 non-text level;
- light secondary text on white surfaces and cards at 4.41:1.
[Automated review]
Summary: Add a reproducible light-and-dark Matcha palette, map Matcha-owned color roles to named palette stops, keep the complete palette private to authoring and tests, and synchronize the package and CLI template. Test Plan: 39 focused palette, mapping, contrast, and component-contract tests; config-to-candidate and receipt reproduction; selected-reference drift check; Matcha package build; all first-party theme builds; build and lab package builds; full sandbox build; check:repo; changed-file ESLint and Prettier; package/template byte parity; browser-reviewed raw palette, token mapping, and real-component comparisons. Reviewers: Subscribers: Tasks: Tags:
5cc150f to
c704736
Compare
|
/approve-spec c704736 |
User impact
Matcha now uses one reviewed, reproducible Light/Dark palette across its existing semantic, categorical, syntax, effect, and shadow colors. Tea Gold has a smoother golden-yellow progression, including Warning and Yellow moving from
#FFB600/#FFC940to#F2C000/#F6D066.Matcha owns its own config, complete generated palette, receipt, selected references, and mappings. The complete palette remains private authoring data, so this PR adds no public palette API or runtime cost.
This pull request is stacked on Gothic #7670. Shared generation tooling comes from color-neutral maintenance PR #7678; Matcha does not import another theme's palette values.
Visual authority
theme:matcharecords the approved palette, mappings, compatibility, and evidence at this exact head.Before and after
Raw palette
Existing roles mapped to named palette stops
Real Astryx components
The same component tree is rendered before and after in Light and Dark modes with inputs, banners, badges, category colors, status dots, buttons, a highlighted
CodeBlock, and progress bars.State matrix
Scope
Consumers that need the former appearance can extend
matchaThemeand override the affected color, syntax, shadow, and component tokens with their previous values.Testing
pnpm vitest run packages/themes/matcha/src/matchaPalettes.test.ts packages/themes/matcha/src/matchaTheme.test.ts packages/themes/matcha/src/matchaColorMapping.test.ts scripts/generate-matcha-palette-refs.test.mjs scripts/palette-receipt-test-utils.test.mjs— 15 tests passedConfig-to-full-palette and cross-platform receipt reproduction
Matcha selected-reference drift check
pnpm -F @astryxdesign/theme-matcha buildpnpm check:knowledgepnpm check:changesetsPackage and CLI-template theme, config, generated palette, receipt, and selected references verified byte-identical
Browser-rendered palette, token, and component review in Chromium
Final five-theme review remediation run: 21 files and 64 tests passed
Writing rubric results