Repository navigation
fix(navigation): avoid redundant route requests - #11
Conversation
Reviewer's GuideReduces redundant route and data requests by delaying default Next.js link prefetching until hover or focus, preventing repeated SWR revalidation for stable reference data, and configuring route stale times; the home route is also consolidated into the blog route group with explicit metadata. Sequence diagram for intent-based navigation prefetchingsequenceDiagram
participant User
participant P3RLink
participant NextRouter
participant Route
User->>P3RLink: onMouseEnter()
P3RLink->>P3RLink: setPrefetchOnIntent(true)
P3RLink->>NextRouter: prefetch(route)
NextRouter->>Route: request RSC
User->>P3RLink: onClick()
P3RLink->>NextRouter: navigate(route)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the caching policy or reference-data behavior is wrong, users can see stale routes, categories, or sitemap data because client route caches and SWR caches outlive the deployment change. Reverting restores the previous behavior, but it does not immediately evict already-populated caches; they must expire, be reloaded, or be cleared.
修复预请求触发大量路由RSC导致的页面跳转卡顿
Summary by Sourcery
Reduce redundant navigation requests and defer route prefetching until user intent to improve page-transition responsiveness.
Bug Fixes:
Enhancements: