Repository navigation
Use a transparent animated palm on the homepage - #1514
Merged
Merged
Conversation
|
|
Caution Review failedThe pull request is closed.
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. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tanstack-com | 08cf2ca | Commit Preview URL Branch Preview URL |
Nov 22 2026, 04:34 AM |
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.
Problem
On main, the homepage scales a 944 × 416 MP4 to fill the hero. The fronds look soft at larger display sizes, and most of the video frame is sky.
Trade-offs
A CSS gradient fills the sky behind the palm. The animated WebP stores the palm and a narrow area of sky on a transparent 585 × 783 canvas. The MP4 on main is 1.57 MB. The animated WebP is 1.85 MB and its still is 22.5 KB. Together the two WebPs are 1.88 MB. On main, Chrome also fetches a responsive poster and its JPEG fallback.
In both tested viewports, the PR renders the palm image element at 450 CSS px wide before clipping. All 121 source frames play in their original forward order at 24 fps. The 41–42 ms frame delays make a 5.04-second loop. Lossy compression softens some fine leaf edges at high magnification.
The page displays the still WebP first. With motion enabled, Chrome requests the animation in parallel and paints it over the still as frames arrive. The still is pixel-identical to the first decoded animation frame. The in-page play/pause button has been removed. With the system’s reduced-motion preference enabled before loading, Chrome requests only the still for the palm. Changing the preference updates the artwork on the open page. If the animation request fails, the still remains visible.
Loading priorities
<picture>element selects the animated WebP. The route loader awaits recent blog posts. The npm and GitHub stats queries have been removed from that loader.0pxroot margin, so stats can hydrate on the first screen. On main, the prompt builder uses a180px 0pxroot margin and explicitly prefetches at idle. This PR removes that idle prefetch. The content inside each feature panel uses a200pxroot margin. The existing partners/blog and community sections keep their25%margins. The server HTML includes the recent blog post links.The headline starts at the same position on main and PR, at (24, 98) for 390 × 844 and (76, 511) for 1512 × 806 (CSS pixels).
Main vs. PR
The November 22, 2026 measurements compare two pinned Cloudflare deployments. AS-IS is the MP4 homepage from
mainat7800cbda. TO-BE is the WebP homepage from this PR at08cf2ca8. AS-IS deployment · TO-BE deploymentCache-disabled reload recordings
Main is on the left and the PR is on the right. Each 15-second MP4 pairs the first measured run of each version for that device. The clocks align at the reload command.
Mobile · 390 × 844
Download mobile MP4
Desktop · 1512 × 806
Download desktop MP4
Measurements
Both versions ran on the same host in headless Chrome 158.0.8127.36. Mobile used touch emulation (390 × 844, DPR 3) and desktop used 1512 × 806 (DPR 2). Each trial opened the live URL once in a fresh browser context with the HTTP cache disabled and service workers blocked. We then applied 5 Mbps in each direction and 40 ms of added latency and reloaded at the top of the page. Motion was enabled, autoplay was allowed and we applied no CPU throttling.
Each column is the median of four cache-disabled reloads, for 16 reloads in total. The order of main and PR alternated by round for each device. Timings start at navigation and include the live HTML response. These are repeat-load lab measurements with an already-opened origin. These timings cover the whole homepage, including the route loader and media changes. The measured main build also includes newer mobile navbar and stats layout changes.
We recorded Chrome’s FCP and latest LCP entry during each observation window (about 15 seconds after reload). For the visual timings, we compared the palm crown in screen captures from FCP onward with main’s posters and the 121 source video frames. First movement is the first forward frame change confirmed by the next one. This excludes the poster swap on main. These timings are estimates limited by screen capture cadence. The five-second count measures identifiable frame changes in the capture. Transfer totals include completed palm media responses and their response overhead.
In all four runs per device, Chrome reported the responsive poster as LCP on main (1600w on mobile and 2400w on desktop) and the 22.5 KB still as LCP on the PR. The first visible movement occurred before the animation finished downloading in 8 of 8 PR reloads. The median gap between the first visible palm and first visible movement was 67 ms on mobile and 67 ms on desktop. Total palm transfer fell by 1.6% on mobile and 4.6% on desktop.
First visible leaf movement and LCP in each round
Values are seconds from reload, written as first movement / LCP.
pnpm testandpnpm buildpassed. Checks for this revision · Latest branch preview