perf(home): reach mobile Lighthouse 100#623
Open
MehmetST3 wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR focuses on improving homepage performance and accessibility by deferring non-critical resources, optimizing media loading, and refining interactive UI elements.
Changes:
- Deferred loading of below-the-fold homepage sections and tracking pixel initialization.
- Introduced critical CSS inlining + deferred asset loading via a custom Docusaurus post-build plugin.
- Improved accessibility/UX across navbar dropdowns, cookie consent modal, footer links, and media elements.
Reviewed changes
Copilot reviewed 20 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/theme/NavbarItem/DropdownNavbarItem/index.tsx | Adjusts dropdown trigger focus behavior when no navigation target exists. |
| src/pages/index.tsx | Defers tracking pixel loading until after window load/idle time in production. |
| src/css/custom.css | Self-hosted font faces, layout utilities for hero/deferred sections, and image format updates. |
| src/constants/index.tsx | Switches static asset imports to string URLs; minor copy edits. |
| src/components/shared/GlobalLayout.tsx | Delays cookie consent modal opening and adds cleanup. |
| src/components/shared/Footer.tsx | Adds accessible labels to icon-only social links. |
| src/components/shared/CookieConsentModal/styles.module.css | Improves mobile layout + close button styling for cookie modal. |
| src/components/shared/CookieConsentModal/CookieConsentModal.tsx | Replaces clickable spans with buttons; improves close control semantics. |
| src/components/home/index.tsx | Converts several sections to lazily loaded modules. |
| src/components/home/TrustedByMarquee.tsx | Adds lazy loading/async decoding to partner logos. |
| src/components/home/LazyHomeSection.tsx | New IntersectionObserver-based lazy section loader with layout reservation. |
| src/components/home/IntroductionVideo/style.css | Adds accessible “facade” styles for external video link. |
| src/components/home/IntroductionVideo/index.tsx | Replaces embedded iframe with an external Vimeo link facade. |
| src/components/home/ConfigurationCode.tsx | Extracts configuration code UI into a separate component for lazy loading. |
| src/components/home/Configuration.tsx | Defers code sample rendering; updates docs link styling. |
| src/components/home/ChooseTailcall.tsx | Adds lazy loading/async decoding to images. |
| src/components/home/BenefitsCard.tsx | Adds aria-label and lazy loading to card imagery. |
| src/components/home/Banner.tsx | Optimizes hero image delivery via <picture> and fetch priority. |
| plugins/homepage-performance-plugin.ts | New postBuild optimizer that inlines critical CSS and defers core JS/CSS. |
| docusaurus.config.ts | Preloads self-hosted font and defers chatbot script loading; registers plugin. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Author
|
Addressed all automated review feedback in 22e4918:
Verified again with npm run build after the follow-up commit. |
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.
/claim #217
Summary
This PR targets issue #217: make the homepage
/reach Lighthouse mobile Performance 100. PWA was ignored as requested in the issue.What changed:
/.Lighthouse evidence
Final validation was run against the production build served locally:
Three repeated mobile Lighthouse runs after the final Vimeo/link fix:
Screenshot from the Lighthouse final-screenshot artifact:
Vimeo behavior
While validating the previous inline-video path, I checked the Vimeo player endpoint with production-style headers. It returned
HTTP 401even withOrigin: https://tailcall.runandReferer: https://tailcall.run/.Because the inline
player.vimeo.comURL can return 401 even with production origin/referrer headers, this PR does not keep an inline Vimeo iframe path. The intro video CTA now opens the public Vimeo page in a new tab:That keeps the CTA working and avoids adding the iframe/player cost to the critical homepage path.
Typecheck note
npm run typecheckcurrently fails on clean upstreamdevelopbefore this PR's changes. I verified it in a separate clean worktree fromorigin/develop.Clean
origin/developfailures include:The feature branch shows the same pre-existing typecheck class of failures. I am not marking typecheck as passed.
Verification
npm run build: passedgit diff --check: passed, with Windows LF -> CRLF warnings only/: 100/100 in 3 repeated runsplayer.vimeo.compath; opens public Vimeo URL instead