Skip to content
Source
Sign inSign up
TanStack/router

test(solid-router): add basepath-file-based e2e suite #5623

Mergedbirkskyum(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5623/headmerged by birkskyum(GitHub profile, opens in a new tab)

Summary by CodeRabbit

Release Notes

  • Tests
    • Added new end-to-end test suite for Solid Router with basepath routing support
    • Normalized route path naming conventions across test scenarios
    • Added comprehensive tests validating document reload behavior with basepath configuration
    1. Walkthrough

      Introduces a new end-to-end test suite for TanStack Solid Router's basepath functionality with file-based routing, including a Playwright test verifying navigate respects basepath during document reload. Updates route paths in an existing Solid Router e2e test by normalizing underscore separators.

      Changes

      Cohort / File(s)Summary
      basepath-file-based project setup
      e2e/solid-router/basepath-file-based/.gitignore, index.html, package.json, playwright.config.ts, tsconfig.json, vite.config.js
      Establishes project configuration with Vite build, Playwright e2e testing, Solid.js framework, and TanStack Router. Configures base path /app/ and sets up server/test infrastructure.
      basepath-file-based source code
      e2e/solid-router/basepath-file-based/src/main.tsx, src/routeTree.gen.ts, src/routes/__root.tsx, src/routes/about.tsx, src/routes/index.tsx
      Implements Solid Router application with file-based routing, router initialization with basepath /app/, and module augmentation. Defines root, index, and about routes with navigate functionality.
      basepath-file-based test suite
      e2e/solid-router/basepath-file-based/tests/reload-document.test.ts, tests/setup/global.setup.ts, tests/setup/global.teardown.ts
      Adds Playwright e2e test verifying navigate respects basepath when reloadDocument is true. Includes global setup/teardown for dummy server lifecycle.
      basic-file-based route normalization
      e2e/solid-router/basic-file-based/src/routeTree.gen.ts, src/routes/non-nested/named/$baz_.bar.tsx, src/routes/non-nested/path/baz_.bar.tsx, src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx, src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx, src/routes/params-ps/non-nested/$foo_/$bar.tsx, src/routes/params-ps/non-nested/$foo_/route.tsx, src/routes/posts_.$postId.edit.tsx
      Removes underscore separators from route path definitions and updates generated route tree mappings and type declarations accordingly.

      Sequence Diagram(s)

      sequenceDiagram
          actor User
          participant App as Solid App<br/>(basepath: /app)
          participant Router as Solid Router
          participant Browser as Browser
      
          User->>App: Load /app/
          App->>Router: Initialize with routeTree<br/>(basepath: /app)
          Router->>Browser: Render home component
          App->>User: Display home
      
          User->>App: Click to-about button
          App->>Router: navigate('/about',<br/>reloadDocument: true)
          Router->>Browser: Rewrite to /app/about<br/>+ reload document
          Browser->>App: Full page reload at /app/about
          App->>Router: Reinitialize router
          Router->>Browser: Render about component
          App->>User: Display about
      
          User->>App: Click to-home button
          App->>Router: navigate('/',<br/>reloadDocument: true)
          Router->>Browser: Rewrite to /app<br/>+ reload document
          Browser->>App: Full page reload at /app
          App->>Router: Reinitialize router
          Router->>Browser: Render home component
          App->>User: Display home

      Estimated code review effort

      🎯 3 (Moderate) | ⏱️ ~25 minutes

      • basepath-file-based tests (tests/reload-document.test.ts): Verify test logic and assertions align with basepath navigation behavior
      • routeTree.gen.ts normalization (e2e/solid-router/basic-file-based/src/routeTree.gen.ts): Review route mapping and type declaration updates for consistency across all route renames
      • Route path changes across basic-file-based: Verify all route files reflect consistent naming convention (underscore removal)
      • TanStack/router#5389: Adds Solid.js e2e test exercising navigate with reloadDocument: true and basepath configuration, directly testing the scenario this PR validates.
      • TanStack/router#5244: Fixes router-core rewriteBasepath logic for handling basepath during navigation, which the new test suite verifies.
      • TanStack/router#5562: Introduces new Solid example projects with similar file-based routing setup and module augmentation patterns for router registry.

      Suggested labels

      package: solid-router

      Suggested reviewers

      • schiller-manuel
      • brenelz

      Poem

      🐰 A basepath test hops into place, With Solid routes at their own pace, Reloading through /app we go, From home to about, to and fro, Underscores vanish—clean and neat! ✨

      Pre-merge checks and finishing touches

      ❌ Failed checks (1 warning)
      Check nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
      ✅ Passed checks (2 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title Check✅ PassedThe pull request title "test(solid-router): add basepath-file-based e2e suite" directly and accurately describes the primary changeset. The vast majority of the PR adds a complete new end-to-end test suite directory at e2e/solid-router/basepath-file-based/ with configuration files, source routes, and test files specifically designed to test basepath functionality. The title uses the conventional commit format and is concise and specific enough that a developer scanning the history would understand this adds new test infrastructure for basepath handling in Solid Router. The title also appropriately scopes the change to the test domain via the "test(" prefix.
      ✨ Finishing touches
      • 📝 Generate docstrings
        🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Post copyable unit tests in a comment
      • Commit unit tests in branch `test(solid-router)--add-basepath-file-based-e2e-suite`

      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.
    2. View your CI Pipeline Execution ↗ for commit 287c7945ed2e81e9fe9c72525bf1f0af1bafb8cc

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded7m 35sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded1sView ↗

      ☁️ Nx Cloud last updated this comment at 2025-10-25 22:35:27 UTC

    3. More templates

      @tanstack/arktype-adapter

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

      @tanstack/directive-functions-plugin

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

      @tanstack/eslint-plugin-router

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

      @tanstack/history

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

      @tanstack/nitro-v2-vite-plugin

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

      @tanstack/react-router

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

      @tanstack/react-router-devtools

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

      @tanstack/react-router-ssr-query

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

      @tanstack/react-start

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

      @tanstack/react-start-client

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

      @tanstack/react-start-server

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

      @tanstack/router-cli

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

      @tanstack/router-core

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

      @tanstack/router-devtools

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

      @tanstack/router-devtools-core

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

      @tanstack/router-generator

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

      @tanstack/router-plugin

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

      @tanstack/router-ssr-query-core

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

      @tanstack/router-utils

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

      @tanstack/router-vite-plugin

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

      @tanstack/server-functions-plugin

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

      @tanstack/solid-router

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

      @tanstack/solid-router-devtools

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

      @tanstack/solid-router-ssr-query

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

      @tanstack/solid-start

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

      @tanstack/solid-start-client

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

      @tanstack/solid-start-server

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

      @tanstack/start-client-core

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

      @tanstack/start-plugin-core

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

      @tanstack/start-server-core

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

      @tanstack/start-static-server-functions

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

      @tanstack/start-storage-context

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

      @tanstack/valibot-adapter

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

      @tanstack/virtual-file-routes

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

      @tanstack/zod-adapter

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

      commit: 287c794

    4. Actionable comments posted: 1

      🧹 Nitpick comments (1)
      e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx (1)

      4-4: Route path update is correct; consider DRYing the conditional path.

      Define a single editPath and reuse for getRouteApi and useParams to prevent future drift. No behavior change.

      -const api = getRouteApi(
      -  // @ts-expect-error path is updated with new Experimental Non Nested Paths to not include the trailing underscore
      -  `/${useExperimentalNonNestedRoutes ? 'posts' : 'posts_'}/$postId/edit`,
      -)
      +const editPath = `/${useExperimentalNonNestedRoutes ? 'posts' : 'posts_'}/$postId/edit`
      +// @ts-expect-error path is updated with new Experimental Non Nested Paths to not include the trailing underscore
      +const api = getRouteApi(editPath)
      @@
      -  const paramsViaHook = useParams({
      -    // @ts-expect-error path is updated with new Experimental Non Nested Paths to not include the trailing underscore
      -    from: `/${useExperimentalNonNestedRoutes ? 'posts' : 'posts_'}/$postId/edit`,
      -  })
      +  const paramsViaHook = useParams({
      +    // @ts-expect-error path is updated with new Experimental Non Nested Paths to not include the trailing underscore
      +    from: editPath,
      +  })
      📜 Review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between 08d78c1e2fc43e2d2a20203e168a18d1fc063078 and 287c7945ed2e81e9fe9c72525bf1f0af1bafb8cc.

      ⛔ Files ignored due to path filters (1)
      • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
      📒 Files selected for processing (22)
      • e2e/solid-router/basepath-file-based/.gitignore (1 hunks)
      • e2e/solid-router/basepath-file-based/index.html (1 hunks)
      • e2e/solid-router/basepath-file-based/package.json (1 hunks)
      • e2e/solid-router/basepath-file-based/playwright.config.ts (1 hunks)
      • e2e/solid-router/basepath-file-based/src/main.tsx (1 hunks)
      • e2e/solid-router/basepath-file-based/src/routeTree.gen.ts (1 hunks)
      • e2e/solid-router/basepath-file-based/src/routes/__root.tsx (1 hunks)
      • e2e/solid-router/basepath-file-based/src/routes/about.tsx (1 hunks)
      • e2e/solid-router/basepath-file-based/src/routes/index.tsx (1 hunks)
      • e2e/solid-router/basepath-file-based/tests/reload-document.test.ts (1 hunks)
      • e2e/solid-router/basepath-file-based/tests/setup/global.setup.ts (1 hunks)
      • e2e/solid-router/basepath-file-based/tests/setup/global.teardown.ts (1 hunks)
      • e2e/solid-router/basepath-file-based/tsconfig.json (1 hunks)
      • e2e/solid-router/basepath-file-based/vite.config.js (1 hunks)
      • e2e/solid-router/basic-file-based/src/routeTree.gen.ts (18 hunks)
      • e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx (1 hunks)
      • e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx (1 hunks)
      • e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx (1 hunks)
      • e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx (1 hunks)
      • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx (1 hunks)
      • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx (1 hunks)
      • e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx (1 hunks)
      🧰 Additional context used
      📓 Path-based instructions (4)
      **/*.{ts,tsx}

      📄 CodeRabbit inference engine (AGENTS.md)

      Use TypeScript in strict mode with extensive type safety across the codebase

      Files:

      • e2e/solid-router/basepath-file-based/playwright.config.ts
      • e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
      • e2e/solid-router/basepath-file-based/src/routes/__root.tsx
      • e2e/solid-router/basepath-file-based/src/routes/index.tsx
      • e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx
      • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx
      • e2e/solid-router/basepath-file-based/tests/reload-document.test.ts
      • e2e/solid-router/basepath-file-based/src/routes/about.tsx
      • e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx
      • e2e/solid-router/basepath-file-based/tests/setup/global.setup.ts
      • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx
      • e2e/solid-router/basepath-file-based/src/routeTree.gen.ts
      • e2e/solid-router/basepath-file-based/src/main.tsx
      • e2e/solid-router/basepath-file-based/tests/setup/global.teardown.ts
      • e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx
      • e2e/solid-router/basic-file-based/src/routeTree.gen.ts
      • e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx
      e2e/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Store end-to-end tests under the e2e/ directory

      Files:

      • e2e/solid-router/basepath-file-based/playwright.config.ts
      • e2e/solid-router/basepath-file-based/index.html
      • e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
      • e2e/solid-router/basepath-file-based/src/routes/__root.tsx
      • e2e/solid-router/basepath-file-based/src/routes/index.tsx
      • e2e/solid-router/basepath-file-based/tsconfig.json
      • e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx
      • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx
      • e2e/solid-router/basepath-file-based/tests/reload-document.test.ts
      • e2e/solid-router/basepath-file-based/src/routes/about.tsx
      • e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx
      • e2e/solid-router/basepath-file-based/package.json
      • e2e/solid-router/basepath-file-based/tests/setup/global.setup.ts
      • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx
      • e2e/solid-router/basepath-file-based/src/routeTree.gen.ts
      • e2e/solid-router/basepath-file-based/src/main.tsx
      • e2e/solid-router/basepath-file-based/tests/setup/global.teardown.ts
      • e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx
      • e2e/solid-router/basic-file-based/src/routeTree.gen.ts
      • e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx
      • e2e/solid-router/basepath-file-based/vite.config.js
      **/src/routes/**

      📄 CodeRabbit inference engine (AGENTS.md)

      Place file-based routes under src/routes/ directories

      Files:

      • e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
      • e2e/solid-router/basepath-file-based/src/routes/__root.tsx
      • e2e/solid-router/basepath-file-based/src/routes/index.tsx
      • e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx
      • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx
      • e2e/solid-router/basepath-file-based/src/routes/about.tsx
      • e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx
      • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx
      • e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx
      • e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx
      **/package.json

      📄 CodeRabbit inference engine (AGENTS.md)

      Use workspace:* protocol for internal dependencies in package.json files

      Files:

      • e2e/solid-router/basepath-file-based/package.json
      🧠 Learnings (5)
      📚 Learning: 2025-09-22T00:56:49.237Z
      Learnt from: nlynzaad
      PR: TanStack/router#5182
      File: e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx:3-5
      Timestamp: 2025-09-22T00:56:49.237Z
      Learning: In TanStack Router, underscores are intentionally stripped from route segments (e.g., `$baz_` becomes `baz` in generated types) but should be preserved in base path segments. This is the correct behavior as of the fix in PR #5182.

      Applied to files:

      • e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
      • e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx
      📚 Learning: 2025-09-23T17:36:12.598Z
      Learnt from: CR
      PR: TanStack/router#0
      File: AGENTS.md:0-0
      Timestamp: 2025-09-23T17:36:12.598Z
      Learning: Applies to **/*.{ts,tsx} : Use TypeScript in strict mode with extensive type safety across the codebase

      Applied to files:

      • e2e/solid-router/basepath-file-based/tsconfig.json
      📚 Learning: 2025-09-23T17:36:12.598Z
      Learnt from: CR
      PR: TanStack/router#0
      File: AGENTS.md:0-0
      Timestamp: 2025-09-23T17:36:12.598Z
      Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

      Applied to files:

      • e2e/solid-router/basepath-file-based/package.json
      📚 Learning: 2025-10-01T18:31:35.420Z
      Learnt from: schiller-manuel
      PR: TanStack/router#5330
      File: e2e/react-start/custom-basepath/src/routeTree.gen.ts:58-61
      Timestamp: 2025-10-01T18:31:35.420Z
      Learning: Do not review files named `routeTree.gen.ts` in TanStack Router repositories, as these are autogenerated files that should not be manually modified.

      Applied to files:

      • e2e/solid-router/basepath-file-based/src/routeTree.gen.ts
      • e2e/solid-router/basic-file-based/src/routeTree.gen.ts
      📚 Learning: 2025-10-08T08:11:47.088Z
      Learnt from: nlynzaad
      PR: TanStack/router#5402
      File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
      Timestamp: 2025-10-08T08:11:47.088Z
      Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.

      Applied to files:

      • e2e/solid-router/basepath-file-based/src/routeTree.gen.ts
      • e2e/solid-router/basic-file-based/src/routeTree.gen.ts
      🧬 Code graph analysis (13)
      e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx (3)
      e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx (1)
      • Route (3-5)
      e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx (1)
      • Route (3-5)
      e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx (1)
      • Route (3-5)
      e2e/solid-router/basepath-file-based/src/routes/__root.tsx (2)
      e2e/solid-router/basepath-file-based/src/routes/about.tsx (1)
      • Route (3-5)
      e2e/solid-router/basepath-file-based/src/routes/index.tsx (1)
      • Route (3-5)
      e2e/solid-router/basepath-file-based/src/routes/index.tsx (2)
      e2e/solid-router/basepath-file-based/src/routes/__root.tsx (1)
      • Route (3-3)
      e2e/solid-router/basepath-file-based/src/routes/about.tsx (1)
      • Route (3-5)
      e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx (3)
      e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.index.tsx (1)
      • Route (3-5)
      e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.route.tsx (1)
      • Route (3-5)
      e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx (1)
      • Route (3-5)
      e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx (2)
      e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx (1)
      • Route (3-3)
      e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/route.tsx (1)
      • Route (3-5)
      e2e/solid-router/basepath-file-based/src/routes/about.tsx (2)
      e2e/solid-router/basepath-file-based/src/routes/__root.tsx (1)
      • Route (3-3)
      e2e/solid-router/basepath-file-based/src/routes/index.tsx (1)
      • Route (3-5)
      e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx (2)
      e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.foo.tsx (1)
      • Route (3-5)
      e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.index.tsx (1)
      • Route (3-5)
      e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx (2)
      e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx (1)
      • Route (4-6)
      e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/route.tsx (1)
      • Route (3-5)
      e2e/solid-router/basepath-file-based/src/routeTree.gen.ts (2)
      examples/react/quickstart-esbuild-file-based/src/routeTree.gen.ts (1)
      • FileRouteTypes (68-75)
      examples/react/start-bare/src/routeTree.gen.ts (1)
      • FileRouteTypes (39-46)
      e2e/solid-router/basepath-file-based/src/main.tsx (1)
      e2e/react-router/js-only-file-based/src/main.jsx (2)
      • router (8-13)
      • rootElement (15-15)
      e2e/solid-router/basepath-file-based/tests/setup/global.teardown.ts (1)
      scripts/set-ts-version.js (1)
      • packageJson (33-33)
      e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx (3)
      e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx (1)
      • Route (3-5)
      e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx (1)
      • Route (3-5)
      e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx (1)
      • Route (3-5)
      e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx (3)
      e2e/react-router/basic-file-based/src/routes/posts_.$postId.edit.tsx (1)
      • Route (4-6)
      packages/router-generator/tests/generator/types-disabled/routes/posts.tsx (1)
      • Route (6-8)
      packages/router-generator/tests/generator/types-disabled/routes/posts/$postId.tsx (1)
      • Route (6-8)
      ⏰ 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). (2)
      • GitHub Check: Preview
      • GitHub Check: Test
      🔇 Additional comments (20)
      e2e/solid-router/basepath-file-based/.gitignore (1)

      1-11: LGTM!

      The gitignore entries are appropriate for a Vite-based e2e test project with Playwright.

      e2e/solid-router/basepath-file-based/tsconfig.json (1)

      1-16: LGTM!

      The TypeScript configuration correctly enables strict mode and is properly configured for Solid.js with appropriate compiler options.

      e2e/solid-router/basepath-file-based/vite.config.js (1)

      1-9: LGTM!

      The Vite configuration correctly sets the base path to '/app/' and properly configures the TanStack Router plugin with Solid.js support.

      e2e/solid-router/basepath-file-based/package.json (1)

      13-24: Dependencies correctly use workspace protocol.

      The internal dependencies properly use the workspace:^ protocol as per coding guidelines.

      e2e/solid-router/basepath-file-based/src/routes/__root.tsx (1)

      1-3: LGTM!

      The root route is correctly defined using createRootRoute(). A root route without a component is valid for this use case.

      e2e/solid-router/basepath-file-based/index.html (1)

      1-11: LGTM!

      The HTML entry point is correctly structured for a Vite-based Solid.js application with appropriate root element and module script.

      e2e/solid-router/basepath-file-based/tests/setup/global.setup.ts (1)

      1-6: LGTM!

      The global setup correctly starts the dummy e2e server using the package name from package.json.

      e2e/solid-router/basepath-file-based/tests/reload-document.test.ts (1)

      1-18: LGTM!

      The e2e test is well-structured and thoroughly verifies that navigation respects the basepath (/app/) when reloadDocument is true. The test flow appropriately validates bidirectional navigation between routes.

      e2e/solid-router/basepath-file-based/tests/setup/global.teardown.ts (1)

      1-6: LGTM! Clean teardown implementation.

      The teardown properly stops the dummy server using the package name, complementing the setup script. The use of JSON import attributes and async/await is correct.

      e2e/solid-router/basepath-file-based/src/routes/about.tsx (1)

      1-20: LGTM! Route implementation follows best practices.

      The /about route is properly defined with createFileRoute, uses Route.useNavigate() correctly, and includes appropriate data-testid attributes for e2e testing. The reloadDocument: true navigation aligns with the test scenario for basepath behavior.

      e2e/solid-router/basepath-file-based/src/routes/index.tsx (1)

      1-25: LGTM! Root route implementation is solid.

      The root / route is correctly defined with createFileRoute, uses Route.useNavigate() appropriately, and includes proper data-testid attributes for e2e testing. The implementation is consistent with the /about route and supports the basepath navigation test scenario.

      e2e/solid-router/basepath-file-based/playwright.config.ts (1)

      1-41: LGTM! Well-configured Playwright setup.

      The configuration properly uses port utilities, sets up global setup/teardown scripts, and configures the web server with appropriate build and serve commands. The use of workers: 1 is appropriate for e2e tests to avoid race conditions, and reuseExistingServer: !process.env.CI is a good developer experience pattern.

      e2e/solid-router/basepath-file-based/src/main.tsx (1)

      1-25: LGTM! Solid router initialization with proper basepath configuration.

      The router is correctly configured with basepath: '/app' which is the focus of this e2e suite. The module augmentation for type safety, conditional rendering check to prevent double-mounting, and default router options all follow best practices for TanStack Solid Router.

      e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx (1)

      3-3: LGTM on normalized path.

      Consistent with the other non-nested prefix/suffix updates.

      e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx (1)

      3-3: Param placeholder normalization approved.

      Removing the trailing underscore from $foo matches the new convention.

      e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx (1)

      3-3: LGTM.

      Path normalization is consistent with sibling routes.

      e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx (1)

      3-3: Param segment normalization approved.

      Switch to '/non-nested/named/$baz/bar' matches the param underscore-stripping convention. Based on learnings.

      e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx (1)

      4-4: LGTM; coherent with the parent $foo route update.

      The from path toggle matches the new non-nested convention.

      e2e/solid-router/basic-file-based/src/routeTree.gen.ts (1)

      1-1931: Skipping review of generated route tree.

      routeTree.gen.ts is autogenerated and not meant for manual edits; trusting generator output. Based on learnings.

      e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx (1)

      3-3: Filename-path mismatch: The file still contains an underscore but the route path was normalized to remove it.

      The file {$baz}suffix_.bar.tsx should either be renamed to {$baz}suffix.bar.tsx OR the createFileRoute path should be /non-nested/suffix/{$baz}suffix_/bar to match the filename. Other underscore routes in the codebase (params-ps and named) maintain consistency between filename and path. This change creates an inconsistency.

      ⛔ Skipped due to learnings
      Learnt from: nlynzaad
      PR: TanStack/router#5182
      File: e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx:3-5
      Timestamp: 2025-09-22T00:56:49.237Z
      Learning: In TanStack Router, underscores are intentionally stripped from route segments (e.g., `$baz_` becomes `baz` in generated types) but should be preserved in base path segments. This is the correct behavior as of the fix in PR #5182.
      e2e/solid-router/basepath-file-based/package.json line 2
      @@ -0,0 +1,2 @@
      1+{
      2+ "name": "tanstack-solid-router-e2e-react-basepath-file-based",

      ⚠️ Potential issue | 🔴 Critical

      Fix incorrect package name referencing React instead of Solid.

      The package name contains "react" but this is a Solid Router e2e test suite. The name should reference "solid" instead.

      Apply this diff to fix the package name:

      -  "name": "tanstack-solid-router-e2e-react-basepath-file-based",
      +  "name": "tanstack-solid-router-e2e-solid-basepath-file-based",
      📝 Committable suggestion

      ‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

        "name": "tanstack-solid-router-e2e-solid-basepath-file-based",
      🤖 Prompt for AI Agents
      In e2e/solid-router/basepath-file-based/package.json around line 2, the package
      name incorrectly contains "react"; update the "name" field to reference "solid"
      instead (e.g., change "tanstack-solid-router-e2e-react-basepath-file-based" to
      "tanstack-solid-router-e2e-solid-basepath-file-based") so the package name
      correctly reflects this Solid Router e2e test suite.

Sign in to join this conversation.