feat(cli): generate reviewable tonal palettes - #5992
Open
rubyycheung wants to merge 18 commits into
Open
Conversation
rubyycheung
requested review from
cixzhang,
imdreamrunner and
josephfarina
as code owners
September 3, 2026 21:37
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Sep 3, 2026
cixzhang
requested changes
Sep 4, 2026
cixzhang
left a comment
Contributor
There was a problem hiding this comment.
Palette authors can currently lose files or receive a candidate that silently ignores part of their request.
Before this lands:
- Protect every input and output by filesystem identity, not path spelling. On case-insensitive macOS,
Palette.config.jsonwith--out palette.config.json --overwritereplaces the input config. Temporary output files are also predictable and may overwrite an existing file without--overwrite. Use exclusive randomized temporary files and refuse any input/output identity collision. - Validate and normalize the complete request before generation. An
anchorsobject currently becomes an empty array and exits successfully; anchors for an omitted mode are ignored; receipt anchors retain unnormalized casing. Invalid author intent must fail clearly rather than generate a different unanchored candidate. - Preserve requested stop order through JSON/TypeScript serialization and preview rendering. Mixed stops such as
[12.5, 50, 80]currently enumerate as50, 80, 12.5because integer-like object keys move first. Keep ordered entries until rendering and add a mixed decimal/integer regression fixture.
The canonical recipe fixtures, public API/CLI split, generated TypeScript typing, JSON parity, preview isolation, and package boundaries otherwise passed focused review.
[Reviewed by Robohands]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
astryx-oklch-v1production engine.generateTonalPalette()authoring API with no filesystem or theme side effects.astryx theme palette generate <config>for previewing candidates and explicitly writing them..tsis requested, with JSON available for tooling.palette-preview-v1HTML artifact for visual review. Light and dark modes are stacked, and every family uses matching stop columns.--overwriteis explicit.defineTheme, map semantic tokens, or make accessibility claims.Stack
Depends on #5986, which defines the generation contract. The accepted-palette contract is #5985. Neutral adoption remains in #5987.
Neutral is not converted to direct palette imports in this PR. A bundle check showed that importing one palette value currently includes the complete authoring palette in
dist/source.mjs; that requires a separate build-time resolution design.Verification
git diff --checkRelease
Includes a patch Changeset for
@astryxdesign/cli.