ng/feat/landing-page/optimize - #459
ViktorSvertoka merged 4 commits into
Conversation
|
@nazar-gavrylyk is attempting to deploy a commit to the DevLovers Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe homepage now retrieves feature translations on the server, renders the features section within ChangesHomepage rendering
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The homepage optimization is localized to code-splitting and cleanup, and no actionable merge-blocking risk remains; the PR is merge-ready after normal checks. Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 |
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 `@frontend/app/`[locale]/page.tsx:
- Around line 1-10: Replace the next/dynamic boundaries in the page’s
LazyFeaturesHeroSection and LazyFooter declarations with a client-side wrapper
or Suspense/viewport-based boundary that actually defers the Footer client
bundle and rendering as intended; keep server rendering behavior correct for
FeaturesHeroSection. Validate the resulting production RSC behavior and client
bundle output.
🪄 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.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 05fc42f9-b62e-4c3f-9855-a8793f52b8fb
📒 Files selected for processing (4)
frontend/app/[locale]/page.tsxfrontend/components/home/FeaturesHeroSection.tsxfrontend/components/home/InteractiveCTAButton.tsxfrontend/components/home/WelcomeHeroBackground.tsx
💤 Files with no reviewable changes (2)
- frontend/components/home/WelcomeHeroBackground.tsx
- frontend/components/home/InteractiveCTAButton.tsx
|
The Server Component conversion and cleanup changes look good. However, LazyFooter is rendered unconditionally, so according to Next.js behavior it loads immediately in a separate client bundle rather than being deferred until the footer is needed. Suspense also enables streaming but does not make the Features section viewport-lazy. Please either add a viewport/scroll-based rendering boundary or adjust the PR claims and provide before/after bundle measurements. A successful preview/build is also required before approval. |
Addressed the footer point with a real fix, and here is the context on the rest: Footer eagerness (fixed, 5a1c817): LazyFooter was rendered unconditionally, so next/dynamic fetched its chunk on mount regardless of scroll position, same as you flagged. Added an IntersectionObserver sentinel (rootMargin: 300px) so the Footer chunk is now only requested once the user scrolls near it, instead of on initial mount. Features/Suspense claim: You're right that Suspense here doesn't make the section viewport-lazy, it enables SSR streaming for the newly-converted Server Component (removes it from the client bundle). That's an intentional, separate win, not a viewport-deferral claim. Correcting the PR description so it doesn't conflate the two. Bundle measurements: checked LazyFooter.tsx's own size via next experimental-analyze before/after, it actually grew (454 B => 1.14 KB uncompressed) from the observer logic, which is expected and not the relevant metric. The actual change is when the Footer chunk is fetched (on scroll proximity vs. immediately), which shows up as network timing, not module size. Build: npm run build passes locally; pushed so the Netlify deploy preview can confirm too. |
Description
Optimizes the homepage bundle by moving below-the-fold sections out of the critical render path and trimming a couple of unused leftovers found along the way.
Changes
How Has This Been Tested?
Checklist
Before submitting
Reviewers
@ViktorSvertoka
Summary by CodeRabbit
Performance
Refactor