Skip to content

Conversation

@nlynzaad
Copy link
Contributor

@nlynzaad nlynzaad commented Oct 27, 2025

this PR just commits the default generated non-nested paths to avoid any unnecessary diffs when running e2e tests on solid-router-basic-file-based

Summary by CodeRabbit

  • Chores
    • Updated routing path identifiers across the router configuration to standardize naming conventions with trailing underscore segments.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 27, 2025

Walkthrough

Route identifiers and file-based route paths are updated throughout the solid-router test suite to include trailing underscores for dynamic segments and certain nested paths. The generated route tree is regenerated with updated id-to-route mappings, and multiple route file declarations are updated to reflect the new path strings passed to createFileRoute().

Changes

Cohort / File(s) Summary
Generated Route Tree
e2e/solid-router/basic-file-based/src/routeTree.gen.ts
Regenerated route tree with updated route identifiers incorporating trailing underscores (e.g., /posts_/$postId/edit, /non-nested/$foo_). Updated FileRoutesByFullPath, FileRoutesById, FileRoutesByTo, and FileRouteTypes type mappings to align with new route ids and path structures.
Non-nested Named Routes
e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx
Route path updated from /non-nested/named/$baz/bar to /non-nested/named/$baz_/bar in createFileRoute declaration.
Non-nested Path Routes
e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx
Route path updated from /non-nested/path/baz/bar to /non-nested/path/baz_/bar in createFileRoute declaration.
Non-nested Prefix Routes
e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
Route path updated from /non-nested/prefix/prefix{$baz}/bar to /non-nested/prefix/prefix{$baz}_/bar in createFileRoute declaration.
Non-nested Suffix Routes
e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx
Route path updated from /non-nested/suffix/{$baz}suffix/bar to /non-nested/suffix/{$baz}suffix_/bar in createFileRoute declaration.
Params-PS Routes
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/non-nested/$foo_/$bar.tsx
Route paths updated to include trailing underscores: /params-ps/non-nested/$foo/params-ps/non-nested/$foo_ and /params-ps/non-nested/$foo/$bar/params-ps/non-nested/$foo_/$bar.
Posts Routes
e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx
Route path updated from /posts/$postId/edit to /posts_/$postId/edit in createFileRoute declaration.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Primary focus: The generated routeTree.gen.ts file contains substantial changes to route identifiers, type mappings, and parent-child hierarchies that require careful verification to ensure consistency across all updated mappings.
  • Pattern consistency: While individual route file changes follow a homogeneous pattern (path string updates with trailing underscores), the coherence between the generated tree and individual file changes should be validated.
  • Type safety: Verify that all FileRoutesByFullPath, FileRoutesById, FileRoutesByTo, and FileRouteTypes entries are correctly aligned with the renamed routes.

Possibly related PRs

Suggested labels

package: solid-router

Suggested reviewers

  • schiller-manuel
  • Sheraff

Poem

🐰 Underscores sprouting where paths used to be,
Dynamic segments dressed in trailing anonymity,
Routes reorganized with precision and care,
The tree regenerated, a cleaner affair,
Non-nested now branded, underscore fair!

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): use default generated values in basic file based" is directly aligned with the stated PR objective, which explicitly indicates that the PR "commits default generated non-nested paths for the solid-router basic file-based tests." The title accurately refers to the actual change being made—the use of default generated values—which is reflected throughout the changeset where route paths are updated to follow generated patterns with trailing underscores. While the title could be more specific about the scope (e.g., mentioning "non-nested paths" or "route identifiers"), it successfully communicates the primary intent and purpose of the PR without being misleading or off-topic.
✨ 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 solid-router-nonnested-params

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d7ef773 and f97db17.

📒 Files selected for processing (8)
  • e2e/solid-router/basic-file-based/src/routeTree.gen.ts (19 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 (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/non-nested/prefix/prefix{$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/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
  • e2e/solid-router/basic-file-based/src/routeTree.gen.ts
  • e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx
**/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/basic-file-based/src/routes/non-nested/named/$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
  • e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.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/non-nested/prefix/prefix{$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/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
  • e2e/solid-router/basic-file-based/src/routeTree.gen.ts
  • e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx
🧠 Learnings (3)
📓 Common learnings
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.
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.
Learnt from: nlynzaad
PR: TanStack/router#5182
File: e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts:167-172
Timestamp: 2025-09-22T00:56:53.426Z
Learning: In TanStack Router, underscores are intentionally stripped from route segments during path parsing, but preserved in base path segments. This is the expected behavior implemented in PR #5182.
📚 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-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/basic-file-based/src/routeTree.gen.ts
🧬 Code graph analysis (7)
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/named/$baz_.bar.tsx (6)
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/non-nested/$foo_/$bar.tsx (1)
  • Route (4-6)
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/posts_.$postId.edit.tsx (1)
  • Route (4-6)
e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx (4)
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 (1)
  • Route (4-6)
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/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/posts_.$postId.edit.tsx (6)
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/non-nested/suffix/{$baz}suffix_.bar.tsx (1)
  • Route (3-5)
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/$foo_/route.tsx (1)
  • Route (3-3)
e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx (6)
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/params-ps/non-nested/$foo_/$bar.tsx (1)
  • Route (4-6)
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/posts_.$postId.edit.tsx (1)
  • Route (4-6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test
🔇 Additional comments (8)
e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx (1)

3-3: LGTM: path matches the non-nested default shape

The route id string aligns with the underscore convention and the generated route tree.

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

3-3: Consistent with underscore convention

The createFileRoute path matches the expected underscore placement for non-nested prefix cases.

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

3-3: Good: suffix route string matches the new pattern

Matches the coordinated updates across non-nested variants.

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

3-3: Matches the expected named-segment shape

Underscore placement for $baz_ is correct for the non-nested path baseline.

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

3-3: Looks good and consistent with the route tree

No issues spotted.

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

4-4: Code is correct as-is; useExperimentalNonNestedRoutes is a boolean and used properly.

Verification confirms useExperimentalNonNestedRoutes is a boolean const (environment-based flag), not a function. The usage in line 10 is correct—it's properly evaluated in a ternary expression without function invocation. The route path at line 4 is also correct.

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

4-4: Route id, toggle logic, and flag usage are all correct

Verification confirms:

  • The underscore in the route id (/posts_/$postId/edit) is correct for file-based routing.
  • The conditional toggle between 'posts' and 'posts_' properly aligns with the experimental non-nested path shape.
  • useExperimentalNonNestedRoutes is correctly used as a boolean value (not invoked as a function), evaluating to a boolean based on environment mode checks.
e2e/solid-router/basic-file-based/src/routeTree.gen.ts (1)

327-330: Generated route tree changes are internally consistent and properly formed

  • Verified across all mentioned routes: ids with underscores (non-nested defaults) correctly map to runtime fullPaths without underscores—posts edit, non-nested named/path variants, prefix/suffix, and params-ps routes all follow this pattern consistently.

Please confirm this file was regenerated (not hand-edited) using the project's standard codegen, and re-run e2e to ensure no snapshot diffs.


Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link

nx-cloud bot commented Oct 27, 2025

View your CI Pipeline Execution ↗ for commit f97db17

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

☁️ Nx Cloud last updated this comment at 2025-10-27 23:59:45 UTC

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