Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

fix: optimize landing Lighthouse with static homepage rendering#435

Merged
LucasSantana-Dev merged 2 commits intomainfrom
fix/pagespeed-siza
Mar 11, 2026
Merged

fix: optimize landing Lighthouse with static homepage rendering#435
LucasSantana-Dev merged 2 commits intomainfrom
fix/pagespeed-siza

Conversation

@LucasSantana-Dev
Copy link
Copy Markdown
Member

@LucasSantana-Dev LucasSantana-Dev commented Mar 11, 2026

Summary

  • make homepage static by removing force-dynamic user fetch and using public CTAs (/signin, /signup)
  • stabilize landing hydration by removing window-derived initial state in LandingNav
  • remove Motion wrappers from landing sections and convert non-interactive sections to server-rendered components
  • raise subtle text contrast token and update landing snippet/footer contrast usage
  • add targeted landing CTA tests and update README/CHANGELOG

Validation

  • npm run lint (apps/web)
  • npm run test -- --runInBand src/__tests__/components/landing/MarketingCtas.test.tsx
  • NODE_ENV=production npm run build (apps/web)
  • local Lighthouse (http://localhost:3320): Performance 100, Accessibility 100, Best Practices 100, SEO 100
  • live Lighthouse baseline (https://siza.forgespace.co): Perf 100 / A11y 96 / BP 96 / SEO 100 (deploy required for live improvement)

Summary by CodeRabbit

  • New Features

    • Added comprehensive test coverage for landing page navigation links.
    • Enhanced dashboard preview with expanded component grid and left navigation panel.
  • Bug Fixes & Improvements

    • Improved subtle text color across the UI for better visibility.
  • Refactor

    • Removed animations and motion effects from landing components for simpler, faster rendering.
    • Simplified navigation logic and removed user-dependent routing branches.
    • Converted animated number counters to static values.
  • Tests

    • Added test suite validating landing page CTA and navigation links.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
siza-web Ready Ready Preview, Comment Mar 11, 2026 3:58am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 11, 2026

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

This PR removes dynamic imports and Supabase user retrieval from the landing page, simplifies component signatures by eliminating user-prop dependencies, replaces all animation and motion effects with static rendering, and updates a CSS design token for subtle text color.

Changes

Cohort / File(s) Summary
Test Suite
apps/web/src/__tests__/components/landing/MarketingCtas.test.tsx
New test suite validating landing CTA navigation links: HeroSection signup/docs links and CTASection GitHub/signup links.
Page Configuration
apps/web/src/app/globals.css, apps/web/src/app/page.tsx
Removed dynamic SSR wiring (next/dynamic), user retrieval via Supabase client, and force-dynamic export. Updated subtle text color token from #71717a to #a1a1aa.
Navigation Component
apps/web/src/components/landing/LandingNav.tsx
Removed user prop and conditional Dashboard/Sign-in rendering. Simplified scroll state initialization and added explicit mount-time scroll handler invocation.
Hero & CTA Components
apps/web/src/components/landing/HeroSection.tsx, apps/web/src/components/landing/CTASection.tsx
Removed user prop, static particle rendering (replaced useMemo/useEffect), eliminated all motion/FadeIn wrappers, simplified to static signup links and non-animated markup.
Capability & Ecosystem Components
apps/web/src/components/landing/CapabilitiesSection.tsx, apps/web/src/components/landing/EcosystemSection.tsx
Removed useClient, motion hooks, FadeIn wrappers, and animation effects. Replaced with plain divs. Removed accent styling properties.
Code Display & Stats Components
apps/web/src/components/landing/CodeShowcase.tsx, apps/web/src/components/landing/StatsBar.tsx
Removed FadeIn wrappers and motion components. Replaced count-up animation in StatsBar with direct string values; updated comment color from #71717a to #a1a1aa.
Dashboard Preview Component
apps/web/src/components/landing/DashboardPreview.tsx
Removed FadeIn wrapper, expanded preview UI with left navigation panel, centered header URL, and enriched three-column responsive grid with additional component blocks and visual variations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main objective: optimizing Lighthouse performance by converting the homepage to static rendering, which is reflected in the removal of force-dynamic exports, user fetches, and motion animations throughout the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/pagespeed-siza

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 OpenGrep (1.16.3)
apps/web/src/__tests__/components/landing/MarketingCtas.test.tsx

┌──────────────┐
│ Opengrep CLI │
└──────────────┘

�[32m✔�[39m �[1mOpengrep OSS�[0m
�[32m✔�[39m Basic security coverage for first-party code vulnerabilities.

�[1m Loading rules from local config...�[0m

apps/web/src/app/page.tsx

┌──────────────┐
│ Opengrep CLI │
└──────────────┘

�[32m✔�[39m �[1mOpengrep OSS�[0m
�[32m✔�[39m Basic security coverage for first-party code vulnerabilities.

�[1m Loading rules from local config...�[0m

apps/web/src/components/landing/CTASection.tsx

┌──────────────┐
│ Opengrep CLI │
└──────────────┘

�[32m✔�[39m �[1mOpengrep OSS�[0m
�[32m✔�[39m Basic security coverage for first-party code vulnerabilities.

�[1m Loading rules from local config...�[0m

  • 7 others

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 11, 2026

Project Scorecard


Scorecard: 84/100 (B)
────────────────────────────────────────
  security: 100/100 (A)
  quality: 80/100 (B) — 1 violations
  performance: 67/100 (D) — 1 violations
  compliance: 75/100 (C) — 1 violations
  dependency: 100/100 (A)

Recommendations:
  - Increase test coverage to meet the 80% threshold
  - Extend log retention to at least 90 days for compliance

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant