Skip to content

Keep homepage layout stable during hydration - #1545

Merged
manudeli merged 1 commit into
mainfrom
manudeli/fix-homepage-scroll-jump
Nov 22, 2026
Merged

manudeli merged 1 commit into
mainfrom
manudeli/fix-homepage-scroll-jump

Conversation

@manudeli

@manudeli manudeli commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

Hydrate the homepage stats, prompt, principles, and partner and release sections with the route so their layout stays in the document. The maintainer globe loads from a separate chunk. Its placeholder reserves room for the globe and its help text.

Scroll verification

Reloaded and scrolled immediately in the browser. The fix was checked twice at each viewport on the Cloudflare preview.

Viewport Production PR preview
Desktop (1280 × 720) The document shrank from 8,220 px to 3,519 px. A downward wheel step then jumped from 2,160 px to 6,575 px as the sections returned. Document height held at 8,191 px. Downward input advanced the viewport in 720 px steps.
Mobile width (390 × 844) The document shrank from 10,756 px to 4,157 px. The viewport moved backward from 5,064 px to 3,313 px during downward scrolling. Document height held throughout each run. The viewport continued downward through the affected region.

The prompt CTA scrolled to the form and focused the textarea. The globe, Partners and Blog sections loaded in the preview.

  • Production build, TypeScript, lint, formatting, and six focused unit tests passed locally. The full local test command stopped when the sandbox blocked the TSX IPC socket.
  • Router regression checks passed for hydration, forward and Back navigation, and hash links.
  • The homepage's initial assets increase by 27.17 KiB gzip (+4.78%) in the bundle report.

Cloudflare preview

@changeset-bot

changeset-bot Bot commented Nov 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b554a65

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

Homepage sections now render directly instead of using visibility-gated hydration. Shared fallback components were removed, and the community map fallback spacing changed. The prompt handler now focuses and selects the textarea without scrolling.

Changes: Homepage rendering

Layer / File(s) Summary
Direct rendering for starter and social proof
src/components/home/HomeApplicationStarter.tsx, src/components/home/HomeSocialProofSection.tsx, src/components/home/HomeSectionFallbacks.tsx
The application starter and social-proof content render directly instead of using visibility-gated hydration. The shared home-section fallback components were removed.
Community section rendering
src/components/home/HomeCommunitySection.tsx
The community section renders directly. Its map fallback now uses 1rem + 1lh bottom padding and small, relaxed-leading text.
Route sections and prompt focus
src/routes/index.tsx
Stats and principle proofs render directly. The prompt handler focuses the textarea with preventScroll: true and selects it when present.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Possibly related PRs

  • TanStack/tanstack.com#1532: Changes how homepage stats appear in server-rendered HTML and continue updating after hydration.
  • TanStack/tanstack.com#1524: Changes the homepage globe and mobile hint dimensions, which relate to the community map fallback spacing.

Suggested reviewers: tannerlinsley, abeuty, sukvvon

Pre-merge checks: Passed 2

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Keep homepage layout stable during hydration" matches the main change. The objectives state the goal is to keep homepage sections in the document during hydration and avoid a layout collaps…
Full details: Title check

Explanation

The title "Keep homepage layout stable during hydration" matches the main change. The objectives state the goal is to keep homepage sections in the document during hydration and avoid a layout collapse. The raw summary shows the change removes the visibility-gated Hydrate wrappers and fallback placeholders, which the title does not name directly but which serve that goal. The title is specific and concise, and a teammate scanning history would understand the primary change.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions

Copy link
Copy Markdown
Asset Main PR merge build Change
JavaScript 19636.49 KiB 19628.54 KiB 🟢 -7.95 KiB (-0.04%)
JavaScript (gzip) 6457.58 KiB 6454.37 KiB 🟢 -3.21 KiB (-0.05%)
CSS 795.21 KiB 793.60 KiB 🟢 -1.62 KiB (-0.20%)
CSS (gzip) 121.46 KiB 121.33 KiB 🟢 -0.13 KiB (-0.10%)
Page Main (gzip) PR merge build (gzip) Change
/ 568.69 KiB 595.86 KiB 🔴 +27.17 KiB (+4.78%)
/libraries 538.57 KiB 538.53 KiB 🟢 -0.04 KiB (-0.01%)
/start/latest 563.36 KiB 563.34 KiB 🟢 -0.03 KiB (-0.00%)
/router/latest 563.66 KiB 563.63 KiB 🟢 -0.03 KiB (-0.00%)
/query/latest 562.11 KiB 562.08 KiB 🟢 -0.04 KiB (-0.01%)
/table/latest 594.92 KiB 594.89 KiB 🟢 -0.03 KiB (-0.01%)
/charts/latest 644.22 KiB 644.19 KiB 🟢 -0.03 KiB (-0.00%)
/ai/latest 589.03 KiB 589.02 KiB 🟢 -0.02 KiB (-0.00%)
Docs article 549.62 KiB 549.59 KiB 🟢 -0.03 KiB (-0.00%)
Framework docs article 549.63 KiB 549.60 KiB 🟢 -0.03 KiB (-0.00%)
/blog 542.78 KiB 542.75 KiB 🟢 -0.03 KiB (-0.01%)
/maintainers 541.87 KiB 541.82 KiB 🟢 -0.04 KiB (-0.01%)
/showcase 539.83 KiB 539.79 KiB 🟢 -0.04 KiB (-0.01%)
/chat 538.65 KiB 538.61 KiB 🟢 -0.04 KiB (-0.01%)
/chat/c/:conversationId 538.78 KiB 538.74 KiB 🟢 -0.04 KiB (-0.01%)

Page sizes sum the JS and CSS in the TanStack Start manifest for each route and its layouts. Shared files count once per page.

Compared with main at 299f3de. Gzip sizes are summed per file. Build run

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com b554a65 Commit Preview URL

Branch Preview URL
Nov 22 2026, 04:00 PM

@manudeli
manudeli merged commit c304623 into main Nov 22, 2026
10 of 11 checks passed
@manudeli
manudeli deleted the manudeli/fix-homepage-scroll-jump branch November 22, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants