Cache blog metadata and posts, simplify motion components, improve scroll handling and font usage#3
Draft
jakemcquade wants to merge 1 commit intomainfrom
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
|
Overall Grade Focus Area: Reliability |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | Mar 4, 2026 7:02p.m. | Review ↗ |
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.
Motivation
motion/reactAPI.Description
metadataCacheandpostCacheinsrc/lib/blog.tsand added a singletonhighlighterPromisesogetPostcaches compiled posts and reuses the Shiki engine, whilegetBlogPostsnow returns synchronous metadata entries viagetPostMetadata.awaitcalls (src/app/blog/page.tsxandsrc/app/blog/[slug]/page.tsx) and makingBloganasynccomponent where appropriate.BackUp(src/components/backup.tsx) to useaddEventListener/removeEventListenerforscrollwith a passive listener and a safe early return if the button node is missing, including cleanup on unmount.AnimatePresenceand adaptedBlurFadeTextandBlurFadeto usemotiondirectly, addeduseMemofordefaultVariantsinBlurFadeto avoid recreating variant objects, and removed unused imports.Interfontvariableclass in the body and switching the rootfont-familyinsrc/styles/globals.cssto referencevar(--font-sans)with fallbacks.vite.config.tsto disable sourcemaps in build and ensurersc()is included in the plugin list (formatting tidy-up).Testing
tsc --noEmitand it completed successfully.vite buildto validate the Vite configuration and bundling, which succeeded.Codex Task