🧷 test: Count Derived Scrim Tokens as Theme-Owned - #16512
Merged
Merged
Conversation
The stylesheet-ownership check added in #16480 required every declared color token to be a theme key of its own, so the scrim tokens from #16492, which compose the surface-overlay role with a scrim opacity role, failed it once both landed on canary. A token is now owned when a variable its value reads is one a theme can set.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
|
Lighthouse CI failed. The last 80 log lines contain the measured budgets and assertion failures. |
8 tasks done
jeannotdamoiseaux
pushed a commit
to jeannotdamoiseaux/LibreChat
that referenced
this pull request
Oct 1, 2026
The stylesheet-ownership check added in LibreChat-AI#16480 required every declared color token to be a theme key of its own, so the scrim tokens from LibreChat-AI#16492, which compose the surface-overlay role with a scrim opacity role, failed it once both landed on canary. A token is now owned when a variable its value reads is one a theme can set. (cherry picked from commit 75bb189) Original-PR: LibreChat-AI#16512
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.
Pull Request
Summary
Canary's
Tests: @librechat/clientlane failstokens.spec.ts > lets a theme set every color token the stylesheet declares. #16480 added that check, requiring every--color-*token intokens.cssto be a theme key of its own; #16492, which landed just before it, addedscrim,scrim-alertandscrim-modal, which compose thesurface-overlayrole with a scrim opacity role and so are not keys themselves. Each pull request was green on its own base; together they leave canary red, and every PR based on canary inherits the failure (#16483, #16484).The check now reads the custom properties each token's value references, and counts a token as theme-owned when one of them is a property a theme can set. The scrims pass through
surface-overlay; a token that reads only an unregistered property, directly or through a derived value, still fails.Test-only change; no runtime behavior changes.
Type of change
Testing
Tested environments/configuration:
Automated tests:
packages/client:npx jest src/theme/tokens.spec.tsfails on canary (unownedscrim,scrim-alert,scrim-modal) and passes with this change.--color-bogus: rgb(var(--bogus))and--color-bogus-scrim: rgb(var(--bogus) / var(--theme-scrim-opacity, 0.8))totokens.cssmakes the check report both.packages/clientsuite withnpx jest, pluseslint,prettier --checkandsort-imports --checkon the spec.Screenshots / recordings
No user-facing change.
Risk / compatibility
None.
Checklist