Skip to content

fix: prevent framework documentation page from freezing on link hover - #1010

Open
Manishkumarbingi wants to merge 1 commit into
TanStack:mainfrom
Manishkumarbingi:fix/issue-1001
Open

fix: prevent framework documentation page from freezing on link hover#1010
Manishkumarbingi wants to merge 1 commit into
TanStack:mainfrom
Manishkumarbingi:fix/issue-1001

Conversation

@Manishkumarbingi

@Manishkumarbingi Manishkumarbingi commented Jun 27, 2026

Copy link
Copy Markdown

Summary

Root cause: Router's Quick Start doc is canonical and not split per framework, so installPath: 'framework/$framework/quick-start' pointed FrameworkCard's link at a doc that doesn't exist. The docs loader redirected away from it, and that redirect firing on hover/preload is what froze the page.

Fix: point installPath at the canonical quick-start doc instead of disabling preload. Added focused test coverage on the emitted install href per review feedback.

Closes #1001

Summary by CodeRabbit

  • Bug Fixes

    • Updated router installation documentation links to use the canonical quick-start path across supported frameworks.
    • Removed framework-specific path segments from router installation URLs.
  • Tests

    • Added coverage to verify installation documentation paths and associated hashes for each supported framework.

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: b4c8fbed-103b-42e2-a3da-cfe710ad2784

📥 Commits

Reviewing files that changed from the base of the PR and between 7739cfa and c4f8ab5.

📒 Files selected for processing (3)
  • src/libraries/libraries.ts
  • src/libraries/router.tsx
  • tests/router-install-path.test.ts
💤 Files with no reviewable changes (1)
  • src/libraries/router.tsx

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The router install documentation path changes from a framework-specific path to quick-start. The router project removes its explicit path override. Tests verify the path and hash for every supported framework.

Changes

Router install path

Layer / File(s) Summary
Update and validate router install paths
src/libraries/libraries.ts, src/libraries/router.tsx, tests/router-install-path.test.ts
The router uses quick-start without a framework prefix. The project-level path override is removed. Tests verify the path and confirm that no framework-specific path or hash is emitted.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to c4f8a

Router framework documentation links now use the canonical quick-start URL, avoiding the prior framework-prefixed redirect path. Focused coverage verifies the generated links across supported frameworks, with no remaining merge-readiness risk identified.

Suggested reviewers: tannerlinsley, alemtuzlak

🚥 Pre-merge checks | ✅ 4 | ❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary outcome of the changes: preventing the framework documentation page from freezing on link hover. The installPath update directly addresses this issue.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@Manishkumarbingi

Copy link
Copy Markdown
Author

@tannerlinsley Please have a look at this PR , If not required feel free to close this PR.

@tannerlinsley tannerlinsley added the source-audit Tracked by the automated source audit label Sep 8, 2026
@tannerlinsley

Copy link
Copy Markdown
Member

I reproduced the production freeze today, but preload={false} only avoids the redirect during hover. The card currently builds /router/latest/docs/framework/{framework}/quick-start from the Router installPath. The Router library beforeLoad then always redirects every non-example framework guide to /router/latest/docs/quick-start. Opening that canonical path directly is responsive and lands on the same page. Please point the Router installPath at quick-start instead of disabling preloading on both links, add focused coverage for the emitted Router install href, and update the PR to close #1001. This preserves intent preloading and removes the unnecessary client redirect. I also checked #990 and #866 so this direction keeps the earlier quick-start correction while avoiding the redirect path that caused the same class of freeze.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@Manishkumarbingi

Copy link
Copy Markdown
Author

I reproduced the production freeze today, but preload={false} only avoids the redirect during hover. The card currently builds /router/latest/docs/framework/{framework}/quick-start from the Router installPath. The Router library beforeLoad then always redirects every non-example framework guide to /router/latest/docs/quick-start. Opening that canonical path directly is responsive and lands on the same page. Please point the Router installPath at quick-start instead of disabling preloading on both links, add focused coverage for the emitted Router install href, and update the PR to close #1001. This preserves intent preloading and removes the unnecessary client redirect. I also checked #990 and #866 so this direction keeps the earlier quick-start correction while avoiding the redirect path that caused the same class of freeze.

Thanks for reproducing this and finding the actual cause — you're right, the redirect was the real issue. Traced it through FrameworkCard → getFrameworkDocsPath → the base router object in libraries.ts, which had installPath: 'framework/$framework/quick-start'. Confirmed against the router repo's docs that there's no per-framework quick-start.md (only the canonical one), so that path always triggered the loader redirect. Pushed a fix pointing installPath at quick-start, reverted the preload={false} change, and added a focused unit test on the emitted install href for both frameworks. PR description updated to close #1001.

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

Labels

source-audit Tracked by the automated source audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hover on a link in documentation freezes the page

2 participants