Skip to content

Conversation

@LadyBluenotes
Copy link
Contributor

@LadyBluenotes LadyBluenotes commented Oct 14, 2025

Summary by CodeRabbit

  • Documentation
    • Added an “Installation” page for TanStack Router to the docs navigation for easier onboarding.
    • Introduced a “Decisions on DX” article under Setup & Architecture to clarify design choices.
    • Removed two migration guides (from React Router and from React Location) from Setup & Architecture to streamline the section.
    • Updated navigation to reflect these changes, improving discoverability and reducing clutter.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 14, 2025

Walkthrough

Updated docs-generation script entries for React Router: added a new “installation” entry, included a “decisions-on-dx” doc under setup-and-architecture, and removed two migration-related docs from that group.

Changes

Cohort / File(s) Summary of Changes
React Router docs nav updates
scripts/llms-generate.mjs
- Added installation entry pointing to installation docs with name "installation" and description "TanStack Router: Installation"
- Added ${DOCS_DIR}/router/framework/react/decisions-on-dx.md to setup-and-architecture
- Removed ${DOCS_DIR}/router/framework/react/how-to/migrate-from-react-router.md and ${DOCS_DIR}/router/framework/react/installation/migrate-from-react-location.md

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

documentation

Poem

I thump my paws, revise the map,
Install here, migrate—mind the gap!
DX decisions join the queue,
Old paths hop out, the routes are new.
With tidy trails and docs in sight,
This bunny’s guide now reads just right. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “LLM Script Fixes” succinctly indicates that this pull request updates the LLM generation script, which aligns with the modifications to scripts/llms-generate.mjs.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@LadyBluenotes LadyBluenotes changed the title LLM Script Fixe LLM Script Fixes Oct 14, 2025
@nx-cloud
Copy link

nx-cloud bot commented Oct 14, 2025

View your CI Pipeline Execution ↗ for commit b3036b8

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded <1s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-14 21:50:30 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 14, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5483

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5483

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5483

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5483

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5483

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5483

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5483

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5483

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5483

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5483

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5483

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5483

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5483

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5483

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5483

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5483

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5483

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5483

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5483

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5483

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5483

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5483

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5483

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5483

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5483

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5483

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5483

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5483

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5483

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5483

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5483

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5483

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5483

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5483

commit: b3036b8

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6cc67e5 and b3036b8.

📒 Files selected for processing (1)
  • scripts/llms-generate.mjs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Preview
🔇 Additional comments (1)
scripts/llms-generate.mjs (1)

40-45: Clarify installation rule scope
The new entry includes the entire docs/router/framework/react/installation directory, re-including the migration guides (migrate-from-react-location.md, migrate-from-react-router.md). Confirm whether these belong under installation or should be excluded/moved.

paths: [
`${DOCS_DIR}/router/framework/react/overview.md`,
`${DOCS_DIR}/router/framework/react/quick-start.md`,
`${DOCS_DIR}/router/framework/react/decisions-on-dx.md`,
Copy link
Contributor

@coderabbitai coderabbitai bot Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify the file path exists.

The addition looks correct and follows the existing pattern. Please verify that the file exists at the specified path.

Run this script to verify the file exists:


🏁 Script executed:

#!/bin/bash
# Description: Verify the decisions-on-dx.md file exists

# Check if the file exists
if [ -f "../../docs/router/framework/react/decisions-on-dx.md" ]; then
  echo "✓ File exists"
  ls -lh "../../docs/router/framework/react/decisions-on-dx.md"
else
  echo "✗ File not found at: ../../docs/router/framework/react/decisions-on-dx.md"
  exit 1
fi

Length of output: 73


Missing file: docs/router/framework/react/decisions-on-dx.md
scripts/llms-generate.mjs line 50 references ${DOCS_DIR}/router/framework/react/decisions-on-dx.md, but that file doesn’t exist. Add the file or correct the path accordingly.

🤖 Prompt for AI Agents
In scripts/llms-generate.mjs around line 50 the array includes
`${DOCS_DIR}/router/framework/react/decisions-on-dx.md` which points to a
missing file; either add the missing file at
docs/router/framework/react/decisions-on-dx.md with the intended content or
update the path in scripts/llms-generate.mjs to the correct existing file (or
remove the entry if not needed), and then run a quick existence check
(fs.existsSync or similar) to prevent future broken paths.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/router/framework/react/decisions-on-dx.md exists
check again

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify if the decisions-on-dx.md file exists
if [ -f "docs/router/framework/react/decisions-on-dx.md" ]; then
  echo "✓ File exists at: docs/router/framework/react/decisions-on-dx.md"
  ls -lh "docs/router/framework/react/decisions-on-dx.md"
else
  echo "✗ File not found at: docs/router/framework/react/decisions-on-dx.md"
  # Let's also check if the docs directory structure exists
  echo ""
  echo "Checking directory structure:"
  ls -la docs/router/framework/react/ 2>/dev/null || echo "Directory does not exist"
fi

Length of output: 159


@schiller-manuel You're absolutely right, I apologize for the incorrect assessment! The file does exist:

✓ File exists at: docs/router/framework/react/decisions-on-dx.md
-rw-r--r-- 1 jailuser jailuser 14K Oct 14 21:53 docs/router/framework/react/decisions-on-dx.md

The addition of ${DOCS_DIR}/router/framework/react/decisions-on-dx.md to the setup-and-architecture paths is correct. The file is present in the repository and the change looks good. Thank you for the correction!


🧬 Code Graph Analysis Results

scripts/llms-generate.mjs

  • summarize: extractFrontMatter(content)

    • Description: Extracts front matter and body content from a Markdown file. Parameters: content (string) — the full Markdown content. Returns: an object { frontMatter: string, bodyContent: string } where frontMatter is the portion up to and including the closing ---, and bodyContent is the remainder trimmed.
    • Error handling/edge cases: Assumes the front matter is delimited starting after the initial '---'. If the delimiter is missing, behavior is not explicit in the summary; the function relies on content containing front matter as implemented.
  • summarize: sanitizeMarkdown(markdownContent)

    • Description: Escapes backticks and ${ for safe embedding in a template literal. Parameters: markdownContent (string). Returns: string with backticks and ${ escaped.
    • Error handling/edge cases: Performs straightforward string replacements.
  • summarize: convertMarkdownToTypeScriptESM(markdownContent)

    • Description: Wraps sanitized Markdown content as a default export in an ES Module. Parameters: markdownContent (string). Returns: string containing "export default <sanitized-content>;".
    • Error handling/edge cases: Assumes input is the sanitized Markdown string.
  • summarize: mergeFiles(files, outputFile)

    • Description: Reads multiple Markdown files, extracts front matter to obtain titles, concatenates sections with titles into a single markdown block, then converts to a TypeScript ES module string and writes to outputFile. Parameters: files (array of paths), outputFile (string). Returns: void; writes a .ts file exporting the merged content as a default export.
    • Error handling/edge cases: Reads files synchronously; expects Markdown files with a title in their front matter. If a file cannot be read or lacks title, behavior depends on runtime (not explicitly described here).
  • summarize: build-time logic (high-level)

    • Description: For a given package key (e.g., 'react-router'), collects relevant Markdown files from configured paths and globs, merges them into a single rule file under llms/rules, and builds an index.ts that exports a list of rules for the package. It also writes a tsconfig.json for the generated TypeScript project, configured for ESNext output to dist/llms. Parameters: none (driven by package configuration and CLI argument). Returns: void.
    • Error handling/edge cases: Creates directories if missing; validates package name against the predefined packages map. Exits with error messages if package not found or no package name provided.
  • note on usage context

    • The script includes a package entry that references decisions-on-dx.md among other React router docs. This confirms the script’s behavior of including specific docs (e.g., decisions-on-dx.md) when generating rules for the package, aligning with the user’s note that docs/router/framework/react/decisions-on-dx.md exists.

🧠 Learnings used
Learnt from: CR
PR: TanStack/router#0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories

@schiller-manuel schiller-manuel merged commit ff56ee5 into TanStack:main Oct 14, 2025
6 checks passed
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