Skip to content

docs(start): document route and asset base paths - #7882

Open
whizzkid1452 wants to merge 2 commits into
TanStack:mainfrom
whizzkid1452:bug/start-basepath-docs
Open

whizzkid1452 wants to merge 2 commits into
TanStack:mainfrom
whizzkid1452:bug/start-basepath-docs

Conversation

@whizzkid1452

@whizzkid1452 whizzkid1452 commented Jul 23, 2026 •

Copy link
Copy Markdown

Summary

  • Explain that Vite base prefixes asset URLs while Start router.basepath prefixes application routes and server functions.
  • Add examples for matching route and asset prefixes and for serving them from separate paths.
  • Add the Base Paths guide to the React and Solid Start navigation.

Closes #4888

Test plan

  • pnpm test:docs
  • Validate docs/start/config.json with JSON.parse
  • Format the changed files with Prettier
  • Run affected ESLint, type, unit, and build targets against upstream/main (no affected projects for this documentation-only change)

Summary by CodeRabbit

  • Documentation
    • Added React and Solid Base Paths guides explaining how asset prefixes differ from application route and server-function prefixes.
    • Documented matching and separate prefix configurations, server-function prefix behavior, production routing considerations, and ways to verify routes and asset URLs.
    • Added Base Paths navigation entries to the React and Solid framework documentation.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (2)
docs/AGENTS.md — auto-discovered
CONTRIBUTING.md — configured

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 25da2c43-3e84-458d-b422-5a07187ee3d9

📥 Commits

Reviewing files that changed from the base of the PR and between ec92b3a and f1e43d5.

📒 Files selected for processing (2)
  • docs/start/framework/react/guide/base-paths.md
  • docs/start/framework/solid/guide/base-paths.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/start/framework/react/guide/base-paths.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Adds React and Solid guides for configuring asset and route prefixes. Adds navigation links to both guides.

Changes

Base Paths Documentation

Layer / File(s) Summary
Base path configuration guide
docs/start/framework/react/guide/base-paths.md, docs/start/framework/solid/guide/base-paths.md
Describes Vite asset prefixes, router route prefixes, server-function prefixes, development and production routing, and configuration checks.
Framework navigation integration
docs/start/config.json
Adds Base Paths entries to the React and Solid Server & Execution navigation sections.

Priority: ➖ Normal

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

Change: Other · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to f1e43

The guides’ navigation and documented base-path behavior align with the runtime; no concrete merge risk is established.

Architecture Summary

Architecture risk: 🔵 Low · up to f1e43

The change affects 1 system.

Changed systems: docs

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — docs (service) was modified; 3 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in docs/start/config.json: Inserted a new “Base Paths” navigation item (label + to URL) into the react “Server & Execution” sections list directly after “Routing” and before “Execution Model”.
  • observed — Modified behavior in docs/start/config.json: Inserted a new “Base Paths” navigation item (label + to URL) into the solid “Server & Execution” sections list directly after “Routing” and before “Execution Model”.
  • observed — Modified behavior in docs/start/framework/react/guide/base-paths.md: Added a guide explaining that Vite’s base sets asset URLs while router.basepath sets application-route URLs, and both should be configured in vite.config.ts. Examples show matching /app/ and /app prefixes, where the default serverFns.base of /_serverFn combines with the router base, and root routes with assets under /_ui/. The guide also describes inferred router base paths, development and production request handling, and checks for direct requests, client navigation, asset URLs, and nested-route forwarding.
  • observed — Modified behavior in docs/start/framework/solid/guide/base-paths.md: Adds the guide’s base-path concepts and a matching /app/ configuration. It distinguishes Vite asset URLs from Start route URLs, explains that server-function URLs combine router.basepath with the default serverFns.base of /_serverFn, and describes deriving the router base from a path-based Vite base and forwarding requests in production.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: documenting route and asset base paths for Start.
Description check ✅ Passed The description explains the documentation changes, motivation, linked issue, and test plan. It does not use the repository template headings or explicitly complete the contribution, AI-understanding,…
Linked Issues check ✅ Passed Issue #4888 states that the solution requires Vite base and that the issue remains open until this behavior is documented. The React and Solid Start guides document the distinction between Vite `bas…
Out of Scope Changes check ✅ Passed The reviewed changes are limited to the React and Solid Start base-path guides and their navigation entries. These changes directly support the documentation objective in issue #4888. The evidence sho…
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 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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.

@whizzkid1452
whizzkid1452 marked this pull request as ready for review July 23, 2026 09:26

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/start/framework/react/guide/base-paths.md`:
- Around line 38-46: Update the base-paths documentation around the URL table to
define serverFns.base in the preceding configuration example, or explicitly
document its default value and how it combines with router.basepath for
server-function URLs. Ensure the table’s server-function prefix source is
understandable from the surrounding text.

In `@docs/start/framework/solid/guide/base-paths.md`:
- Around line 1-2: Update the Solid base-paths guide referenced by its
frontmatter so it no longer serves the React guide verbatim. Make the shared
explanation framework-neutral and replace React-specific configuration such as
`@tanstack/react-start/plugin/vite`, `@vitejs/plugin-react`, and viteReact() with
valid Solid-specific examples.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4dff169e-ef4e-4413-b9ca-3c9c6365acd8

📥 Commits

Reviewing files that changed from the base of the PR and between a76c192 and ec92b3a.

📒 Files selected for processing (3)
  • docs/start/config.json
  • docs/start/framework/react/guide/base-paths.md
  • docs/start/framework/solid/guide/base-paths.md

Comment thread docs/start/framework/react/guide/base-paths.md
Comment thread docs/start/framework/solid/guide/base-paths.md Outdated

This branch has not been deployed

No deployments
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.

[start] Incomplete basepath handling

1 participant