Skip to content

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Oct 26, 2025

Summary by CodeRabbit

Release Notes

  • New Features

    • Added new parameterized route examples showcasing named and wildcard path parameter patterns
    • Expanded navigation demo with links for various parameter combinations
  • Tests

    • Added comprehensive test coverage for parameterized routing variations
    • Added Unicode path encoding test coverage
  • Chores

    • Standardized route naming conventions across examples

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 26, 2025

Walkthrough

This PR normalizes parameterized route paths in the Solid Router e2e test suite by removing trailing underscores and introduces new wildcard and named parameter route variants under /params-ps. Updates include modified route definitions, a regenerated route tree with expanded mappings, and additional e2e tests.

Changes

Cohort / File(s) Summary
Route Path Normalization
e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx, e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx, 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, e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$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/posts_.$postId.edit.tsx
Removed trailing underscores from route path arguments in createFileRoute() calls (e.g., /params-ps/non-nested/$foo_/params-ps/non-nested/$foo, /posts_/$postId/edit/posts/$postId/edit).
New Wildcard Routes
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/$.tsx, e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsx, e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/{$}suffix.tsx, e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsx
Added new file-based routes for wildcard parameters under /params-ps/wildcard/ with various path shapes (bare wildcard, prefix, suffix). Index route redirects to parent.
New Named Routes
e2e/solid-router/basic-file-based/src/routes/params-ps/named/prefix{$foo}.tsx, e2e/solid-router/basic-file-based/src/routes/params-ps/named/{$foo}suffix.tsx, e2e/solid-router/basic-file-based/src/routes/params-ps/named/index.tsx
Added new file-based routes for named parameters under /params-ps/named/ with prefix and suffix path shapes. Index route redirects to parent.
Generated Route Tree
e2e/solid-router/basic-file-based/src/routeTree.gen.ts
Regenerated route tree with expanded route declarations, updated FileRoutesByFullPath, FileRoutesByTo, FileRoutesById mappings, and public type exports for all new and renamed routes including ParamsPsWildcardIndexRoute, ParamsPsNamedIndexRoute, and related variants.
Index Page Links
e2e/solid-router/basic-file-based/src/routes/params-ps/index.tsx
Added new navigation links for named and wildcard parameter route variants with appropriate param values.
End-to-End Tests
e2e/solid-router/basic-file-based/tests/params.spec.ts
Added data-driven test suites for new parameterized routes (named/wildcard prefixes/suffixes), navigation verification, and param output assertions; includes Unicode route rendering test.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Nav as Navigation
    participant Router as Route Resolver
    participant Named as Named Param Routes
    participant Wildcard as Wildcard Routes
    participant Output as Param Output

    rect rgb(240, 248, 255)
    Note over User,Output: Named Parameter Flow (/params-ps/named/{shape})
    User->>Nav: Navigate to /params-ps/named/prefix{$foo}
    Nav->>Router: Route match & resolve
    Router->>Named: Extract param: foo='bar'
    Named->>Named: useParams() → {foo: 'bar'}
    Named->>Output: Render heading & JSON params
    Output->>User: Display ParamsNamedFooPrefix + {foo: 'bar'}
    end

    rect rgb(255, 250, 240)
    Note over User,Output: Wildcard Parameter Flow (/params-ps/wildcard/{shape})
    User->>Nav: Navigate to /params-ps/wildcard/{$}suffix
    Nav->>Router: Route match & resolve
    Router->>Wildcard: Extract splat param: _splat='foo'
    Wildcard->>Wildcard: useParams() → {*: 'foo', _splat: 'foo'}
    Wildcard->>Output: Render heading & JSON params
    Output->>User: Display ParamsWildcardSplatSuffix + params
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Areas requiring extra attention:

  • routeTree.gen.ts: Dense generated file with extensive changes across type definitions, mappings (FileRoutesByFullPath, FileRoutesByTo, FileRoutesById), and module augmentation. Verify consistency between route IDs, paths, and fullPath fields across all new/renamed entries.
  • Route path consistency: Ensure trailing underscore removal is applied uniformly across all affected route files and matches the regenerated tree mappings (verify no mismatches between file paths and tree definitions).
  • Type exports: Cross-check that all new route type exports (ParamsPsNamedIndexRoute, ParamsPsWildcardIndexRoute, and variants) are properly wired in public interfaces and RootRouteChildren.
  • Test coverage: Verify that new test cases for wildcard/named routes cover all path variants and correctly assert param extraction and navigation flow.

Possibly related PRs

Suggested labels

package: solid-router

Suggested reviewers

  • schiller-manuel
  • Sheraff

Poem

🐰 Routes now flow without underscore trails,
Named and wildcard params dance through the paths,
Normalization spreads through the tree,
New branches bloom where params play,
The router hops forward, cleaner, happier! 🌿✨

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "test(solid-router): add params test for basic file based" is directly related to the changeset. The PR adds comprehensive test coverage for parameterized routes in the Solid Router's file-based routing system, as evidenced by the new test file e2e/solid-router/basic-file-based/tests/params.spec.ts containing test suites for named and wildcard parameters. While the title focuses on the testing aspect, the supporting implementation changes—including new route files for different parameter patterns (prefix, suffix, wildcard variants) and path normalization updates—are integral to enabling these tests and align with the overall objective of working on basic file-based routing.
✨ 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)--work-on-basic-file-based

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.

@nx-cloud
Copy link

nx-cloud bot commented Oct 26, 2025

View your CI Pipeline Execution ↗ for commit 2cacf82

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

☁️ Nx Cloud last updated this comment at 2025-10-26 22:42:58 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 26, 2025

More templates

@tanstack/arktype-adapter

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

@tanstack/directive-functions-plugin

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

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/zod-adapter

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

commit: 2cacf82

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: 5

🧹 Nitpick comments (5)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/{$}suffix.tsx (1)

1-2: Add a blank line after the import statement.

ESLint requires a blank line between imports and other code for better readability.

Apply this diff:

 import { createFileRoute } from '@tanstack/solid-router'
+
 export const Route = createFileRoute('/params-ps/wildcard/{$}suffix')({
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsx (1)

1-2: Combine duplicate imports from the same module.

ESLint flags duplicate imports from @tanstack/solid-router. Consolidate them into a single import statement for better code organization.

Apply this diff:

-import { createFileRoute } from '@tanstack/solid-router'
-import { redirect } from '@tanstack/solid-router'
+import { createFileRoute, redirect } from '@tanstack/solid-router'
e2e/solid-router/basic-file-based/tests/params.spec.ts (1)

272-343: Consider consolidating render stability tests.

The render stability test (lines 272-343) appears nearly identical to the existing test at lines 59-132. If both tests cover the same behavior, consider consolidating them or clearly documenting what additional aspect the second test verifies for prefix/suffix routes.

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

1338-1351: Minor: trailing-slash/path fields for index entries.
declare module maps id ‘…/’ while path/fullPath omit trailing slash. This matches existing pattern (e.g., /params-ps/), so fine. Just flagging for awareness.


266-275: Review comment is accurate; optional refactoring suggestion stands.

The structure analysis confirms the review comment's observation. The params-ps routes (wildcard and named index routes) are mounted directly at /params-ps/wildcard/ and /params-ps/named/, whereas the redirect pattern uses explicit container route files ($target.tsx) with index routes nested underneath. The suggestion to add container routes (wildcard.tsx and named.tsx) at the params-ps level for architectural parity is valid but optional, and the generated code is correctly structured for the current source layout.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3a0cfa9 and 2cacf82.

📒 Files selected for processing (17)
  • e2e/solid-router/basic-file-based/src/routeTree.gen.ts (30 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/index.tsx (1 hunks)
  • e2e/solid-router/basic-file-based/src/routes/params-ps/named/index.tsx (1 hunks)
  • e2e/solid-router/basic-file-based/src/routes/params-ps/named/prefix{$foo}.tsx (1 hunks)
  • e2e/solid-router/basic-file-based/src/routes/params-ps/named/{$foo}suffix.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/params-ps/wildcard/$.tsx (1 hunks)
  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsx (1 hunks)
  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsx (1 hunks)
  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/{$}suffix.tsx (1 hunks)
  • e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx (1 hunks)
  • e2e/solid-router/basic-file-based/tests/params.spec.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/{$}suffix.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/named/index.tsx
  • e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.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/index.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/$.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/named/{$foo}suffix.tsx
  • e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx
  • e2e/solid-router/basic-file-based/tests/params.spec.ts
  • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/named/prefix{$foo}.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsx
  • 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
  • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx
  • e2e/solid-router/basic-file-based/src/routeTree.gen.ts
**/src/routes/**

📄 CodeRabbit inference engine (AGENTS.md)

Place file-based routes under src/routes/ directories

Files:

  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/{$}suffix.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/named/index.tsx
  • e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.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/index.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/$.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/named/{$foo}suffix.tsx
  • e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/named/prefix{$foo}.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsx
  • 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
  • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx
e2e/**

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/{$}suffix.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/named/index.tsx
  • e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.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/index.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/$.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/named/{$foo}suffix.tsx
  • e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx
  • e2e/solid-router/basic-file-based/tests/params.spec.ts
  • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/named/prefix{$foo}.tsx
  • e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsx
  • 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
  • e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx
  • e2e/solid-router/basic-file-based/src/routeTree.gen.ts
🧠 Learnings (1)
📚 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/params-ps/non-nested/$foo_/$bar.tsx
🧬 Code graph analysis (13)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/{$}suffix.tsx (4)
e2e/solid-router/basic-file-based/src/routes/params-ps/index.tsx (1)
  • Route (3-5)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/$.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsx (1)
  • Route (4-8)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsx (5)
e2e/solid-router/basic-file-based/src/routes/params-ps/index.tsx (1)
  • Route (3-5)
e2e/solid-router/basic-file-based/src/routes/params-ps/named/index.tsx (1)
  • Route (3-7)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/$.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/{$}suffix.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/named/index.tsx (4)
e2e/solid-router/basic-file-based/src/routes/params-ps/index.tsx (1)
  • Route (3-5)
e2e/solid-router/basic-file-based/src/routes/params-ps/named/prefix{$foo}.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/named/{$foo}suffix.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsx (1)
  • Route (4-8)
e2e/solid-router/basic-file-based/src/routes/non-nested/path/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/prefix/prefix{$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/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx (3)
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/non-nested/suffix/{$baz}suffix_.bar.tsx (1)
  • Route (3-5)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/$.tsx (3)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsx (1)
  • Route (4-8)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/{$}suffix.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/named/{$foo}suffix.tsx (4)
e2e/solid-router/basic-file-based/src/routes/params-ps/index.tsx (1)
  • Route (3-5)
e2e/solid-router/basic-file-based/src/routes/params-ps/named/index.tsx (1)
  • Route (3-7)
e2e/solid-router/basic-file-based/src/routes/params-ps/named/prefix{$foo}.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/{$}suffix.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx (3)
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/react-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/named/prefix{$foo}.tsx (4)
e2e/solid-router/basic-file-based/src/routes/params-ps/index.tsx (1)
  • Route (3-5)
e2e/solid-router/basic-file-based/src/routes/params-ps/named/index.tsx (1)
  • Route (3-7)
e2e/solid-router/basic-file-based/src/routes/params-ps/named/{$foo}suffix.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsx (4)
e2e/solid-router/basic-file-based/src/routes/params-ps/index.tsx (1)
  • Route (3-5)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/$.tsx (1)
  • Route (2-4)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsx (1)
  • Route (4-8)
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/{$}suffix.tsx (1)
  • Route (2-4)
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/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/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)
🪛 ESLint
e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/{$}suffix.tsx

[error] 1-1: Expected 1 empty line after import statement not followed by another import.

(import/newline-after-import)

e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsx

[error] 1-1: '@tanstack/solid-router' imported multiple times.

(import/no-duplicates)


[error] 2-2: '@tanstack/solid-router' imported multiple times.

(import/no-duplicates)

e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/$.tsx

[error] 1-1: Expected 1 empty line after import statement not followed by another import.

(import/newline-after-import)

e2e/solid-router/basic-file-based/src/routes/params-ps/named/{$foo}suffix.tsx

[error] 1-1: Expected 1 empty line after import statement not followed by another import.

(import/newline-after-import)

e2e/solid-router/basic-file-based/src/routes/params-ps/named/prefix{$foo}.tsx

[error] 1-1: Expected 1 empty line after import statement not followed by another import.

(import/newline-after-import)

e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsx

[error] 1-1: Expected 1 empty line after import statement not followed by another import.

(import/newline-after-import)

⏰ 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: Test
  • GitHub Check: Preview
🔇 Additional comments (26)
e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx (1)

3-3: Path normalization looks correct.

The removal of the trailing underscore from the route path aligns with TanStack Router's behavior where underscores are intentionally stripped from route segments. This change is consistent with similar normalizations across the PR.

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

4-4: Path normalization correctly applied.

The updated route path removes the trailing underscore from $foo, aligning with the framework's normalization behavior. The backward compatibility logic on lines 10-11 appropriately handles both the old and new path formats during the migration.

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

3-3: Path normalization looks correct.

The removal of the trailing underscore from the route path aligns with TanStack Router's behavior. This change is consistent with the broader route path normalization effort in this PR.

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

3-3: Path normalization looks correct.

The removal of the trailing underscore from the route path maintains consistency with the route path normalization effort across this PR.

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

3-3: Path normalization looks good.

The removal of the trailing underscore from the route path aligns with the broader normalization effort across parameterized routes in this PR.

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

3-3: Path normalization looks good.

Consistent with the broader effort to remove trailing underscores from route paths.

e2e/solid-router/basic-file-based/src/routes/params-ps/named/index.tsx (1)

1-7: LGTM!

The imports are correctly combined and the redirect logic is consistent with related index routes.

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

4-4: Path normalization looks good.

The updated path removes the trailing underscore, aligning with the broader normalization effort. The conditional logic in the file appropriately handles the transition for backward compatibility.

e2e/solid-router/basic-file-based/src/routes/params-ps/index.tsx (1)

21-70: LGTM! Well-structured UI additions.

The new links for prefix and suffix parameter variants are consistent with existing patterns. Good separation between named and wildcard parameter sections, and test IDs follow the established naming convention.

e2e/solid-router/basic-file-based/tests/params.spec.ts (2)

197-417: Comprehensive test coverage for parameterized routes.

The data-driven test approach with NAMED_PARAMS_PAIRS and WILDCARD_PARAM_PAIRS effectively covers href interpolation, navigation, and first-load parameter handling for prefix and suffix variants.


419-427: Good coverage for Unicode route handling.

The test properly validates non-Latin character rendering and URL encoding for internationalized routes.

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

45-46: LGTM: new params-ps named/wildcard imports are correctly added and used below.

Also applies to: 58-63


327-330: Path normalization confirmed for post edit.
id/path now '/posts/$postId/edit'. Good.


336-364: LGTM: new wildcard/named variants are wired with consistent ids/paths.


387-390: LGTM: non-nested $foo route id normalized.


599-604: FileRoutesByFullPath additions look consistent.
New params-ps named/wildcard mappings and normalized non-nested entries align with route constants.

Also applies to: 615-616, 620-626


677-681: FileRoutesByTo updated appropriately.
Routes resolve to the new constants; no issues spotted.

Also applies to: 693-694, 698-704


853-858: FileRouteTypes: union types extended correctly.
Full path and “to” unions reflect new route surface. Looks good.

Also applies to: 869-871, 874-881, 931-936, 947-949, 952-959


1091-1103: RootRouteChildren includes new index and variant routes.
Wiring is complete and consistent.

Also applies to: 1101-1103


1415-1421: LGTM: /posts/$postId/edit mapping in declaration block.


1429-1463: LGTM: declared params-ps named/wildcard leaf routes.
preLoaderRoute and parentRoute are consistent.


1492-1498: LGTM: non-nested and params-ps/non-nested mappings updated.
Paths/parents align with earlier constants.

Also applies to: 1604-1610, 1618-1624, 1632-1638, 1646-1652, 1660-1666


2067-2076: Root route registry exports for new routes look correct.
No gaps detected.

Also applies to: 2081-2083


85-92: All imported files with trailing underscores exist as intended.

Verification confirms all eight imports in the code snippet reference existing files in the routes directory. The trailing underscores (e.g., $baz_.bar.tsx, baz_.bar.tsx, {$baz}suffix_.bar.tsx) are intentional test fixtures for validating the router generator's handling of various file naming patterns.


558-643: Test coverage is complete for all new routes.

The params.spec.ts file includes comprehensive testing for all routes mentioned:

  • /params-ps/wildcard/$, /params-ps/wildcard/prefix{$}, /params-ps/wildcard/{$}suffix are tested via WILDCARD_PARAM_PAIRS with concrete values (foo, prefixfoo, foosuffix)
  • /params-ps/named/prefix{$foo}, /params-ps/named/{$foo}suffix are tested via NAMED_PARAMS_PAIRS with matching variants
  • /params-ps/non-nested/$foo/$bar is tested with foo/bar and foo2/bar2 parameter values

Tests validate link interpolation, navigation success, pathname accuracy, and parameter object correctness.


485-503: Remove concern about route shadowing; routes with identical paths but different parents are distinct.

Verification confirms the duplicate route IDs (e.g., multiple /foo entries) are intentional test matrix coverage. Each route's identity is determined by its path within the routing tree and its position (parent/child). The /foo routes found at lines 481, 493, 504, and 514 each have different parent routes, making them distinct routes in the tree—not shadowing conflicts. This is correct behavior for testing route paths across different parent contexts.

Likely an incorrect or invalid review comment.

Comment on lines +1 to +2
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/params-ps/named/{$foo}suffix')({
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add blank line after import statement.

The import statement should be followed by a blank line per project conventions.

Apply this diff:

 import { createFileRoute } from '@tanstack/solid-router'
+
 export const Route = createFileRoute('/params-ps/named/{$foo}suffix')({
📝 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.

Suggested change
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/params-ps/named/{$foo}suffix')({
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/params-ps/named/{$foo}suffix')({
🧰 Tools
🪛 ESLint

[error] 1-1: Expected 1 empty line after import statement not followed by another import.

(import/newline-after-import)

🤖 Prompt for AI Agents
In e2e/solid-router/basic-file-based/src/routes/params-ps/named/{$foo}suffix.tsx
around lines 1 to 2, the import statement is not followed by a blank line as
required by project conventions; insert a single blank line immediately after
the import statement so the file begins with the import, one empty line, then
the export/createFileRoute call.

Comment on lines +1 to +2
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/params-ps/named/prefix{$foo}')({
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add blank line after import statement.

The import statement should be followed by a blank line per project conventions.

Apply this diff:

 import { createFileRoute } from '@tanstack/solid-router'
+
 export const Route = createFileRoute('/params-ps/named/prefix{$foo}')({
📝 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.

Suggested change
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/params-ps/named/prefix{$foo}')({
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/params-ps/named/prefix{$foo}')({
🧰 Tools
🪛 ESLint

[error] 1-1: Expected 1 empty line after import statement not followed by another import.

(import/newline-after-import)

🤖 Prompt for AI Agents
In e2e/solid-router/basic-file-based/src/routes/params-ps/named/prefix{$foo}.tsx
lines 1-2, add a blank line after the import statement; modify the file so the
import line is followed by an empty line before the export statement to match
project conventions.

Comment on lines +1 to +2
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/params-ps/wildcard/$')({
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add blank line after import statement.

The import statement should be followed by a blank line per project conventions.

Apply this diff:

 import { createFileRoute } from '@tanstack/solid-router'
+
 export const Route = createFileRoute('/params-ps/wildcard/$')({
📝 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.

Suggested change
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/params-ps/wildcard/$')({
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/params-ps/wildcard/$')({
🧰 Tools
🪛 ESLint

[error] 1-1: Expected 1 empty line after import statement not followed by another import.

(import/newline-after-import)

🤖 Prompt for AI Agents
In e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/$.tsx around
lines 1 to 2, the import statement is not followed by a blank line per project
conventions; insert a single blank line immediately after the import statement
so there is an empty line between the import and the subsequent
export/createFileRoute call.

Comment on lines +1 to +2
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/params-ps/wildcard/prefix{$}')({
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add blank line after import statement.

The import statement should be followed by a blank line per project conventions.

Apply this diff:

 import { createFileRoute } from '@tanstack/solid-router'
+
 export const Route = createFileRoute('/params-ps/wildcard/prefix{$}')({
📝 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.

Suggested change
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/params-ps/wildcard/prefix{$}')({
import { createFileRoute } from '@tanstack/solid-router'
export const Route = createFileRoute('/params-ps/wildcard/prefix{$}')({
🧰 Tools
🪛 ESLint

[error] 1-1: Expected 1 empty line after import statement not followed by another import.

(import/newline-after-import)

🤖 Prompt for AI Agents
In e2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsx
around lines 1 to 2, the import statement is not followed by a blank line as
required by project conventions; insert a single blank line immediately after
the import statement so there is an empty line between the import and the
following export/createFileRoute call.

'/non-nested/suffix/{$baz}suffix': typeof NonNestedSuffixChar123bazChar125suffixRouteRouteWithChildren
'/params-ps/named/$foo': typeof ParamsPsNamedFooRouteRouteWithChildren
'/params-ps/non-nested/$foo_': typeof ParamsPsNonNestedFooRouteRouteWithChildren
'/params-ps/non-nested/$foo': typeof ParamsPsNonNestedFooRouteRouteWithChildren
Copy link
Contributor

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

FileRoutesById: ids normalized and new entries added.
Entries for named/wildcard and post edit look correct. Ensure no duplicate ids remain after normalization.

Also applies to: 766-770, 772-772, 782-784, 786-786, 789-789, 791-791, 793-793, 795-795


🏁 Script executed:

#!/bin/bash
# Detect duplicate keys within FileRoutesById export block
rg -nP "^\s*'/.*': typeof" e2e/solid-router/basic-file-based/src/routeTree.gen.ts \
 | sed -E "s/.*'(.+)'.*/\1/" | sort | uniq -d

Length of output: 1868


FileRoutesById contains duplicate route IDs—fix required.

Verification found 82 duplicate route identifiers in FileRoutesById (lines 761+). Duplicate keys in object literals cause only the last value to persist, breaking route resolution. Remove or consolidate duplicates to ensure each route ID is unique.

🤖 Prompt for AI Agents
In e2e/solid-router/basic-file-based/src/routeTree.gen.ts around line 761,
FileRoutesById contains duplicate route ID keys (82 duplicates starting at this
region) which causes later entries to overwrite earlier ones; locate the
duplicate object keys inside the FileRoutesById literal, remove or consolidate
duplicate entries so every route ID is unique (either merge route
metadata/children from duplicates into a single entry or remove the unintended
duplicates), and if duplicates originate from your route generator fix the
generator to produce unique IDs (e.g., include path or parent context) so the
emitted FileRoutesById no longer contains repeated keys.

@birkskyum birkskyum added this to the catch up solid to react milestone Oct 26, 2025
@birkskyum birkskyum merged commit a2aaf1f into main Oct 26, 2025
6 checks passed
@birkskyum birkskyum deleted the test(solid-router)--work-on-basic-file-based branch October 26, 2025 22:43
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