fix(apollo-vertex): repair two registry values that generate dead CSS - #1167
kittyyueli wants to merge 2 commits into
Conversation
`--info-fg`, `--success-fg` and `--destructive-fg` were the only 3 of 120 keys in cssVars.light written with the `--` prefix; the other 117, and all of dark, are bare. shadcn adds the prefix itself, so the @theme inline block generated for a consumer came out as: --color-destructive-fg: var(----destructive-fg); Four hyphens, referencing a property that does not exist, so any `text-destructive-fg` / `bg-success-fg` utility resolves to nothing. Found while refreshing a downstream consumer, where it lands in their index.css. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnmiT3edq81s2qTDqoE8zP
|
Apollo Coded App preview deployments are ready.
|
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
🔵 Needs a closer look
The claimed *-fg utilities remain unavailable until the theme mappings or claims are updated.
Pull request overview
Fixes three malformed light-theme CSS variable keys in apps/apollo-vertex/registry.json.
Changes:
- Removes stray
--prefixes frominfo-fg,success-fg, anddestructive-fg. - Preserves values and limits changes to
registry.json.
File summaries
| File | Summary | Finding |
|---|---|---|
apps/apollo-vertex/registry.json |
Corrects three light-theme variable keys. | Moderate: cssVars.theme does not register the claimed *-fg utilities; add mappings or update the claims. |
Review details
Suppressed comments (1)
apps/apollo-vertex/registry.json:191
- This only fixes the generated custom-property declarations; it does not make the claimed
text-*-fg/bg-*-fg/border-*-fgutilities available.generate-theme-css.tsemits@theme inlinefromcssVars.theme, and that map currently registerscolor-*-foreground, not anycolor-*-fgentries, so Tailwind has no*-fgutilities to resolve. Add matchingcolor-info-fg,color-success-fg, andcolor-destructive-fgmappings (and dark-mode values if these tokens are intended to work in dark mode), or update the PR's claimed utility names.
"info-fg": "oklch(0.49 0.12 210)",
"success-fg": "oklch(0.46 0.10 152)",
"destructive-fg": "oklch(0.50 0.14 18)",
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Nothing to port — the fix is an app/repo setting, not a code change. Not re-running, since a permission error reproduces deterministically. Generated by Claude Code |
📊 Coverage + size by packagePer-package bundle size on this PR (no JS/TS source changes detected under
"Coverage" is each package's own |
Storybook visual diff✅ No stories are affected by this PR's changes; nothing to compare. Logs Updated (PT): Sep 14, 2026, 01:25:14 PM |
@fontsource-variable/inter registers the face as 'Inter Variable' in every one of its stylesheets, but the font item declared family "Inter". On a non-Next project the shadcn CLI writes font.family verbatim as the @theme value for --font-sans, so the bundled face never matched and the utility fell through to the system sans stack with the woff2 files shipped but unused. Lead the stack with the registered name and keep Inter plus the generic fallbacks behind it, and align the :root/.dark cssVars with it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnmiT3edq81s2qTDqoE8zP
There was a problem hiding this comment.
🟡 Changes recommended
Revert or justify unrelated font changes and address the missing utility mappings or narrow the PR scope.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Lite
Summary
Two independent defects in
apps/apollo-vertex/registry.json, both of which make generated CSS silently resolve to nothing.1. Three theme var keys carry a stray
--prefixThey are the only 3 of 120 keys in
cssVars.lightthat do. The other 117 are bare, and all 105 indarkare bare. This breaks both consumers of the file.Our own generator.
scripts/generate-theme-css.tsprepends--unconditionally inrenderBlock, and runs it overcssVars.lightto build:root. So the prefixed keys emit a four-hyphen declaration — the custom properties do not exist under their intended names even inside apollo-vertex:A shadcn consumer. The CLI's
update-themeplugin (tiinshadcn@4.4.0) synthesizes the@theme inlinealiases from the union of all three blocks.propstrips a leading--, the value does not:which produces, in a downstream consumer's
index.csstoday:Four hyphens, pointing at a property that does not exist. Any
text-destructive-fg,bg-success-fgorborder-info-fgresolves to nothing. After this PR both halves agree.2. The Inter font item names a family the dependency does not register
@fontsource-variable/inter@5.3.0registers the face as'Inter Variable'. That is the only family name in the package: every one ofindex.css,standard.css,wght.css,opsz.cssand their italic variants declaresfont-family: 'Inter Variable'.On a non-Next project the shadcn CLI writes
font.familyverbatim as the@themevalue forvariable(et()inshadcn@4.4.0):So a Vite consumer gets
@theme { --font-sans: Inter }next to an@importof a package that only providesInter Variable. The face never matches,font-sansfalls through to the system sans stack, and the woff2 files ship unused.This PR leads the stack with the registered name and keeps
Interplus the generic fallbacks behind it:A consumer that never installs the font item resolves exactly as it does today — past the missing
Inter Variable, on to whatever it was already using. A consumer that does install it now gets the face it already downloaded. The:root/.darkcssVars.font-sansentries are aligned with it, since the CLI's@themevalue overrides them and the two disagreeing is what made this hard to spot.providerandimportare untouched: both are read only on the Next path, which writesvar(--font-sans)and never looks atfamily. This change cannot affect a Next consumer.How it surfaced
A downstream consumer refreshed its vendored components, and both landed in its
index.cssin the same diff. Neither broke anything visibly. It has no usages of the three*-fgutilities yet, and it was already falling back to system sans before the font item existed. That is exactly why they are worth fixing now rather than when someone writestext-destructive-fgand finds it does nothing.Out of scope, worth a follow-up
cssVars.darkcarries no*-fgvalues at all, so under.darkthose three inherit the light foreground. Real gap, but choosing dark-mode oklch values for three semantic foregrounds is a design call rather than a mechanical one, so it is not in this PR.Testing
registry.jsonparsesbiome check apps/apollo-vertex/registry.json--prefix incssVars.lightafter the change--prefix incssVars.darkgenerate-theme-css.tsrenderBlockoutput, both revisions@fontsource-variable/inter@5.3.0, every.cssfileshadcn@4.4.0dist/index.js, functionsetandtiregistry.jsonI could not run
pnpm build/registry:buildin this session, so the regenerated CSS is for CI to confirm.Apollo Vertex Registry Checkinstalls the theme into a fresh app, which is the path both fixes affect.Note on CI
enable-auto-mergeis red for a repo-wide reason unrelated to this diff. See the comment below.🤖 Generated with Claude Code
https://claude.ai/code/session_01SnmiT3edq81s2qTDqoE8zP