Skip to content

docs(skill): cover palette work in ui-kit-verification - #1268

Merged
tenphi merged 1 commit into
mainfrom
docs/ui-kit-verification-palette-pipeline
Jul 29, 2026
Merged

docs(skill): cover palette work in ui-kit-verification#1268
tenphi merged 1 commit into
mainfrom
docs/ui-kit-verification-palette-pipeline

Conversation

@tenphi

@tenphi tenphi commented Jul 29, 2026

Copy link
Copy Markdown
Member

The ui-kit-verification skill covered API-surface changes, where typechecking finds the breakages. It said nothing about palette changes, where types and the test suites prove almost nothing — no test asserts on a colour nobody wrote an assertion for.

This adds what a Glaze bump / seed retune / axis migration actually needs. All of it was learned the hard way while doing exactly that on #1267 and its cloud counterpart, and every item below corresponds to a mistake that was actually made and caught:

  • Dump every token in all four scheme variants and diff. Via a throwaway vitest spec, because tasty needs a DOM. Convert to RGB before diffing — Glaze 0.x emits okhsl() and 1.x defaults to oklch(), so a textual diff across the bump is useless.
  • Light mode alone misleads. Text tokens carry contrast: ['AA','AAA'] and the solver, not the authored tone, fixes their value — so changing a delta reads as a no-op in light while moving the @hc variants. An overshooting relative tone is often deliberate: it is what drives a token to the absolute extremes in high contrast. This one nearly cost real HC contrast on a "consistency cleanup".
  • Long-lived branches publish stale canaries. A branch open a while will publish snapshots predating an API main shipped and cloud already adopted. Fix at the source (merge main, republish); don't patch cloud call sites or downgrade the pin. And a Glaze major is not a dependency bump — 1.x dropped lightness, so the upgrade and the migration are one inseparable change.
  • Cloud replicates the recipe in five places, not one. app-theme-tokens.spec.ts is a smoke test over a subset of tokens with a ±2 tolerance, not proof. Plus the two cloud-specific traps: the APM per-hue saturation factors that a pastel palette can legitimately drop, and the baked e2e colour baselines.
  • Splitting a palette PR: the intuitive cut is often wrong. Dropping pastel while leaving the seed at its pastel value moved accents further from main than keeping pastel did; seed and pastel move together or not at all.

Also widened the description so palette/Glaze phrasing triggers the skill, and bumped it to 1.1.0.

Docs only — no src/ changes. Verified 997 tests pass and prettier is clean on the file.

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only updates to a Claude skill file; no runtime or application code changes.

Overview
Extends the ui-kit-verification skill beyond API migrations with a Palette and token changes section for Glaze bumps, seed retunes, and axis migrations where types and tests rarely catch colour drift.

The new guidance covers token dump/diff across all four scheme variants (RGB deltas when formats change), HC/light-mode pitfalls, refreshing stale canaries on long-lived ui-kit branches, keeping cloud’s mirrored palette recipe files in sync, and empirically validating palette PR splits. The skill description now mentions Glaze/palette triggers and metadata is bumped to 1.1.0.

Minor formatting-only edits elsewhere in the doc (italics, table alignment, one wrapped expect).

Reviewed by Cursor Bugbot for commit bf9950b. Bugbot is set up for automated code reviews on this repo. Configure here.

The skill covered API-surface changes, where typechecking finds the
breakages. It said nothing about palette changes, where types and the test
suites prove almost nothing because no test asserts on a colour nobody wrote
an assertion for. Adds what a Glaze bump / seed retune / axis migration
actually needs, all of it learned the hard way on #1267 and its cloud
counterpart:

- Dump every token in ALL FOUR scheme variants and diff, via a throwaway
  vitest spec (tasty needs a DOM). Convert to RGB before diffing, since
  Glaze 0.x emits `okhsl()` and 1.x defaults to `oklch()` and a textual diff
  is useless across that.
- Light mode alone misleads: text tokens carry `contrast: ['AA','AAA']` and
  the solver, not the authored tone, fixes their value — so a delta change
  reads as a no-op in light while moving the HC variants. An overshooting
  relative tone is often deliberate; it is what drives a token to the
  absolute extremes in high contrast.
- Long-lived branches publish canaries that predate an API `main` shipped and
  cloud already adopted. Fix at the source (merge main, republish), do not
  patch cloud call sites or downgrade the pin. A Glaze major is not a
  dependency bump — 1.x dropped `lightness`, so upgrade and migration are one
  change.
- Cloud replicates the recipe in five places, not one; `app-theme-tokens.spec`
  is a smoke test over a subset, not proof. Plus the two cloud traps: APM
  per-hue saturation factors that a pastel palette can drop, and the baked
  e2e colour baselines.
- Splitting a palette PR: the intuitive cut is often wrong (dropping pastel
  while leaving the seed moved accents further from main than keeping it).

Widened the description so palette/Glaze phrasing triggers it, and bumped to
1.1.0.
@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bf9950b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview, Comment Jul 29, 2026 7:02pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📦 NPM canary release

Deployed canary version 0.0.0-canary-5edde72.

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Storybook is successfully deployed!

@github-actions

Copy link
Copy Markdown
Contributor

🏋️ Size limit report

Name Size Passed?
All 434.03 KB (0% 🟰) Yes 🎉
Tree shaking (just a Button) 114.87 KB (0% 🟰) Yes 🎉

Click here if you want to find out what is changed in this build

@tenphi
tenphi merged commit c84470d into main Jul 29, 2026
15 checks passed
@tenphi
tenphi deleted the docs/ui-kit-verification-palette-pipeline branch July 29, 2026 19:07
tenphi added a commit that referenced this pull request Jul 30, 2026
Rebuilds the redesign branch on top of main now that the non-visual half has
landed (#1267, #1268, released as 0.150.0).

The branch's previous 22 commits were the OKHST/tone migration plus the fixes
riding on it — all of which are now IN main via #1267. Replaying them would have
meant resolving `palette.ts` against itself 15 times for a known 5-line end
state, so the branch is reconstructed on main instead of rebased commit-by-commit.
Verified the result: the tree differs from the old branch tip only where main
moved ahead (`#pink`, the CopySnippet serif font map), and both of those survive.

What remains — the actual redesign:

- `SEED_SATURATION` 80 -> 100 with `{ pastel: true }` on the default and special
  theme seeds. The two are coupled: raising the seed without pastel
  over-saturates, enabling pastel without raising it washes the palette out.

Plus two component changes that were on the branch and are unrelated to colour:

- `DialogTrigger`: `mobileType` now falls back to `'modal'` for `'popover'`
  rather than reusing `type`, so a popover gets a sheet on mobile.
- `FilterPicker`: drop `isDismissable={false}` so the picker closes on outside
  press like the other overlays.

This IS a visual change and every token moves. Per-channel RGB delta vs main,
all 156 tokens x 4 scheme variants: core surfaces/text mean ~5 (max 43), accent
mean ~28 (max 60), accent-disabled mean ~8 (max 17). Accent carries the bulk,
which is the intent — that is where the per-hue chroma inconsistency showed.

Verified: build clean, 997 tests pass, oxlint + prettier clean, size-limit
passes (451.35 kB / 460 kB).
tenphi added a commit that referenced this pull request Jul 30, 2026
Rebuilds the redesign branch on top of main now that the non-visual half has
landed (#1267, #1268, released as 0.150.0).

The branch's previous 22 commits were the OKHST/tone migration plus the fixes
riding on it — all now IN main via #1267. Replaying them would have meant
resolving `palette.ts` against itself 15 times for a 3-line end state, so the
branch is reconstructed on main rather than rebased commit-by-commit.

The whole change is now:

- `SEED_SATURATION` 80 -> 100 with `{ pastel: true }` on the default and special
  theme seeds. The two are coupled: raising the seed without pastel
  over-saturates, enabling pastel without raising it washes the palette out.

This IS a visual change and every token moves. Per-channel RGB delta vs main,
all 156 tokens x 4 scheme variants: core surfaces/text mean ~5 (max 43), accent
mean ~28 (max 60), accent-disabled mean ~8 (max 17). Accent carries the bulk,
which is the intent — that is where the per-hue chroma inconsistency showed.

Verified: build clean, 997 tests pass, oxlint + prettier clean, size-limit
passes (451.35 kB / 460 kB).
tenphi added a commit that referenced this pull request Jul 31, 2026
Rebuilds the redesign branch on top of main now that the non-visual half has
landed (#1267, #1268, released as 0.150.0).

The branch's previous 22 commits were the OKHST/tone migration plus the fixes
riding on it — all now IN main via #1267. Replaying them would have meant
resolving `palette.ts` against itself 15 times for a 3-line end state, so the
branch is reconstructed on main rather than rebased commit-by-commit.

The whole change is now:

- `SEED_SATURATION` 80 -> 100 with `{ pastel: true }` on the default and special
  theme seeds. The two are coupled: raising the seed without pastel
  over-saturates, enabling pastel without raising it washes the palette out.

This IS a visual change and every token moves. Per-channel RGB delta vs main,
all 156 tokens x 4 scheme variants: core surfaces/text mean ~5 (max 43), accent
mean ~28 (max 60), accent-disabled mean ~8 (max 17). Accent carries the bulk,
which is the intent — that is where the per-hue chroma inconsistency showed.

Verified: build clean, 997 tests pass, oxlint + prettier clean, size-limit
passes (451.35 kB / 460 kB).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant