Skip to content

Fix docs title during loader failures - #1223

Merged
LadyBluenotes merged 1 commit into
mainfrom
agent/fix-docs-error-title
Sep 6, 2026
Merged

Fix docs title during loader failures#1223
LadyBluenotes merged 1 commit into
mainfrom
agent/fix-docs-error-title

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Sep 5, 2026

Copy link
Copy Markdown
Member

What

  • Keep the generic docs page title meaningful when its loader data is unavailable.
  • Use the same library-level fallback already used by framework docs routes.

Evidence

Issue #1219 shows undefined | TanStack Router Docs while a connectivity failure triggers the route error UI. The generic docs route interpolates the optional loader title into a template string, which converts a missing value into the literal word undefined.

Impact

Connectivity and other transient loader failures now keep a useful title such as TanStack Router Docs. Successful document loads keep their existing title.

Validation

  • pnpm test passed twice, including the commit hook: TypeScript and type-aware lint are clean, 479 tests total, 478 passed, and 1 environment-gated docs smoke test skipped.
  • git diff --check passed.

Risk

Very low. This changes one metadata fallback and does not affect successful loader output.

Closes #1219

Summary by CodeRabbit

  • Bug Fixes
    • Improved documentation page titles by removing the “undefined” prefix when a page title is unavailable.

@tannerlinsley tannerlinsley added the source-audit Tracked by the automated source audit label Sep 5, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 5, 2026

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 6fe99d7 Commit Preview URL

Branch Preview URL
Sep 05 2026, 03:08 PM

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: f4cb4dd1-f5ad-4d35-b6dc-75ea7973ce2d

📥 Commits

Reviewing files that changed from the base of the PR and between b40f488 and 6fe99d7.

📒 Files selected for processing (1)
  • src/routes/_library/$libraryId/$version.docs.$.tsx

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


📝 Walkthrough

Walkthrough

The docs route now avoids rendering undefined in the SEO title. It uses the page title when available and falls back to the library’s Docs title when absent.

Changes

SEO title fallback

Layer / File(s) Summary
Conditional title rendering
src/routes/_library/$libraryId/$version.docs.$.tsx
The SEO title now renders {title} | {library.name} Docs when a title exists. Otherwise, it renders {library.name} Docs.

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

Merge Risk: ⚪ Minimal · up to 6fe99

Documentation pages now show a meaningful library Docs title during loader failures while retaining existing titles for successful loads. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: fixing the documentation title when loader data is unavailable.
Linked Issues check ✅ Passed The conditional title fallback addresses issue #1219 by preventing an undefined value during loader failures while preserving titles for successful document loads.
Out of Scope Changes check ✅ Passed The change is limited to the documentation route title fallback and is directly related to issue #1219. No unrelated changes are reported.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/fix-docs-error-title

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.

@LadyBluenotes
LadyBluenotes merged commit 390b14b into main Sep 6, 2026
7 checks passed
@LadyBluenotes
LadyBluenotes deleted the agent/fix-docs-error-title branch September 6, 2026 18:50
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.

Bug Report: Undefined Page Title During Connectivity Loss

2 participants