Skip to content

feat(core): point 'p3' users to 'display-p3' - #225

Merged
pbroom merged 5 commits into
mainfrom
feat/core-p3-hint
Oct 10, 2026
Merged

pbroom merged 5 commits into
mainfrom
feat/core-p3-hint

Conversation

@pbroom

@pbroom pbroom commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Part of the color-kit assessment stack (#204 → #225). lint, build, test, format:check, typecheck and agents:check:strict pass.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

This was referenced Oct 6, 2026

pbroom commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium risk] Adds validation and migration hints for a removed color space spelling.

The PR appears safe to merge, with two non-blocking gaps in the promised migration errors.

Fix All in CursorFindings

  1. P2 Endpoints skip the migration hint ▶
  2. P2 Some planes skip gamut checks ▶

Summary

Adds a shared hint directing callers from 'p3' to 'display-p3'. Adds checks that reject unknown gamuts, changes unknown array-space errors to TypeError, and updates tests and docs.

  • Interpolation endpoints still skip the new hint.
  • Three plane queries skip gamut checks on planes without lightness/chroma axes.

Reviews (1) · Last reviewed commit: "feat(core): point 'p3' users to 'display..."

Comment thread packages/core/src/interpolation/index.ts Outdated
Comment thread packages/core/__tests__/p3-hint.test.ts

pbroom commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner Author

Merge activity

  • Oct 10, 6:47 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 10, 7:40 PM UTC: Graphite rebased this pull request as part of a merge.
  • Oct 10, 7:40 PM UTC: @pbroom merged this pull request with Graphite.

@pbroom
pbroom changed the base branch from chore/prettier-ignore-claude to graphite-base/225 October 10, 2026 19:37
pbroom added a commit that referenced this pull request Oct 10, 2026
Part of the color-kit assessment stack (#204 → #225). lint, build, test, format:check, typecheck and agents:check:strict pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@pbroom
pbroom changed the base branch from graphite-base/225 to main October 10, 2026 19:38
pbroom and others added 5 commits October 10, 2026 19:39
Validating the gamut in contrastRatio pushed the parse and everyday
bundles past their limits. Shorten the gamut error message and raise
the parse budget to the approved 5.5 kB (everyday toolkit 5.55 kB,
keeping its usual 0.05 kB offset).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
mix/interpolate (and their Into variants) returned exact endpoints before
validating the space, so t = 0 or 1 (and generateScale with two stops)
accepted the removed 'p3'. chromaBand, contrastBoundary and
contrastRegion queries returned empty geometry on non-L×C planes before
checking the gamut. Validate first in both cases and cover them in tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Measured 5.51 kB and 5.56 kB gzipped; the next branch's named-color
packing brings both back under the approved 5.5 kB / 5.55 kB, where the
budgets are restored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Measured 5.57 kB and 5.62 kB gzipped; perf/core-size-budget restores the
approved 5.5 kB / 5.55 kB.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@pbroom
pbroom force-pushed the feat/core-p3-hint branch from 03a0e16 to ee62764 Compare October 10, 2026 19:39
@pbroom
pbroom merged commit 6c0346d into main Oct 10, 2026
6 of 7 checks passed
@pbroom
pbroom deleted the feat/core-p3-hint branch October 10, 2026 19:40
pbroom added a commit that referenced this pull request Oct 10, 2026
oklab.ts destructured all four OKLab matrices into row constants at
module scope. Bundlers keep top-level destructuring even when nothing
reads it, so any bundle that needed only one direction (contrastRatio
needs OKLab -> linear sRGB; parse needs only the reverse) carried the
other two matrices too. Read the rows inside each kernel instead; the
arithmetic is unchanged, so results are bit-identical.

Gzip, size-limit (on top of #225 in parentheses):
  contrastRatio alone:            1310 -> 1096 B (1466 -> 1243 B)
  parse alone:                    4565 -> 4346 B
  parse + toHex + contrastRatio:  5233 -> 5225 B (5358 -> 5354 B)
  everyday toolkit:               5281 -> 5275 B (5412 -> 5405 B)
  packColors + unpackColors:      2317 -> 2277 B

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pbroom added a commit that referenced this pull request Oct 10, 2026
oklab.ts destructured all four OKLab matrices into row constants at
module scope. Bundlers keep top-level destructuring even when nothing
reads it, so any bundle that needed only one direction (contrastRatio
needs OKLab -> linear sRGB; parse needs only the reverse) carried the
other two matrices too. Read the rows inside each kernel instead; the
arithmetic is unchanged, so results are bit-identical.

Gzip, size-limit (on top of #225 in parentheses):
  contrastRatio alone:            1310 -> 1096 B (1466 -> 1243 B)
  parse alone:                    4565 -> 4346 B
  parse + toHex + contrastRatio:  5233 -> 5225 B (5358 -> 5354 B)
  everyday toolkit:               5281 -> 5275 B (5412 -> 5405 B)
  packColors + unpackColors:      2317 -> 2277 B



Part of the color-kit assessment stack (#204 → #227). Build, test, lint, typecheck, format, size and check:artifacts pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

This branch was successfully deployed

1 active deployment
Preview — ee627646 Deployed Oct 10, 2026 by vercel[bot]
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