Repository navigation
feat(theme): refresh the canonical tokens from the hosts and pin what they send - #5
Merged
Merged
Conversation
… they send Both hosts now run on raven: crowdin.com for a while, Enterprise since the redesign v2 merge. The registry still carried a hand-copied snapshot of the old blue-tinted palette (navy foregrounds, green dark primary), and the bridge read --crowdin-primary-btn-color, a frontend-only alias that the Enterprise redesign dropped - primary-foreground would have fallen back to white on a #f4f4f4 dark primary. - app-theme reads --crowdin-primary-foreground (raven's own name, sent by both hosts) for primary-foreground and sidebar-primary-foreground. - theme literals and the bridge fallbacks are exactly what crowdin.com sends for each token's host variable: the neutral #262626 / #f4f4f4 scale, level-2/level-3/level-0 surfaces, alpha-based text colors. - tests/hosts/*.json pin the variables each host sends to app iframes, captured with `pnpm capture-host <name> <css-variables.js>` (trimmed to what the bridge reads plus their var() chains). Tests require every bridged variable on every captured host and the theme literals to equal crowdin.com's values, so a renamed or dropped host variable fails here instead of in production. - the showcase "Simulate host" palettes are generated from the same fixtures (site/scripts/gen-host-sim.mjs); the hand-written host-sim.css with the pre-raven palette is gone. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…data The registry is public and must not reference the private product repos. tests/hosts/*.json now describe their source as the host's window.cssVariables (what AP.getCssVariables delivers to app iframes) and the README says to refresh them from the browser console on the host. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The dark host simulation currently retains light-only fixture variables because both generated selectors match in dark mode.
1 open finding
What changed in this PR
Refreshes canonical theme tokens from current Crowdin host palettes and keeps the showcase synchronized with captured host fixtures.
Changes:
- Updates theme values and host-variable mappings.
- Adds host fixtures, validation tests, and generated simulation CSS.
- Updates showcase build scripts, documentation, and ignore rules.
| File | Description |
|---|---|
tests/hosts/enterprise.json |
Adds Enterprise palette fixture. |
tests/hosts/crowdin-com.json |
Adds crowdin.com palette fixture. |
site/src/index.css |
Imports generated host simulation CSS. |
site/src/host-sim.css |
Removes handwritten simulation palette. |
site/src/app.tsx |
Aligns the crowdin.com host identifier. |
site/scripts/gen-theme.test.mjs |
Derives assertions from bridge configuration. |
site/scripts/gen-host-sim.test.mjs |
Tests host simulation generation. |
site/scripts/gen-host-sim.mjs |
Generates simulation CSS from fixtures. |
site/package.json |
Generates simulation CSS before builds and development. |
scripts/registry.test.mjs |
Validates host variables and canonical values. |
registry.json |
Refreshes tokens and bridge fallbacks. |
README.md |
Documents host fixture maintenance. |
.gitignore |
Ignores JetBrains settings. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The light block matched <html class="dark"> too, so dark mode got the union of both fixtures: light-only variables such as --crowdin-gray-012 stayed active with their light values. Nothing bridged reads them today, but the simulation should be exactly the host's dark map. The light selector now excludes .dark. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
andrii-bodnar
approved these changes
Oct 14, 2026
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
Both Crowdin hosts now run on raven (crowdin.com for a while, Enterprise since the redesign v2 merge). The registry still carried a hand-copied snapshot of the pre-raven palette, and the
app-themebridge read a host variable that Enterprise v2 no longer sends.--crowdin-primary-foreground(raven's own name, sent by both hosts) forprimary-foregroundandsidebar-primary-foreground. The old--crowdin-primary-btn-colorwas a crowdin.com-only alias; on Enterprise v2 the bridge would have fallen back to white text on the#f4f4f4dark primary.themeliterals and bridge fallbacks are now exactly what crowdin.com sends for each token's host variable: the neutral#262626/#f4f4f4scale, level-2/3/0 surfaces, alpha-based text colors. No more oklch snapshot of the blue-tinted gray and green dark primary.tests/hosts/*.jsonpin the variables each host sends to app iframes, captured withpnpm capture-host <name> <css-variables.js>(trimmed to what the bridge reads plus theirvar()chains). New tests require every bridged variable on every captured host and the theme literals to equal crowdin.com's values, so a renamed or dropped host variable fails in CI instead of in production.site/scripts/gen-host-sim.mjs); the hand-writtenhost-sim.csswith the pre-raven palette is gone..idea/is ignored.Deployment note
The registry is not a runtime dependency: apps bake the bridge in at
shadcn addtime. Apps that installed the previousapp-themekeep reading--crowdin-primary-btn-coloruntil they re-add it, so they should be updated before or alongside the Enterprise v2 rollout.Test plan
pnpm test(21 tests)pnpm validatepnpm buildpnpm smoke(60 items installed into the fixture app, typechecked, CSS compiled)pnpm site:build🤖 Generated with Claude Code