-
-
Couldn't load subscription status.
- Fork 1.3k
test(solid-router): add params test for basic file based #5642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis 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 Changes
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Areas requiring extra attention:
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
|
View your CI Pipeline Execution ↗ for commit 2cacf82
☁️ Nx Cloud last updated this comment at |
More templates
@tanstack/arktype-adapter
@tanstack/directive-functions-plugin
@tanstack/eslint-plugin-router
@tanstack/history
@tanstack/nitro-v2-vite-plugin
@tanstack/react-router
@tanstack/react-router-devtools
@tanstack/react-router-ssr-query
@tanstack/react-start
@tanstack/react-start-client
@tanstack/react-start-server
@tanstack/router-cli
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-devtools-core
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-ssr-query-core
@tanstack/router-utils
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/solid-router
@tanstack/solid-router-devtools
@tanstack/solid-router-ssr-query
@tanstack/solid-start
@tanstack/solid-start-client
@tanstack/solid-start-server
@tanstack/start-client-core
@tanstack/start-plugin-core
@tanstack/start-server-core
@tanstack/start-static-server-functions
@tanstack/start-storage-context
@tanstack/valibot-adapter
@tanstack/virtual-file-routes
@tanstack/zod-adapter
commit: |
There was a problem hiding this 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-psroutes (wildcard and named index routes) are mounted directly at/params-ps/wildcard/and/params-ps/named/, whereas theredirectpattern uses explicit container route files ($target.tsx) with index routes nested underneath. The suggestion to add container routes (wildcard.tsxandnamed.tsx) at theparams-pslevel 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
📒 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.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/named/index.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/index.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/$.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/named/{$foo}suffix.tsxe2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsxe2e/solid-router/basic-file-based/tests/params.spec.tse2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/named/prefix{$foo}.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsxe2e/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.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/named/index.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/index.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/$.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/named/{$foo}suffix.tsxe2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/named/prefix{$foo}.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsxe2e/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.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/index.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/named/index.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/index.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/$.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/named/{$foo}suffix.tsxe2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsxe2e/solid-router/basic-file-based/tests/params.spec.tse2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/named/prefix{$foo}.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/wildcard/prefix{$}.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsxe2e/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.tsxe2e/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_PAIRSandWILDCARD_PARAM_PAIRSeffectively 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/{$}suffixare tested via WILDCARD_PARAM_PAIRS with concrete values (foo, prefixfoo, foosuffix)/params-ps/named/prefix{$foo},/params-ps/named/{$foo}suffixare tested via NAMED_PARAMS_PAIRS with matching variants/params-ps/non-nested/$foo/$baris tested with foo/bar and foo2/bar2 parameter valuesTests 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
/fooentries) are intentional test matrix coverage. Each route's identity is determined by its path within the routing tree and its position (parent/child). The/fooroutes 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.
| import { createFileRoute } from '@tanstack/solid-router' | ||
| export const Route = createFileRoute('/params-ps/named/{$foo}suffix')({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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.
| import { createFileRoute } from '@tanstack/solid-router' | ||
| export const Route = createFileRoute('/params-ps/named/prefix{$foo}')({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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.
| import { createFileRoute } from '@tanstack/solid-router' | ||
| export const Route = createFileRoute('/params-ps/wildcard/$')({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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.
| import { createFileRoute } from '@tanstack/solid-router' | ||
| export const Route = createFileRoute('/params-ps/wildcard/prefix{$}')({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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 -dLength 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.
Summary by CodeRabbit
Release Notes
New Features
Tests
Chores