fix(ui): serve Geist and GeistMono from local provider#214
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Nuxt @nuxt/fonts configuration so the Geist and Geist Mono font families are served from the app itself (local provider) rather than an external provider, aiming to remove third-party CDN dependency.
Changes:
- Disabled the
fontshareprovider in the Nuxt fonts configuration. - Switched
GeistandGeist Monofamilies toprovider: "local"and configured their weights.
📝 WalkthroughWalkthroughThe Nuxt configuration is updated to migrate font handling from remote fontshare-based providers to local font definitions for Geist, Geist Mono, and Whitney families. The Content Security Policy is simultaneously tightened to restrict font sources to self and data URIs only. ChangesFont Configuration and Security Updates
Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #214 +/- ##
=======================================
Coverage 66.52% 66.52%
=======================================
Files 103 103
Lines 2306 2306
Branches 472 472
=======================================
Hits 1534 1534
Misses 412 412
Partials 360 360
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@nuxt.config.ts`:
- Around line 374-379: The configured font entry for "Geist Mono" lists weights:
[400, 500, 600, 700] but your public/fonts only contains GeistMono-Regular,
GeistMono-Medium and GeistMono-Bold (no SemiBold), so update the font config for
the "Geist Mono" provider: either add the missing font file
GeistMono-SemiBold.ttf to public/fonts and ensure the weights array keeps 600,
or remove 600 from the weights array (leaving [400, 500, 700]) to avoid
browser-synthesised SemiBold rendering; locate the font block with name "Geist
Mono" in nuxt.config.ts and apply one of these fixes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: 0cd9e5d8-f219-48a7-a675-47c72524e948
⛔ Files ignored due to path filters (11)
public/fonts/Geist-Bold.ttfis excluded by!**/*.ttfpublic/fonts/Geist-Medium.ttfis excluded by!**/*.ttfpublic/fonts/Geist-Regular.ttfis excluded by!**/*.ttfpublic/fonts/Geist-SemiBold.ttfis excluded by!**/*.ttfpublic/fonts/GeistMono-Bold.ttfis excluded by!**/*.ttfpublic/fonts/GeistMono-Medium.ttfis excluded by!**/*.ttfpublic/fonts/GeistMono-Regular.ttfis excluded by!**/*.ttfpublic/fonts/Whitney-Bold.woffis excluded by!**/*.woffpublic/fonts/Whitney-Medium.woffis excluded by!**/*.woffpublic/fonts/Whitney-Regular.woffis excluded by!**/*.woffpublic/fonts/Whitney-SemiBold.woffis excluded by!**/*.woff
📒 Files selected for processing (1)
nuxt.config.ts
This PR will deploy the following changes to production (`wolfstar.rocks`). **Next version: `v0.7.0`** (current: `v0.6.3`) ### Features - feat(tests): auto-generate ephemeral secrets for CI builds (`fd3a0255`) - feat(semantic-pr): update scopes for PR validation (`2fb7ab56`) - feat(test-secrets): add module for auto-generating CI secrets (`3baf470c`) ### Fixes - fix(auth): refresh Discord OAuth tokens before API calls (#218) (`4dd1e5cf`) - fix(ui): serve Geist and GeistMono from local provider (#214) (`b8f27202`) - fix: improve release workflow and fix release-notes output (#211) (`f7ae44fb`) - fix(package): update node engine requirement to >=24 (`b66e0040`) - fix(ci): resolve failing workflow checks (`face5c43`) ### Other Changes - chore: resolve release PR #217 merge conflicts (#219) (`af83b2af`) - chore: migrate design reference from .atlas to .claude (#216) (`cadf476e`) - chore: remove redundant auto-imported type imports (#213) (`be362fbc`) - chore(deps): upgrade knip to v6 and enable treatConfigHintsAsErrors (#212) (`1ba87ecb`) - chore(deps): update test packages (#206) (`1187f76e`) - chore(ci): pin playwright container image to sha256 digest (#202) (`4eef7689`) - chore: replace create-pr-commit skill with full create-pull-request skill (#201) (`6874c781`) - ci: improve release workflows and permissions (`9839e301`) - ci: enable reuse of existing server in CI environment (`ffa2b640`) - ci: fix browser container digest, version comment, and restore NODE_OPTIONS/secrets (`8fae2422`) - ci: remove NODE_OPTIONS from component and build tests (`728c7951`) - chore: rename codecov file to use correct version (`fba616b7`) - ci: update scopes in semantic PR workflow (`2e2fd6fe`) - ci: remove hardcoded secrets from browser tests (`a7ddfdb0`) - chore: rename `continuous-integration` to `ci` workflow (`0ee01169`) - ci: simplify permissions in release PR workflow (`80c69cad`) - ci: fix all zizmor security analysis findings (`5ebc15ee`) - ci: update reporter configuration for CI environments (`2a6166c6`) - ci: harden GitHub Actions workflows (`2d4600ea`) - chore(pnpm): add minimumReleaseAge and clean up config comments (`729fadb3`) - chore: set package version to 0.0.0 (`afd42056`) ### Uncategorized - revert "fix(ci): resolve failing workflow checks" (`a684d62e`) --- > Merging this PR will: > - Deploy to `wolfstar.rocks` via Netlify > - Create a `v0.7.0` tag and GitHub Release
🔗 Linked issue
N/A
🧭 Context
@nuxt/fontswas previously resolving Geist and GeistMono from external providers (Fontshare CDN). This switches both families toprovider: 'local'and bundles the font files directly inpublic/fonts/, eliminating external CDN dependencies for reliability and performance.📚 Description
fontshareprovider in@nuxt/fontsconfigurationprovider: 'local'public/fonts/Geist-{Regular,Medium,SemiBold,Bold}.ttfandpublic/fonts/GeistMono-{Regular,Medium,Bold}.ttfFonts are now served from the app itself rather than fetched from an external CDN, removing a third-party network dependency and making the app functional in offline or network-restricted environments.