From bf5a6ab15c605e751538ed7232cea58462aa2862 Mon Sep 17 00:00:00 2001
From: Nico Lynzaad <nlynzaad@zylangroup.com>
Date: Mon, 22 Sep 2025 01:49:53 +0200
Subject: [PATCH 1/4] ensure only route segments are checked for trailing
 underscore

---
 packages/router-core/src/path.ts              | 32 ++++++++++++++-----
 .../router-core/src/process-route-tree.ts     |  4 +--
 2 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/packages/router-core/src/path.ts b/packages/router-core/src/path.ts
index 617685a10b..f69aa5e26e 100644
--- a/packages/router-core/src/path.ts
+++ b/packages/router-core/src/path.ts
@@ -161,8 +161,8 @@ export function resolvePath({
   base = removeBasepath(basepath, base, caseSensitive)
   to = removeBasepath(basepath, to, caseSensitive)
 
-  let baseSegments = parsePathname(base, parseCache).slice()
-  const toSegments = parsePathname(to, parseCache)
+  let baseSegments = parseBasePathSegments(base, parseCache).slice()
+  const toSegments = parseRoutePathSegments(to, parseCache)
 
   if (baseSegments.length > 1 && last(baseSegments)?.value === '/') {
     baseSegments.pop()
@@ -206,14 +206,26 @@ export function resolvePath({
 }
 
 export type ParsePathnameCache = LRUCache<string, ReadonlyArray<Segment>>
+
+export const parseBasePathSegments = (
+  pathname?: string,
+  cache?: ParsePathnameCache,
+): ReadonlyArray<Segment> => parsePathname(pathname, cache, true)
+
+export const parseRoutePathSegments = (
+  pathname?: string,
+  cache?: ParsePathnameCache,
+): ReadonlyArray<Segment> => parsePathname(pathname, cache, false)
+
 export const parsePathname = (
   pathname?: string,
   cache?: ParsePathnameCache,
+  basePathValues?: boolean,
 ): ReadonlyArray<Segment> => {
   if (!pathname) return []
   const cached = cache?.get(pathname)
   if (cached) return cached
-  const parsed = baseParsePathname(pathname)
+  const parsed = baseParsePathname(pathname, basePathValues)
   cache?.set(pathname, parsed)
   return parsed
 }
@@ -243,7 +255,10 @@ const WILDCARD_W_CURLY_BRACES_RE = /^(.*?)\{\$\}(.*)$/ // prefix{$}suffix
  * - `/foo/[$]{$foo} - Dynamic route with a static prefix of `$`
  * - `/foo/{$foo}[$]` - Dynamic route with a static suffix of `$`
  */
-function baseParsePathname(pathname: string): ReadonlyArray<Segment> {
+function baseParsePathname(
+  pathname: string,
+  basePathValues?: boolean,
+): ReadonlyArray<Segment> {
   pathname = cleanPath(pathname)
 
   const segments: Array<Segment> = []
@@ -266,7 +281,8 @@ function baseParsePathname(pathname: string): ReadonlyArray<Segment> {
   segments.push(
     ...split.map((part): Segment => {
       // strip tailing underscore for non-nested paths
-      const partToMatch = part.slice(-1) === '_' ? part.slice(0, -1) : part
+      const partToMatch =
+        !basePathValues && part.slice(-1) === '_' ? part.slice(0, -1) : part
 
       // Check for wildcard with curly braces: prefix{$}suffix
       const wildcardBracesMatch = partToMatch.match(WILDCARD_W_CURLY_BRACES_RE)
@@ -380,7 +396,7 @@ export function interpolatePath({
   decodeCharMap,
   parseCache,
 }: InterpolatePathOptions): InterPolatePathResult {
-  const interpolatedPathSegments = parsePathname(path, parseCache)
+  const interpolatedPathSegments = parseRoutePathSegments(path, parseCache)
 
   function encodeParam(key: string): any {
     const value = params[key]
@@ -580,11 +596,11 @@ export function matchByPath(
   to = removeBasepath(basepath, `${to ?? '$'}`, caseSensitive)
 
   // Parse the from and to
-  const baseSegments = parsePathname(
+  const baseSegments = parseBasePathSegments(
     from.startsWith('/') ? from : `/${from}`,
     parseCache,
   )
-  const routeSegments = parsePathname(
+  const routeSegments = parseRoutePathSegments(
     to.startsWith('/') ? to : `/${to}`,
     parseCache,
   )
diff --git a/packages/router-core/src/process-route-tree.ts b/packages/router-core/src/process-route-tree.ts
index a95c0a64e9..221cedc26d 100644
--- a/packages/router-core/src/process-route-tree.ts
+++ b/packages/router-core/src/process-route-tree.ts
@@ -3,7 +3,7 @@ import {
   SEGMENT_TYPE_OPTIONAL_PARAM,
   SEGMENT_TYPE_PARAM,
   SEGMENT_TYPE_PATHNAME,
-  parsePathname,
+  parseRoutePathSegments,
   trimPathLeft,
   trimPathRight,
 } from './path'
@@ -70,7 +70,7 @@ function sortRoutes<TRouteLike extends RouteLike>(
     }
 
     const trimmed = trimPathLeft(d.fullPath)
-    let parsed = parsePathname(trimmed)
+    let parsed = parseRoutePathSegments(trimmed)
 
     // Removes the leading slash if it is not the only remaining segment
     let skip = 0

From c551bf36a46e00c018ad622d383a529588e108d4 Mon Sep 17 00:00:00 2001
From: Nico Lynzaad <nlynzaad@zylangroup.com>
Date: Mon, 22 Sep 2025 01:50:49 +0200
Subject: [PATCH 2/4] update and restructure tests

---
 .../basic-file-based/src/routeTree.gen.ts     | 570 ++++++++++++++++--
 .../src/routes/non-nested/baz.$bazid.tsx      |  23 -
 .../src/routes/non-nested/baz.tsx             |  14 -
 .../routes/non-nested/baz_.$bazid.edit.tsx    |  22 -
 .../src/routes/non-nested/named/$baz.foo.tsx  |  20 +
 .../routes/non-nested/named/$baz.index.tsx    |  19 +
 .../routes/non-nested/named/$baz.route.tsx    |  16 +
 .../src/routes/non-nested/named/$baz_.bar.tsx |  19 +
 .../src/routes/non-nested/named/route.tsx     |  58 ++
 .../src/routes/non-nested/path/baz.foo.tsx    |  20 +
 .../src/routes/non-nested/path/baz.index.tsx  |  19 +
 .../src/routes/non-nested/path/baz.route.tsx  |  16 +
 .../src/routes/non-nested/path/baz_.bar.tsx   |  19 +
 .../src/routes/non-nested/path/route.tsx      |  33 +
 .../non-nested/prefix/prefix{$baz}.foo.tsx    |  20 +
 .../non-nested/prefix/prefix{$baz}.index.tsx  |  19 +
 .../non-nested/prefix/prefix{$baz}.route.tsx  |  16 +
 .../non-nested/prefix/prefix{$baz}_.bar.tsx   |  19 +
 .../src/routes/non-nested/prefix/route.tsx    |  58 ++
 .../src/routes/non-nested/route.tsx           |  26 +-
 .../src/routes/non-nested/suffix/route.tsx    |  58 ++
 .../non-nested/suffix/{$baz}suffix.foo.tsx    |  20 +
 .../non-nested/suffix/{$baz}suffix.index.tsx  |  19 +
 .../non-nested/suffix/{$baz}suffix.route.tsx  |  16 +
 .../non-nested/suffix/{$baz}suffix_.bar.tsx   |  19 +
 .../basic-file-based/tests/app.spec.ts        |  35 --
 .../tests/non-nested-paths.spec.ts            | 192 ++++++
 .../router-core/tests/match-by-path.test.ts   |  16 +-
 packages/router-core/tests/path.test.ts       |  38 ++
 29 files changed, 1257 insertions(+), 182 deletions(-)
 delete mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/baz.$bazid.tsx
 delete mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/baz.tsx
 delete mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/baz_.$bazid.edit.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.foo.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.index.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.route.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/named/route.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.foo.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.index.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.route.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/path/route.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.foo.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.index.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.route.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/prefix/route.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/suffix/route.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.foo.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.index.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.route.tsx
 create mode 100644 e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx
 create mode 100644 e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts

diff --git a/e2e/react-router/basic-file-based/src/routeTree.gen.ts b/e2e/react-router/basic-file-based/src/routeTree.gen.ts
index 2daaf9a821..5c4c85f21c 100644
--- a/e2e/react-router/basic-file-based/src/routeTree.gen.ts
+++ b/e2e/react-router/basic-file-based/src/routeTree.gen.ts
@@ -32,7 +32,6 @@ import { Route as StructuralSharingEnabledRouteImport } from './routes/structura
 import { Route as SearchParamsDefaultRouteImport } from './routes/search-params/default'
 import { Route as RedirectTargetRouteImport } from './routes/redirect/$target'
 import { Route as PostsPostIdRouteImport } from './routes/posts.$postId'
-import { Route as NonNestedBazRouteImport } from './routes/non-nested/baz'
 import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2'
 import { Route as groupLazyinsideRouteImport } from './routes/(group)/lazyinside'
 import { Route as groupInsideRouteImport } from './routes/(group)/inside'
@@ -41,6 +40,10 @@ import { Route as anotherGroupOnlyrouteinsideRouteImport } from './routes/(anoth
 import { Route as RelativeUseNavigateRouteRouteImport } from './routes/relative/useNavigate/route'
 import { Route as RelativeLinkRouteRouteImport } from './routes/relative/link/route'
 import { Route as ParamsPsNonNestedRouteRouteImport } from './routes/params-ps/non-nested/route'
+import { Route as NonNestedSuffixRouteRouteImport } from './routes/non-nested/suffix/route'
+import { Route as NonNestedPrefixRouteRouteImport } from './routes/non-nested/prefix/route'
+import { Route as NonNestedPathRouteRouteImport } from './routes/non-nested/path/route'
+import { Route as NonNestedNamedRouteRouteImport } from './routes/non-nested/named/route'
 import { Route as RedirectTargetIndexRouteImport } from './routes/redirect/$target/index'
 import { Route as ParamsPsWildcardIndexRouteImport } from './routes/params-ps/wildcard/index'
 import { Route as ParamsPsNamedIndexRouteImport } from './routes/params-ps/named/index'
@@ -60,21 +63,35 @@ import { Route as ParamsPsWildcardPrefixChar123Char125RouteImport } from './rout
 import { Route as ParamsPsWildcardSplatRouteImport } from './routes/params-ps/wildcard/$'
 import { Route as ParamsPsNamedChar123fooChar125suffixRouteImport } from './routes/params-ps/named/{$foo}suffix'
 import { Route as ParamsPsNamedPrefixChar123fooChar125RouteImport } from './routes/params-ps/named/prefix{$foo}'
-import { Route as NonNestedBazBazidRouteImport } from './routes/non-nested/baz.$bazid'
 import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b'
 import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a'
 import { Route as groupSubfolderInsideRouteImport } from './routes/(group)/subfolder/inside'
 import { Route as groupLayoutInsidelayoutRouteImport } from './routes/(group)/_layout.insidelayout'
 import { Route as ParamsPsNonNestedFooRouteRouteImport } from './routes/params-ps/non-nested/$foo_/route'
 import { Route as ParamsPsNamedFooRouteRouteImport } from './routes/params-ps/named/$foo/route'
+import { Route as NonNestedSuffixChar123bazChar125suffixRouteRouteImport } from './routes/non-nested/suffix/{$baz}suffix.route'
+import { Route as NonNestedPrefixPrefixChar123bazChar125RouteRouteImport } from './routes/non-nested/prefix/prefix{$baz}.route'
+import { Route as NonNestedPathBazRouteRouteImport } from './routes/non-nested/path/baz.route'
+import { Route as NonNestedNamedBazRouteRouteImport } from './routes/non-nested/named/$baz.route'
 import { Route as RelativeUseNavigateWithSearchIndexRouteImport } from './routes/relative/useNavigate/with-search/index'
 import { Route as RelativeUseNavigatePathIndexRouteImport } from './routes/relative/useNavigate/path/index'
 import { Route as RelativeUseNavigateNestedIndexRouteImport } from './routes/relative/useNavigate/nested/index'
 import { Route as RelativeLinkWithSearchIndexRouteImport } from './routes/relative/link/with-search/index'
 import { Route as RelativeLinkPathIndexRouteImport } from './routes/relative/link/path/index'
 import { Route as RelativeLinkNestedIndexRouteImport } from './routes/relative/link/nested/index'
+import { Route as NonNestedSuffixChar123bazChar125suffixIndexRouteImport } from './routes/non-nested/suffix/{$baz}suffix.index'
+import { Route as NonNestedPrefixPrefixChar123bazChar125IndexRouteImport } from './routes/non-nested/prefix/prefix{$baz}.index'
+import { Route as NonNestedPathBazIndexRouteImport } from './routes/non-nested/path/baz.index'
+import { Route as NonNestedNamedBazIndexRouteImport } from './routes/non-nested/named/$baz.index'
 import { Route as ParamsPsNonNestedFooBarRouteImport } from './routes/params-ps/non-nested/$foo_/$bar'
-import { Route as NonNestedBazBazidEditRouteImport } from './routes/non-nested/baz_.$bazid.edit'
+import { Route as NonNestedSuffixChar123bazChar125suffixBarRouteImport } from './routes/non-nested/suffix/{$baz}suffix_.bar'
+import { Route as NonNestedSuffixChar123bazChar125suffixFooRouteImport } from './routes/non-nested/suffix/{$baz}suffix.foo'
+import { Route as NonNestedPrefixPrefixChar123bazChar125BarRouteImport } from './routes/non-nested/prefix/prefix{$baz}_.bar'
+import { Route as NonNestedPrefixPrefixChar123bazChar125FooRouteImport } from './routes/non-nested/prefix/prefix{$baz}.foo'
+import { Route as NonNestedPathBazBarRouteImport } from './routes/non-nested/path/baz_.bar'
+import { Route as NonNestedPathBazFooRouteImport } from './routes/non-nested/path/baz.foo'
+import { Route as NonNestedNamedBazBarRouteImport } from './routes/non-nested/named/$baz_.bar'
+import { Route as NonNestedNamedBazFooRouteImport } from './routes/non-nested/named/$baz.foo'
 import { Route as ParamsPsNamedFooBarRouteRouteImport } from './routes/params-ps/named/$foo/$bar.route'
 import { Route as RelativeUseNavigatePathPathIndexRouteImport } from './routes/relative/useNavigate/path/$path/index'
 import { Route as RelativeUseNavigateNestedDeepIndexRouteImport } from './routes/relative/useNavigate/nested/deep/index'
@@ -194,11 +211,6 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({
   path: '/$postId',
   getParentRoute: () => PostsRoute,
 } as any)
-const NonNestedBazRoute = NonNestedBazRouteImport.update({
-  id: '/baz',
-  path: '/baz',
-  getParentRoute: () => NonNestedRouteRoute,
-} as any)
 const LayoutLayout2Route = LayoutLayout2RouteImport.update({
   id: '/_layout-2',
   getParentRoute: () => LayoutRoute,
@@ -241,6 +253,26 @@ const ParamsPsNonNestedRouteRoute = ParamsPsNonNestedRouteRouteImport.update({
   path: '/params-ps/non-nested',
   getParentRoute: () => rootRouteImport,
 } as any)
+const NonNestedSuffixRouteRoute = NonNestedSuffixRouteRouteImport.update({
+  id: '/suffix',
+  path: '/suffix',
+  getParentRoute: () => NonNestedRouteRoute,
+} as any)
+const NonNestedPrefixRouteRoute = NonNestedPrefixRouteRouteImport.update({
+  id: '/prefix',
+  path: '/prefix',
+  getParentRoute: () => NonNestedRouteRoute,
+} as any)
+const NonNestedPathRouteRoute = NonNestedPathRouteRouteImport.update({
+  id: '/path',
+  path: '/path',
+  getParentRoute: () => NonNestedRouteRoute,
+} as any)
+const NonNestedNamedRouteRoute = NonNestedNamedRouteRouteImport.update({
+  id: '/named',
+  path: '/named',
+  getParentRoute: () => NonNestedRouteRoute,
+} as any)
 const RedirectTargetIndexRoute = RedirectTargetIndexRouteImport.update({
   id: '/',
   path: '/',
@@ -345,11 +377,6 @@ const ParamsPsNamedPrefixChar123fooChar125Route =
     path: '/params-ps/named/prefix{$foo}',
     getParentRoute: () => rootRouteImport,
   } as any)
-const NonNestedBazBazidRoute = NonNestedBazBazidRouteImport.update({
-  id: '/$bazid',
-  path: '/$bazid',
-  getParentRoute: () => NonNestedBazRoute,
-} as any)
 const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({
   id: '/layout-b',
   path: '/layout-b',
@@ -381,6 +408,28 @@ const ParamsPsNamedFooRouteRoute = ParamsPsNamedFooRouteRouteImport.update({
   path: '/params-ps/named/$foo',
   getParentRoute: () => rootRouteImport,
 } as any)
+const NonNestedSuffixChar123bazChar125suffixRouteRoute =
+  NonNestedSuffixChar123bazChar125suffixRouteRouteImport.update({
+    id: '/{$baz}suffix',
+    path: '/{$baz}suffix',
+    getParentRoute: () => NonNestedSuffixRouteRoute,
+  } as any)
+const NonNestedPrefixPrefixChar123bazChar125RouteRoute =
+  NonNestedPrefixPrefixChar123bazChar125RouteRouteImport.update({
+    id: '/prefix{$baz}',
+    path: '/prefix{$baz}',
+    getParentRoute: () => NonNestedPrefixRouteRoute,
+  } as any)
+const NonNestedPathBazRouteRoute = NonNestedPathBazRouteRouteImport.update({
+  id: '/baz',
+  path: '/baz',
+  getParentRoute: () => NonNestedPathRouteRoute,
+} as any)
+const NonNestedNamedBazRouteRoute = NonNestedNamedBazRouteRouteImport.update({
+  id: '/$baz',
+  path: '/$baz',
+  getParentRoute: () => NonNestedNamedRouteRoute,
+} as any)
 const RelativeUseNavigateWithSearchIndexRoute =
   RelativeUseNavigateWithSearchIndexRouteImport.update({
     id: '/with-search/',
@@ -415,15 +464,76 @@ const RelativeLinkNestedIndexRoute = RelativeLinkNestedIndexRouteImport.update({
   path: '/nested/',
   getParentRoute: () => RelativeLinkRouteRoute,
 } as any)
+const NonNestedSuffixChar123bazChar125suffixIndexRoute =
+  NonNestedSuffixChar123bazChar125suffixIndexRouteImport.update({
+    id: '/',
+    path: '/',
+    getParentRoute: () => NonNestedSuffixChar123bazChar125suffixRouteRoute,
+  } as any)
+const NonNestedPrefixPrefixChar123bazChar125IndexRoute =
+  NonNestedPrefixPrefixChar123bazChar125IndexRouteImport.update({
+    id: '/',
+    path: '/',
+    getParentRoute: () => NonNestedPrefixPrefixChar123bazChar125RouteRoute,
+  } as any)
+const NonNestedPathBazIndexRoute = NonNestedPathBazIndexRouteImport.update({
+  id: '/',
+  path: '/',
+  getParentRoute: () => NonNestedPathBazRouteRoute,
+} as any)
+const NonNestedNamedBazIndexRoute = NonNestedNamedBazIndexRouteImport.update({
+  id: '/',
+  path: '/',
+  getParentRoute: () => NonNestedNamedBazRouteRoute,
+} as any)
 const ParamsPsNonNestedFooBarRoute = ParamsPsNonNestedFooBarRouteImport.update({
   id: '/$bar',
   path: '/$bar',
   getParentRoute: () => ParamsPsNonNestedFooRouteRoute,
 } as any)
-const NonNestedBazBazidEditRoute = NonNestedBazBazidEditRouteImport.update({
-  id: '/baz_/$bazid/edit',
-  path: '/baz/$bazid/edit',
-  getParentRoute: () => NonNestedRouteRoute,
+const NonNestedSuffixChar123bazChar125suffixBarRoute =
+  NonNestedSuffixChar123bazChar125suffixBarRouteImport.update({
+    id: '/{$baz}suffix_/bar',
+    path: '/{$baz}suffix/bar',
+    getParentRoute: () => NonNestedSuffixRouteRoute,
+  } as any)
+const NonNestedSuffixChar123bazChar125suffixFooRoute =
+  NonNestedSuffixChar123bazChar125suffixFooRouteImport.update({
+    id: '/foo',
+    path: '/foo',
+    getParentRoute: () => NonNestedSuffixChar123bazChar125suffixRouteRoute,
+  } as any)
+const NonNestedPrefixPrefixChar123bazChar125BarRoute =
+  NonNestedPrefixPrefixChar123bazChar125BarRouteImport.update({
+    id: '/prefix{$baz}_/bar',
+    path: '/prefix{$baz}/bar',
+    getParentRoute: () => NonNestedPrefixRouteRoute,
+  } as any)
+const NonNestedPrefixPrefixChar123bazChar125FooRoute =
+  NonNestedPrefixPrefixChar123bazChar125FooRouteImport.update({
+    id: '/foo',
+    path: '/foo',
+    getParentRoute: () => NonNestedPrefixPrefixChar123bazChar125RouteRoute,
+  } as any)
+const NonNestedPathBazBarRoute = NonNestedPathBazBarRouteImport.update({
+  id: '/baz_/bar',
+  path: '/baz/bar',
+  getParentRoute: () => NonNestedPathRouteRoute,
+} as any)
+const NonNestedPathBazFooRoute = NonNestedPathBazFooRouteImport.update({
+  id: '/foo',
+  path: '/foo',
+  getParentRoute: () => NonNestedPathBazRouteRoute,
+} as any)
+const NonNestedNamedBazBarRoute = NonNestedNamedBazBarRouteImport.update({
+  id: '/$baz_/bar',
+  path: '/$baz/bar',
+  getParentRoute: () => NonNestedNamedRouteRoute,
+} as any)
+const NonNestedNamedBazFooRoute = NonNestedNamedBazFooRouteImport.update({
+  id: '/foo',
+  path: '/foo',
+  getParentRoute: () => NonNestedNamedBazRouteRoute,
 } as any)
 const ParamsPsNamedFooBarRouteRoute =
   ParamsPsNamedFooBarRouteRouteImport.update({
@@ -473,13 +583,16 @@ export interface FileRoutesByFullPath {
   '/posts': typeof PostsRouteWithChildren
   '/remountDeps': typeof RemountDepsRoute
   '/대한민국': typeof Char45824Char54620Char48124Char44397Route
+  '/non-nested/named': typeof NonNestedNamedRouteRouteWithChildren
+  '/non-nested/path': typeof NonNestedPathRouteRouteWithChildren
+  '/non-nested/prefix': typeof NonNestedPrefixRouteRouteWithChildren
+  '/non-nested/suffix': typeof NonNestedSuffixRouteRouteWithChildren
   '/params-ps/non-nested': typeof ParamsPsNonNestedRouteRouteWithChildren
   '/relative/link': typeof RelativeLinkRouteRouteWithChildren
   '/relative/useNavigate': typeof RelativeUseNavigateRouteRouteWithChildren
   '/onlyrouteinside': typeof anotherGroupOnlyrouteinsideRoute
   '/inside': typeof groupInsideRoute
   '/lazyinside': typeof groupLazyinsideRoute
-  '/non-nested/baz': typeof NonNestedBazRouteWithChildren
   '/posts/$postId': typeof PostsPostIdRoute
   '/redirect/$target': typeof RedirectTargetRouteWithChildren
   '/search-params/default': typeof SearchParamsDefaultRoute
@@ -489,13 +602,16 @@ export interface FileRoutesByFullPath {
   '/redirect': typeof RedirectIndexRoute
   '/relative': typeof RelativeIndexRoute
   '/search-params/': typeof SearchParamsIndexRoute
+  '/non-nested/named/$baz': typeof NonNestedNamedBazRouteRouteWithChildren
+  '/non-nested/path/baz': typeof NonNestedPathBazRouteRouteWithChildren
+  '/non-nested/prefix/prefix{$baz}': typeof NonNestedPrefixPrefixChar123bazChar125RouteRouteWithChildren
+  '/non-nested/suffix/{$baz}suffix': typeof NonNestedSuffixChar123bazChar125suffixRouteRouteWithChildren
   '/params-ps/named/$foo': typeof ParamsPsNamedFooRouteRouteWithChildren
   '/params-ps/non-nested/$foo': typeof ParamsPsNonNestedFooRouteRouteWithChildren
   '/insidelayout': typeof groupLayoutInsidelayoutRoute
   '/subfolder/inside': typeof groupSubfolderInsideRoute
   '/layout-a': typeof LayoutLayout2LayoutARoute
   '/layout-b': typeof LayoutLayout2LayoutBRoute
-  '/non-nested/baz/$bazid': typeof NonNestedBazBazidRoute
   '/params-ps/named/prefix{$foo}': typeof ParamsPsNamedPrefixChar123fooChar125Route
   '/params-ps/named/{$foo}suffix': typeof ParamsPsNamedChar123fooChar125suffixRoute
   '/params-ps/wildcard/$': typeof ParamsPsWildcardSplatRoute
@@ -516,8 +632,19 @@ export interface FileRoutesByFullPath {
   '/params-ps/wildcard': typeof ParamsPsWildcardIndexRoute
   '/redirect/$target/': typeof RedirectTargetIndexRoute
   '/params-ps/named/$foo/$bar': typeof ParamsPsNamedFooBarRouteRouteWithChildren
-  '/non-nested/baz/$bazid/edit': typeof NonNestedBazBazidEditRoute
+  '/non-nested/named/$baz/foo': typeof NonNestedNamedBazFooRoute
+  '/non-nested/named/$baz/bar': typeof NonNestedNamedBazBarRoute
+  '/non-nested/path/baz/foo': typeof NonNestedPathBazFooRoute
+  '/non-nested/path/baz/bar': typeof NonNestedPathBazBarRoute
+  '/non-nested/prefix/prefix{$baz}/foo': typeof NonNestedPrefixPrefixChar123bazChar125FooRoute
+  '/non-nested/prefix/prefix{$baz}/bar': typeof NonNestedPrefixPrefixChar123bazChar125BarRoute
+  '/non-nested/suffix/{$baz}suffix/foo': typeof NonNestedSuffixChar123bazChar125suffixFooRoute
+  '/non-nested/suffix/{$baz}suffix/bar': typeof NonNestedSuffixChar123bazChar125suffixBarRoute
   '/params-ps/non-nested/$foo/$bar': typeof ParamsPsNonNestedFooBarRoute
+  '/non-nested/named/$baz/': typeof NonNestedNamedBazIndexRoute
+  '/non-nested/path/baz/': typeof NonNestedPathBazIndexRoute
+  '/non-nested/prefix/prefix{$baz}/': typeof NonNestedPrefixPrefixChar123bazChar125IndexRoute
+  '/non-nested/suffix/{$baz}suffix/': typeof NonNestedSuffixChar123bazChar125suffixIndexRoute
   '/relative/link/nested': typeof RelativeLinkNestedIndexRoute
   '/relative/link/path': typeof RelativeLinkPathIndexRoute
   '/relative/link/with-search': typeof RelativeLinkWithSearchIndexRoute
@@ -540,13 +667,16 @@ export interface FileRoutesByTo {
   '/notRemountDeps': typeof NotRemountDepsRoute
   '/remountDeps': typeof RemountDepsRoute
   '/대한민국': typeof Char45824Char54620Char48124Char44397Route
+  '/non-nested/named': typeof NonNestedNamedRouteRouteWithChildren
+  '/non-nested/path': typeof NonNestedPathRouteRouteWithChildren
+  '/non-nested/prefix': typeof NonNestedPrefixRouteRouteWithChildren
+  '/non-nested/suffix': typeof NonNestedSuffixRouteRouteWithChildren
   '/params-ps/non-nested': typeof ParamsPsNonNestedRouteRouteWithChildren
   '/relative/link': typeof RelativeLinkRouteRouteWithChildren
   '/relative/useNavigate': typeof RelativeUseNavigateRouteRouteWithChildren
   '/onlyrouteinside': typeof anotherGroupOnlyrouteinsideRoute
   '/inside': typeof groupInsideRoute
   '/lazyinside': typeof groupLazyinsideRoute
-  '/non-nested/baz': typeof NonNestedBazRouteWithChildren
   '/posts/$postId': typeof PostsPostIdRoute
   '/search-params/default': typeof SearchParamsDefaultRoute
   '/structural-sharing/$enabled': typeof StructuralSharingEnabledRoute
@@ -561,7 +691,6 @@ export interface FileRoutesByTo {
   '/subfolder/inside': typeof groupSubfolderInsideRoute
   '/layout-a': typeof LayoutLayout2LayoutARoute
   '/layout-b': typeof LayoutLayout2LayoutBRoute
-  '/non-nested/baz/$bazid': typeof NonNestedBazBazidRoute
   '/params-ps/named/prefix{$foo}': typeof ParamsPsNamedPrefixChar123fooChar125Route
   '/params-ps/named/{$foo}suffix': typeof ParamsPsNamedChar123fooChar125suffixRoute
   '/params-ps/wildcard/$': typeof ParamsPsWildcardSplatRoute
@@ -582,8 +711,19 @@ export interface FileRoutesByTo {
   '/params-ps/wildcard': typeof ParamsPsWildcardIndexRoute
   '/redirect/$target': typeof RedirectTargetIndexRoute
   '/params-ps/named/$foo/$bar': typeof ParamsPsNamedFooBarRouteRouteWithChildren
-  '/non-nested/baz/$bazid/edit': typeof NonNestedBazBazidEditRoute
+  '/non-nested/named/$baz/foo': typeof NonNestedNamedBazFooRoute
+  '/non-nested/named/$baz/bar': typeof NonNestedNamedBazBarRoute
+  '/non-nested/path/baz/foo': typeof NonNestedPathBazFooRoute
+  '/non-nested/path/baz/bar': typeof NonNestedPathBazBarRoute
+  '/non-nested/prefix/prefix{$baz}/foo': typeof NonNestedPrefixPrefixChar123bazChar125FooRoute
+  '/non-nested/prefix/prefix{$baz}/bar': typeof NonNestedPrefixPrefixChar123bazChar125BarRoute
+  '/non-nested/suffix/{$baz}suffix/foo': typeof NonNestedSuffixChar123bazChar125suffixFooRoute
+  '/non-nested/suffix/{$baz}suffix/bar': typeof NonNestedSuffixChar123bazChar125suffixBarRoute
   '/params-ps/non-nested/$foo/$bar': typeof ParamsPsNonNestedFooBarRoute
+  '/non-nested/named/$baz': typeof NonNestedNamedBazIndexRoute
+  '/non-nested/path/baz': typeof NonNestedPathBazIndexRoute
+  '/non-nested/prefix/prefix{$baz}': typeof NonNestedPrefixPrefixChar123bazChar125IndexRoute
+  '/non-nested/suffix/{$baz}suffix': typeof NonNestedSuffixChar123bazChar125suffixIndexRoute
   '/relative/link/nested': typeof RelativeLinkNestedIndexRoute
   '/relative/link/path': typeof RelativeLinkPathIndexRoute
   '/relative/link/with-search': typeof RelativeLinkWithSearchIndexRoute
@@ -610,6 +750,10 @@ export interface FileRoutesById {
   '/posts': typeof PostsRouteWithChildren
   '/remountDeps': typeof RemountDepsRoute
   '/대한민국': typeof Char45824Char54620Char48124Char44397Route
+  '/non-nested/named': typeof NonNestedNamedRouteRouteWithChildren
+  '/non-nested/path': typeof NonNestedPathRouteRouteWithChildren
+  '/non-nested/prefix': typeof NonNestedPrefixRouteRouteWithChildren
+  '/non-nested/suffix': typeof NonNestedSuffixRouteRouteWithChildren
   '/params-ps/non-nested': typeof ParamsPsNonNestedRouteRouteWithChildren
   '/relative/link': typeof RelativeLinkRouteRouteWithChildren
   '/relative/useNavigate': typeof RelativeUseNavigateRouteRouteWithChildren
@@ -619,7 +763,6 @@ export interface FileRoutesById {
   '/(group)/inside': typeof groupInsideRoute
   '/(group)/lazyinside': typeof groupLazyinsideRoute
   '/_layout/_layout-2': typeof LayoutLayout2RouteWithChildren
-  '/non-nested/baz': typeof NonNestedBazRouteWithChildren
   '/posts/$postId': typeof PostsPostIdRoute
   '/redirect/$target': typeof RedirectTargetRouteWithChildren
   '/search-params/default': typeof SearchParamsDefaultRoute
@@ -629,13 +772,16 @@ export interface FileRoutesById {
   '/redirect/': typeof RedirectIndexRoute
   '/relative/': typeof RelativeIndexRoute
   '/search-params/': typeof SearchParamsIndexRoute
+  '/non-nested/named/$baz': typeof NonNestedNamedBazRouteRouteWithChildren
+  '/non-nested/path/baz': typeof NonNestedPathBazRouteRouteWithChildren
+  '/non-nested/prefix/prefix{$baz}': typeof NonNestedPrefixPrefixChar123bazChar125RouteRouteWithChildren
+  '/non-nested/suffix/{$baz}suffix': typeof NonNestedSuffixChar123bazChar125suffixRouteRouteWithChildren
   '/params-ps/named/$foo': typeof ParamsPsNamedFooRouteRouteWithChildren
   '/params-ps/non-nested/$foo_': typeof ParamsPsNonNestedFooRouteRouteWithChildren
   '/(group)/_layout/insidelayout': typeof groupLayoutInsidelayoutRoute
   '/(group)/subfolder/inside': typeof groupSubfolderInsideRoute
   '/_layout/_layout-2/layout-a': typeof LayoutLayout2LayoutARoute
   '/_layout/_layout-2/layout-b': typeof LayoutLayout2LayoutBRoute
-  '/non-nested/baz/$bazid': typeof NonNestedBazBazidRoute
   '/params-ps/named/prefix{$foo}': typeof ParamsPsNamedPrefixChar123fooChar125Route
   '/params-ps/named/{$foo}suffix': typeof ParamsPsNamedChar123fooChar125suffixRoute
   '/params-ps/wildcard/$': typeof ParamsPsWildcardSplatRoute
@@ -656,8 +802,19 @@ export interface FileRoutesById {
   '/params-ps/wildcard/': typeof ParamsPsWildcardIndexRoute
   '/redirect/$target/': typeof RedirectTargetIndexRoute
   '/params-ps/named/$foo/$bar': typeof ParamsPsNamedFooBarRouteRouteWithChildren
-  '/non-nested/baz_/$bazid/edit': typeof NonNestedBazBazidEditRoute
+  '/non-nested/named/$baz/foo': typeof NonNestedNamedBazFooRoute
+  '/non-nested/named/$baz_/bar': typeof NonNestedNamedBazBarRoute
+  '/non-nested/path/baz/foo': typeof NonNestedPathBazFooRoute
+  '/non-nested/path/baz_/bar': typeof NonNestedPathBazBarRoute
+  '/non-nested/prefix/prefix{$baz}/foo': typeof NonNestedPrefixPrefixChar123bazChar125FooRoute
+  '/non-nested/prefix/prefix{$baz}_/bar': typeof NonNestedPrefixPrefixChar123bazChar125BarRoute
+  '/non-nested/suffix/{$baz}suffix/foo': typeof NonNestedSuffixChar123bazChar125suffixFooRoute
+  '/non-nested/suffix/{$baz}suffix_/bar': typeof NonNestedSuffixChar123bazChar125suffixBarRoute
   '/params-ps/non-nested/$foo_/$bar': typeof ParamsPsNonNestedFooBarRoute
+  '/non-nested/named/$baz/': typeof NonNestedNamedBazIndexRoute
+  '/non-nested/path/baz/': typeof NonNestedPathBazIndexRoute
+  '/non-nested/prefix/prefix{$baz}/': typeof NonNestedPrefixPrefixChar123bazChar125IndexRoute
+  '/non-nested/suffix/{$baz}suffix/': typeof NonNestedSuffixChar123bazChar125suffixIndexRoute
   '/relative/link/nested/': typeof RelativeLinkNestedIndexRoute
   '/relative/link/path/': typeof RelativeLinkPathIndexRoute
   '/relative/link/with-search/': typeof RelativeLinkWithSearchIndexRoute
@@ -684,13 +841,16 @@ export interface FileRouteTypes {
     | '/posts'
     | '/remountDeps'
     | '/대한민국'
+    | '/non-nested/named'
+    | '/non-nested/path'
+    | '/non-nested/prefix'
+    | '/non-nested/suffix'
     | '/params-ps/non-nested'
     | '/relative/link'
     | '/relative/useNavigate'
     | '/onlyrouteinside'
     | '/inside'
     | '/lazyinside'
-    | '/non-nested/baz'
     | '/posts/$postId'
     | '/redirect/$target'
     | '/search-params/default'
@@ -700,13 +860,16 @@ export interface FileRouteTypes {
     | '/redirect'
     | '/relative'
     | '/search-params/'
+    | '/non-nested/named/$baz'
+    | '/non-nested/path/baz'
+    | '/non-nested/prefix/prefix{$baz}'
+    | '/non-nested/suffix/{$baz}suffix'
     | '/params-ps/named/$foo'
     | '/params-ps/non-nested/$foo'
     | '/insidelayout'
     | '/subfolder/inside'
     | '/layout-a'
     | '/layout-b'
-    | '/non-nested/baz/$bazid'
     | '/params-ps/named/prefix{$foo}'
     | '/params-ps/named/{$foo}suffix'
     | '/params-ps/wildcard/$'
@@ -727,8 +890,19 @@ export interface FileRouteTypes {
     | '/params-ps/wildcard'
     | '/redirect/$target/'
     | '/params-ps/named/$foo/$bar'
-    | '/non-nested/baz/$bazid/edit'
+    | '/non-nested/named/$baz/foo'
+    | '/non-nested/named/$baz/bar'
+    | '/non-nested/path/baz/foo'
+    | '/non-nested/path/baz/bar'
+    | '/non-nested/prefix/prefix{$baz}/foo'
+    | '/non-nested/prefix/prefix{$baz}/bar'
+    | '/non-nested/suffix/{$baz}suffix/foo'
+    | '/non-nested/suffix/{$baz}suffix/bar'
     | '/params-ps/non-nested/$foo/$bar'
+    | '/non-nested/named/$baz/'
+    | '/non-nested/path/baz/'
+    | '/non-nested/prefix/prefix{$baz}/'
+    | '/non-nested/suffix/{$baz}suffix/'
     | '/relative/link/nested'
     | '/relative/link/path'
     | '/relative/link/with-search'
@@ -751,13 +925,16 @@ export interface FileRouteTypes {
     | '/notRemountDeps'
     | '/remountDeps'
     | '/대한민국'
+    | '/non-nested/named'
+    | '/non-nested/path'
+    | '/non-nested/prefix'
+    | '/non-nested/suffix'
     | '/params-ps/non-nested'
     | '/relative/link'
     | '/relative/useNavigate'
     | '/onlyrouteinside'
     | '/inside'
     | '/lazyinside'
-    | '/non-nested/baz'
     | '/posts/$postId'
     | '/search-params/default'
     | '/structural-sharing/$enabled'
@@ -772,7 +949,6 @@ export interface FileRouteTypes {
     | '/subfolder/inside'
     | '/layout-a'
     | '/layout-b'
-    | '/non-nested/baz/$bazid'
     | '/params-ps/named/prefix{$foo}'
     | '/params-ps/named/{$foo}suffix'
     | '/params-ps/wildcard/$'
@@ -793,8 +969,19 @@ export interface FileRouteTypes {
     | '/params-ps/wildcard'
     | '/redirect/$target'
     | '/params-ps/named/$foo/$bar'
-    | '/non-nested/baz/$bazid/edit'
+    | '/non-nested/named/$baz/foo'
+    | '/non-nested/named/$baz/bar'
+    | '/non-nested/path/baz/foo'
+    | '/non-nested/path/baz/bar'
+    | '/non-nested/prefix/prefix{$baz}/foo'
+    | '/non-nested/prefix/prefix{$baz}/bar'
+    | '/non-nested/suffix/{$baz}suffix/foo'
+    | '/non-nested/suffix/{$baz}suffix/bar'
     | '/params-ps/non-nested/$foo/$bar'
+    | '/non-nested/named/$baz'
+    | '/non-nested/path/baz'
+    | '/non-nested/prefix/prefix{$baz}'
+    | '/non-nested/suffix/{$baz}suffix'
     | '/relative/link/nested'
     | '/relative/link/path'
     | '/relative/link/with-search'
@@ -820,6 +1007,10 @@ export interface FileRouteTypes {
     | '/posts'
     | '/remountDeps'
     | '/대한민국'
+    | '/non-nested/named'
+    | '/non-nested/path'
+    | '/non-nested/prefix'
+    | '/non-nested/suffix'
     | '/params-ps/non-nested'
     | '/relative/link'
     | '/relative/useNavigate'
@@ -829,7 +1020,6 @@ export interface FileRouteTypes {
     | '/(group)/inside'
     | '/(group)/lazyinside'
     | '/_layout/_layout-2'
-    | '/non-nested/baz'
     | '/posts/$postId'
     | '/redirect/$target'
     | '/search-params/default'
@@ -839,13 +1029,16 @@ export interface FileRouteTypes {
     | '/redirect/'
     | '/relative/'
     | '/search-params/'
+    | '/non-nested/named/$baz'
+    | '/non-nested/path/baz'
+    | '/non-nested/prefix/prefix{$baz}'
+    | '/non-nested/suffix/{$baz}suffix'
     | '/params-ps/named/$foo'
     | '/params-ps/non-nested/$foo_'
     | '/(group)/_layout/insidelayout'
     | '/(group)/subfolder/inside'
     | '/_layout/_layout-2/layout-a'
     | '/_layout/_layout-2/layout-b'
-    | '/non-nested/baz/$bazid'
     | '/params-ps/named/prefix{$foo}'
     | '/params-ps/named/{$foo}suffix'
     | '/params-ps/wildcard/$'
@@ -866,8 +1059,19 @@ export interface FileRouteTypes {
     | '/params-ps/wildcard/'
     | '/redirect/$target/'
     | '/params-ps/named/$foo/$bar'
-    | '/non-nested/baz_/$bazid/edit'
+    | '/non-nested/named/$baz/foo'
+    | '/non-nested/named/$baz_/bar'
+    | '/non-nested/path/baz/foo'
+    | '/non-nested/path/baz_/bar'
+    | '/non-nested/prefix/prefix{$baz}/foo'
+    | '/non-nested/prefix/prefix{$baz}_/bar'
+    | '/non-nested/suffix/{$baz}suffix/foo'
+    | '/non-nested/suffix/{$baz}suffix_/bar'
     | '/params-ps/non-nested/$foo_/$bar'
+    | '/non-nested/named/$baz/'
+    | '/non-nested/path/baz/'
+    | '/non-nested/prefix/prefix{$baz}/'
+    | '/non-nested/suffix/{$baz}suffix/'
     | '/relative/link/nested/'
     | '/relative/link/path/'
     | '/relative/link/with-search/'
@@ -1075,13 +1279,6 @@ declare module '@tanstack/react-router' {
       preLoaderRoute: typeof PostsPostIdRouteImport
       parentRoute: typeof PostsRoute
     }
-    '/non-nested/baz': {
-      id: '/non-nested/baz'
-      path: '/baz'
-      fullPath: '/non-nested/baz'
-      preLoaderRoute: typeof NonNestedBazRouteImport
-      parentRoute: typeof NonNestedRouteRoute
-    }
     '/_layout/_layout-2': {
       id: '/_layout/_layout-2'
       path: ''
@@ -1138,6 +1335,34 @@ declare module '@tanstack/react-router' {
       preLoaderRoute: typeof ParamsPsNonNestedRouteRouteImport
       parentRoute: typeof rootRouteImport
     }
+    '/non-nested/suffix': {
+      id: '/non-nested/suffix'
+      path: '/suffix'
+      fullPath: '/non-nested/suffix'
+      preLoaderRoute: typeof NonNestedSuffixRouteRouteImport
+      parentRoute: typeof NonNestedRouteRoute
+    }
+    '/non-nested/prefix': {
+      id: '/non-nested/prefix'
+      path: '/prefix'
+      fullPath: '/non-nested/prefix'
+      preLoaderRoute: typeof NonNestedPrefixRouteRouteImport
+      parentRoute: typeof NonNestedRouteRoute
+    }
+    '/non-nested/path': {
+      id: '/non-nested/path'
+      path: '/path'
+      fullPath: '/non-nested/path'
+      preLoaderRoute: typeof NonNestedPathRouteRouteImport
+      parentRoute: typeof NonNestedRouteRoute
+    }
+    '/non-nested/named': {
+      id: '/non-nested/named'
+      path: '/named'
+      fullPath: '/non-nested/named'
+      preLoaderRoute: typeof NonNestedNamedRouteRouteImport
+      parentRoute: typeof NonNestedRouteRoute
+    }
     '/redirect/$target/': {
       id: '/redirect/$target/'
       path: '/'
@@ -1271,13 +1496,6 @@ declare module '@tanstack/react-router' {
       preLoaderRoute: typeof ParamsPsNamedPrefixChar123fooChar125RouteImport
       parentRoute: typeof rootRouteImport
     }
-    '/non-nested/baz/$bazid': {
-      id: '/non-nested/baz/$bazid'
-      path: '/$bazid'
-      fullPath: '/non-nested/baz/$bazid'
-      preLoaderRoute: typeof NonNestedBazBazidRouteImport
-      parentRoute: typeof NonNestedBazRoute
-    }
     '/_layout/_layout-2/layout-b': {
       id: '/_layout/_layout-2/layout-b'
       path: '/layout-b'
@@ -1320,6 +1538,34 @@ declare module '@tanstack/react-router' {
       preLoaderRoute: typeof ParamsPsNamedFooRouteRouteImport
       parentRoute: typeof rootRouteImport
     }
+    '/non-nested/suffix/{$baz}suffix': {
+      id: '/non-nested/suffix/{$baz}suffix'
+      path: '/{$baz}suffix'
+      fullPath: '/non-nested/suffix/{$baz}suffix'
+      preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRouteImport
+      parentRoute: typeof NonNestedSuffixRouteRoute
+    }
+    '/non-nested/prefix/prefix{$baz}': {
+      id: '/non-nested/prefix/prefix{$baz}'
+      path: '/prefix{$baz}'
+      fullPath: '/non-nested/prefix/prefix{$baz}'
+      preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRouteImport
+      parentRoute: typeof NonNestedPrefixRouteRoute
+    }
+    '/non-nested/path/baz': {
+      id: '/non-nested/path/baz'
+      path: '/baz'
+      fullPath: '/non-nested/path/baz'
+      preLoaderRoute: typeof NonNestedPathBazRouteRouteImport
+      parentRoute: typeof NonNestedPathRouteRoute
+    }
+    '/non-nested/named/$baz': {
+      id: '/non-nested/named/$baz'
+      path: '/$baz'
+      fullPath: '/non-nested/named/$baz'
+      preLoaderRoute: typeof NonNestedNamedBazRouteRouteImport
+      parentRoute: typeof NonNestedNamedRouteRoute
+    }
     '/relative/useNavigate/with-search/': {
       id: '/relative/useNavigate/with-search/'
       path: '/with-search'
@@ -1362,6 +1608,34 @@ declare module '@tanstack/react-router' {
       preLoaderRoute: typeof RelativeLinkNestedIndexRouteImport
       parentRoute: typeof RelativeLinkRouteRoute
     }
+    '/non-nested/suffix/{$baz}suffix/': {
+      id: '/non-nested/suffix/{$baz}suffix/'
+      path: '/'
+      fullPath: '/non-nested/suffix/{$baz}suffix/'
+      preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixIndexRouteImport
+      parentRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRoute
+    }
+    '/non-nested/prefix/prefix{$baz}/': {
+      id: '/non-nested/prefix/prefix{$baz}/'
+      path: '/'
+      fullPath: '/non-nested/prefix/prefix{$baz}/'
+      preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125IndexRouteImport
+      parentRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRoute
+    }
+    '/non-nested/path/baz/': {
+      id: '/non-nested/path/baz/'
+      path: '/'
+      fullPath: '/non-nested/path/baz/'
+      preLoaderRoute: typeof NonNestedPathBazIndexRouteImport
+      parentRoute: typeof NonNestedPathBazRouteRoute
+    }
+    '/non-nested/named/$baz/': {
+      id: '/non-nested/named/$baz/'
+      path: '/'
+      fullPath: '/non-nested/named/$baz/'
+      preLoaderRoute: typeof NonNestedNamedBazIndexRouteImport
+      parentRoute: typeof NonNestedNamedBazRouteRoute
+    }
     '/params-ps/non-nested/$foo_/$bar': {
       id: '/params-ps/non-nested/$foo_/$bar'
       path: '/$bar'
@@ -1369,12 +1643,61 @@ declare module '@tanstack/react-router' {
       preLoaderRoute: typeof ParamsPsNonNestedFooBarRouteImport
       parentRoute: typeof ParamsPsNonNestedFooRouteRoute
     }
-    '/non-nested/baz_/$bazid/edit': {
-      id: '/non-nested/baz_/$bazid/edit'
-      path: '/baz/$bazid/edit'
-      fullPath: '/non-nested/baz/$bazid/edit'
-      preLoaderRoute: typeof NonNestedBazBazidEditRouteImport
-      parentRoute: typeof NonNestedRouteRoute
+    '/non-nested/suffix/{$baz}suffix_/bar': {
+      id: '/non-nested/suffix/{$baz}suffix_/bar'
+      path: '/{$baz}suffix/bar'
+      fullPath: '/non-nested/suffix/{$baz}suffix/bar'
+      preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixBarRouteImport
+      parentRoute: typeof NonNestedSuffixRouteRoute
+    }
+    '/non-nested/suffix/{$baz}suffix/foo': {
+      id: '/non-nested/suffix/{$baz}suffix/foo'
+      path: '/foo'
+      fullPath: '/non-nested/suffix/{$baz}suffix/foo'
+      preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixFooRouteImport
+      parentRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRoute
+    }
+    '/non-nested/prefix/prefix{$baz}_/bar': {
+      id: '/non-nested/prefix/prefix{$baz}_/bar'
+      path: '/prefix{$baz}/bar'
+      fullPath: '/non-nested/prefix/prefix{$baz}/bar'
+      preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125BarRouteImport
+      parentRoute: typeof NonNestedPrefixRouteRoute
+    }
+    '/non-nested/prefix/prefix{$baz}/foo': {
+      id: '/non-nested/prefix/prefix{$baz}/foo'
+      path: '/foo'
+      fullPath: '/non-nested/prefix/prefix{$baz}/foo'
+      preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125FooRouteImport
+      parentRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRoute
+    }
+    '/non-nested/path/baz_/bar': {
+      id: '/non-nested/path/baz_/bar'
+      path: '/baz/bar'
+      fullPath: '/non-nested/path/baz/bar'
+      preLoaderRoute: typeof NonNestedPathBazBarRouteImport
+      parentRoute: typeof NonNestedPathRouteRoute
+    }
+    '/non-nested/path/baz/foo': {
+      id: '/non-nested/path/baz/foo'
+      path: '/foo'
+      fullPath: '/non-nested/path/baz/foo'
+      preLoaderRoute: typeof NonNestedPathBazFooRouteImport
+      parentRoute: typeof NonNestedPathBazRouteRoute
+    }
+    '/non-nested/named/$baz_/bar': {
+      id: '/non-nested/named/$baz_/bar'
+      path: '/$baz/bar'
+      fullPath: '/non-nested/named/$baz/bar'
+      preLoaderRoute: typeof NonNestedNamedBazBarRouteImport
+      parentRoute: typeof NonNestedNamedRouteRoute
+    }
+    '/non-nested/named/$baz/foo': {
+      id: '/non-nested/named/$baz/foo'
+      path: '/foo'
+      fullPath: '/non-nested/named/$baz/foo'
+      preLoaderRoute: typeof NonNestedNamedBazFooRouteImport
+      parentRoute: typeof NonNestedNamedBazRouteRoute
     }
     '/params-ps/named/$foo/$bar': {
       id: '/params-ps/named/$foo/$bar'
@@ -1421,26 +1744,141 @@ declare module '@tanstack/react-router' {
   }
 }
 
-interface NonNestedBazRouteChildren {
-  NonNestedBazBazidRoute: typeof NonNestedBazBazidRoute
+interface NonNestedNamedBazRouteRouteChildren {
+  NonNestedNamedBazFooRoute: typeof NonNestedNamedBazFooRoute
+  NonNestedNamedBazIndexRoute: typeof NonNestedNamedBazIndexRoute
 }
 
-const NonNestedBazRouteChildren: NonNestedBazRouteChildren = {
-  NonNestedBazBazidRoute: NonNestedBazBazidRoute,
+const NonNestedNamedBazRouteRouteChildren: NonNestedNamedBazRouteRouteChildren =
+  {
+    NonNestedNamedBazFooRoute: NonNestedNamedBazFooRoute,
+    NonNestedNamedBazIndexRoute: NonNestedNamedBazIndexRoute,
+  }
+
+const NonNestedNamedBazRouteRouteWithChildren =
+  NonNestedNamedBazRouteRoute._addFileChildren(
+    NonNestedNamedBazRouteRouteChildren,
+  )
+
+interface NonNestedNamedRouteRouteChildren {
+  NonNestedNamedBazRouteRoute: typeof NonNestedNamedBazRouteRouteWithChildren
+  NonNestedNamedBazBarRoute: typeof NonNestedNamedBazBarRoute
 }
 
-const NonNestedBazRouteWithChildren = NonNestedBazRoute._addFileChildren(
-  NonNestedBazRouteChildren,
-)
+const NonNestedNamedRouteRouteChildren: NonNestedNamedRouteRouteChildren = {
+  NonNestedNamedBazRouteRoute: NonNestedNamedBazRouteRouteWithChildren,
+  NonNestedNamedBazBarRoute: NonNestedNamedBazBarRoute,
+}
+
+const NonNestedNamedRouteRouteWithChildren =
+  NonNestedNamedRouteRoute._addFileChildren(NonNestedNamedRouteRouteChildren)
+
+interface NonNestedPathBazRouteRouteChildren {
+  NonNestedPathBazFooRoute: typeof NonNestedPathBazFooRoute
+  NonNestedPathBazIndexRoute: typeof NonNestedPathBazIndexRoute
+}
+
+const NonNestedPathBazRouteRouteChildren: NonNestedPathBazRouteRouteChildren = {
+  NonNestedPathBazFooRoute: NonNestedPathBazFooRoute,
+  NonNestedPathBazIndexRoute: NonNestedPathBazIndexRoute,
+}
+
+const NonNestedPathBazRouteRouteWithChildren =
+  NonNestedPathBazRouteRoute._addFileChildren(
+    NonNestedPathBazRouteRouteChildren,
+  )
+
+interface NonNestedPathRouteRouteChildren {
+  NonNestedPathBazRouteRoute: typeof NonNestedPathBazRouteRouteWithChildren
+  NonNestedPathBazBarRoute: typeof NonNestedPathBazBarRoute
+}
+
+const NonNestedPathRouteRouteChildren: NonNestedPathRouteRouteChildren = {
+  NonNestedPathBazRouteRoute: NonNestedPathBazRouteRouteWithChildren,
+  NonNestedPathBazBarRoute: NonNestedPathBazBarRoute,
+}
+
+const NonNestedPathRouteRouteWithChildren =
+  NonNestedPathRouteRoute._addFileChildren(NonNestedPathRouteRouteChildren)
+
+interface NonNestedPrefixPrefixChar123bazChar125RouteRouteChildren {
+  NonNestedPrefixPrefixChar123bazChar125FooRoute: typeof NonNestedPrefixPrefixChar123bazChar125FooRoute
+  NonNestedPrefixPrefixChar123bazChar125IndexRoute: typeof NonNestedPrefixPrefixChar123bazChar125IndexRoute
+}
+
+const NonNestedPrefixPrefixChar123bazChar125RouteRouteChildren: NonNestedPrefixPrefixChar123bazChar125RouteRouteChildren =
+  {
+    NonNestedPrefixPrefixChar123bazChar125FooRoute:
+      NonNestedPrefixPrefixChar123bazChar125FooRoute,
+    NonNestedPrefixPrefixChar123bazChar125IndexRoute:
+      NonNestedPrefixPrefixChar123bazChar125IndexRoute,
+  }
+
+const NonNestedPrefixPrefixChar123bazChar125RouteRouteWithChildren =
+  NonNestedPrefixPrefixChar123bazChar125RouteRoute._addFileChildren(
+    NonNestedPrefixPrefixChar123bazChar125RouteRouteChildren,
+  )
+
+interface NonNestedPrefixRouteRouteChildren {
+  NonNestedPrefixPrefixChar123bazChar125RouteRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRouteWithChildren
+  NonNestedPrefixPrefixChar123bazChar125BarRoute: typeof NonNestedPrefixPrefixChar123bazChar125BarRoute
+}
+
+const NonNestedPrefixRouteRouteChildren: NonNestedPrefixRouteRouteChildren = {
+  NonNestedPrefixPrefixChar123bazChar125RouteRoute:
+    NonNestedPrefixPrefixChar123bazChar125RouteRouteWithChildren,
+  NonNestedPrefixPrefixChar123bazChar125BarRoute:
+    NonNestedPrefixPrefixChar123bazChar125BarRoute,
+}
+
+const NonNestedPrefixRouteRouteWithChildren =
+  NonNestedPrefixRouteRoute._addFileChildren(NonNestedPrefixRouteRouteChildren)
+
+interface NonNestedSuffixChar123bazChar125suffixRouteRouteChildren {
+  NonNestedSuffixChar123bazChar125suffixFooRoute: typeof NonNestedSuffixChar123bazChar125suffixFooRoute
+  NonNestedSuffixChar123bazChar125suffixIndexRoute: typeof NonNestedSuffixChar123bazChar125suffixIndexRoute
+}
+
+const NonNestedSuffixChar123bazChar125suffixRouteRouteChildren: NonNestedSuffixChar123bazChar125suffixRouteRouteChildren =
+  {
+    NonNestedSuffixChar123bazChar125suffixFooRoute:
+      NonNestedSuffixChar123bazChar125suffixFooRoute,
+    NonNestedSuffixChar123bazChar125suffixIndexRoute:
+      NonNestedSuffixChar123bazChar125suffixIndexRoute,
+  }
+
+const NonNestedSuffixChar123bazChar125suffixRouteRouteWithChildren =
+  NonNestedSuffixChar123bazChar125suffixRouteRoute._addFileChildren(
+    NonNestedSuffixChar123bazChar125suffixRouteRouteChildren,
+  )
+
+interface NonNestedSuffixRouteRouteChildren {
+  NonNestedSuffixChar123bazChar125suffixRouteRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRouteWithChildren
+  NonNestedSuffixChar123bazChar125suffixBarRoute: typeof NonNestedSuffixChar123bazChar125suffixBarRoute
+}
+
+const NonNestedSuffixRouteRouteChildren: NonNestedSuffixRouteRouteChildren = {
+  NonNestedSuffixChar123bazChar125suffixRouteRoute:
+    NonNestedSuffixChar123bazChar125suffixRouteRouteWithChildren,
+  NonNestedSuffixChar123bazChar125suffixBarRoute:
+    NonNestedSuffixChar123bazChar125suffixBarRoute,
+}
+
+const NonNestedSuffixRouteRouteWithChildren =
+  NonNestedSuffixRouteRoute._addFileChildren(NonNestedSuffixRouteRouteChildren)
 
 interface NonNestedRouteRouteChildren {
-  NonNestedBazRoute: typeof NonNestedBazRouteWithChildren
-  NonNestedBazBazidEditRoute: typeof NonNestedBazBazidEditRoute
+  NonNestedNamedRouteRoute: typeof NonNestedNamedRouteRouteWithChildren
+  NonNestedPathRouteRoute: typeof NonNestedPathRouteRouteWithChildren
+  NonNestedPrefixRouteRoute: typeof NonNestedPrefixRouteRouteWithChildren
+  NonNestedSuffixRouteRoute: typeof NonNestedSuffixRouteRouteWithChildren
 }
 
 const NonNestedRouteRouteChildren: NonNestedRouteRouteChildren = {
-  NonNestedBazRoute: NonNestedBazRouteWithChildren,
-  NonNestedBazBazidEditRoute: NonNestedBazBazidEditRoute,
+  NonNestedNamedRouteRoute: NonNestedNamedRouteRouteWithChildren,
+  NonNestedPathRouteRoute: NonNestedPathRouteRouteWithChildren,
+  NonNestedPrefixRouteRoute: NonNestedPrefixRouteRouteWithChildren,
+  NonNestedSuffixRouteRoute: NonNestedSuffixRouteRouteWithChildren,
 }
 
 const NonNestedRouteRouteWithChildren = NonNestedRouteRoute._addFileChildren(
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/baz.$bazid.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/baz.$bazid.tsx
deleted file mode 100644
index 7160b5d7aa..0000000000
--- a/e2e/react-router/basic-file-based/src/routes/non-nested/baz.$bazid.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-import { createFileRoute } from '@tanstack/react-router'
-
-export const Route = createFileRoute('/non-nested/baz/$bazid')({
-  component: RouteComponent,
-})
-
-function RouteComponent() {
-  const params = Route.useParams()
-
-  return (
-    <>
-      <div data-testid="non-nested-bazid-heading">
-        Hello "/non-nested/baz/$bazid"!
-      </div>
-      <div>
-        params:{' '}
-        <span data-testid="non-nested-bazid-param">
-          {JSON.stringify(params)}
-        </span>
-      </div>
-    </>
-  )
-}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/baz.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/baz.tsx
deleted file mode 100644
index 149903da04..0000000000
--- a/e2e/react-router/basic-file-based/src/routes/non-nested/baz.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { Outlet, createFileRoute } from '@tanstack/react-router'
-
-export const Route = createFileRoute('/non-nested/baz')({
-  component: RouteComponent,
-})
-
-function RouteComponent() {
-  return (
-    <>
-      <div data-testid="non-nested-baz-heading">Hello "/non-nested/baz"!</div>
-      <Outlet />
-    </>
-  )
-}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/baz_.$bazid.edit.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/baz_.$bazid.edit.tsx
deleted file mode 100644
index 491385c990..0000000000
--- a/e2e/react-router/basic-file-based/src/routes/non-nested/baz_.$bazid.edit.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { createFileRoute } from '@tanstack/react-router'
-
-export const Route = createFileRoute('/non-nested/baz_/$bazid/edit')({
-  component: RouteComponent,
-})
-
-function RouteComponent() {
-  const params = Route.useParams()
-  return (
-    <>
-      <div data-testid="non-nested-bazid-edit-heading">
-        Hello "/non-nested/baz_/$bazid/edit"!
-      </div>
-      <div>
-        params:{' '}
-        <span data-testid="non-nested-bazid-edit-param">
-          {JSON.stringify(params)}
-        </span>
-      </div>
-    </>
-  )
-}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.foo.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.foo.tsx
new file mode 100644
index 0000000000..e89a7b2ead
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.foo.tsx
@@ -0,0 +1,20 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/named/$baz/foo')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+
+  return (
+    <div>
+      <div data-testid="non-nested-named-baz-foo-heading">
+        Hello nested named baz foo page
+      </div>
+      <div data-testid="non-nested-named-baz-foo-param">
+        {JSON.stringify(params)}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.index.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.index.tsx
new file mode 100644
index 0000000000..4b7ead5028
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.index.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/named/$baz/')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-named-baz-index-heading">
+        Hello nested named baz index
+      </div>
+      <div data-testid="non-nested-named-baz-index-param">
+        {JSON.stringify(params)}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.route.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.route.tsx
new file mode 100644
index 0000000000..0339500185
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.route.tsx
@@ -0,0 +1,16 @@
+import { Outlet, createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/named/$baz')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-named-baz-route-heading">
+        Hello non-nested named baz route layout
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx
new file mode 100644
index 0000000000..e39ff43a5e
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/named/$baz_/bar')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-named-baz-bar-heading">
+        Hello non-nested named bar
+      </div>
+      <div data-testid="non-nested-named-baz-bar-param">
+        {JSON.stringify(params)}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/named/route.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/named/route.tsx
new file mode 100644
index 0000000000..55803fc8c3
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/named/route.tsx
@@ -0,0 +1,58 @@
+import { Link, Outlet, createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/named')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-named-root-route-heading">
+        Hello non-nested named layout
+      </div>
+      <div>
+        <Link
+          from={Route.fullPath}
+          to="./$baz"
+          params={{ baz: 'baz' }}
+          data-testid="to-named-index"
+        >
+          To named index
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="./$baz/foo"
+          params={{ baz: 'baz' }}
+          data-testid="to-named-foo"
+        >
+          To named foo
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="./$baz/foo"
+          params={{ baz: 'baz_' }}
+          data-testid="to-named-foo-2"
+        >
+          To named foo 2
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="./$baz/bar"
+          params={{ baz: 'baz' }}
+          data-testid="to-named-bar"
+        >
+          To named bar
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="./$baz/bar"
+          params={{ baz: 'baz_' }}
+          data-testid="to-named-bar-2"
+        >
+          To named bar 2
+        </Link>
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.foo.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.foo.tsx
new file mode 100644
index 0000000000..f80dd73a79
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.foo.tsx
@@ -0,0 +1,20 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/path/baz/foo')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+
+  return (
+    <div>
+      <div data-testid="non-nested-path-baz-foo-heading">
+        Hello nested path baz foo page
+      </div>
+      <div data-testid="non-nested-path-baz-foo-param">
+        {JSON.stringify(params)}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.index.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.index.tsx
new file mode 100644
index 0000000000..ac8c66b672
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.index.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/path/baz/')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-path-baz-index-heading">
+        Hello nested path baz index
+      </div>
+      <div data-testid="non-nested-path-baz-index-param">
+        {JSON.stringify(params)}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.route.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.route.tsx
new file mode 100644
index 0000000000..3a6172415c
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.route.tsx
@@ -0,0 +1,16 @@
+import { Outlet, createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/path/baz')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-path-baz-route-heading">
+        Hello non-nested path baz route layout
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx
new file mode 100644
index 0000000000..ce18ed69a2
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/path/baz_/bar')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-path-baz-bar-heading">
+        Hello non-nested path bar
+      </div>
+      <div data-testid="non-nested-path-baz-bar-param">
+        {JSON.stringify(params)}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/path/route.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/path/route.tsx
new file mode 100644
index 0000000000..b6df6654e5
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/path/route.tsx
@@ -0,0 +1,33 @@
+import { Link, Outlet, createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/path')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-path-root-route-heading">
+        Hello non-nested path layout
+      </div>
+      <div>
+        <Link from={Route.fullPath} to="./baz" data-testid="to-path-index">
+          To path index
+        </Link>
+        <Link from={Route.fullPath} to="./baz/foo" data-testid="to-path-foo">
+          To path foo
+        </Link>
+        <Link from={Route.fullPath} to="./baz/foo" data-testid="to-path-foo-2">
+          To path foo 2
+        </Link>
+        <Link from={Route.fullPath} to="./baz/bar" data-testid="to-path-bar">
+          To path bar
+        </Link>
+        <Link from={Route.fullPath} to="./baz/bar" data-testid="to-path-bar-2">
+          To path bar 2
+        </Link>
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.foo.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.foo.tsx
new file mode 100644
index 0000000000..9283c8a611
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.foo.tsx
@@ -0,0 +1,20 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/prefix/prefix{$baz}/foo')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+
+  return (
+    <div>
+      <div data-testid="non-nested-prefix-baz-foo-heading">
+        Hello nested prefix foo page
+      </div>
+      <div data-testid="non-nested-prefix-baz-foo-param">
+        {JSON.stringify(params)}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.index.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.index.tsx
new file mode 100644
index 0000000000..d7afe25934
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.index.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/prefix/prefix{$baz}/')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-prefix-baz-index-heading">
+        Hello nested prefix index
+      </div>
+      <div data-testid="non-nested-prefix-baz-index-param">
+        {JSON.stringify(params)}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.route.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.route.tsx
new file mode 100644
index 0000000000..baa99c974a
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.route.tsx
@@ -0,0 +1,16 @@
+import { Outlet, createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/prefix/prefix{$baz}')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-prefix-baz-route-heading">
+        Hello non-nested prefix route layout
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
new file mode 100644
index 0000000000..5ce90f08dc
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/prefix/prefix{$baz}_/bar')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-prefix-baz-bar-heading">
+        Hello non-nested wildcard bar
+      </div>
+      <div data-testid="non-nested-prefix-baz-bar-param">
+        {JSON.stringify(params)}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/route.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/route.tsx
new file mode 100644
index 0000000000..c0b1b5d8cb
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/route.tsx
@@ -0,0 +1,58 @@
+import { Link, Outlet, createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/prefix')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-prefix-root-route-heading">
+        Hello non-nested prefix layout
+      </div>
+      <div>
+        <Link
+          from={Route.fullPath}
+          to="prefix{$baz}"
+          params={{ baz: 'baz' }}
+          data-testid="to-prefix-index"
+        >
+          To prefix index
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="prefix{$baz}/foo"
+          params={{ baz: 'baz' }}
+          data-testid="to-prefix-foo"
+        >
+          To prefix foo
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="prefix{$baz}/foo"
+          params={{ baz: 'baz_' }}
+          data-testid="to-prefix-foo-2"
+        >
+          To prefix foo 2
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="prefix{$baz}/bar"
+          params={{ baz: 'baz' }}
+          data-testid="to-prefix-bar"
+        >
+          To prefix bar
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="prefix{$baz}/bar"
+          params={{ baz: 'baz_' }}
+          data-testid="to-prefix-bar-2"
+        >
+          To prefix bar 2
+        </Link>
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/route.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/route.tsx
index 83a42874ac..2c23aaea94 100644
--- a/e2e/react-router/basic-file-based/src/routes/non-nested/route.tsx
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/route.tsx
@@ -12,23 +12,17 @@ function RouteComponent() {
       </h3>
       <ul className="grid mb-2">
         <li>
-          <Link
-            from={Route.fullPath}
-            data-testid="l-to-non-nested-bazid"
-            to="./baz/$bazid"
-            params={{ bazid: '123' }}
-          >
-            /non-nested/baz/123
+          <Link from={Route.fullPath} data-testid="l-to-named" to="./named">
+            To named param tests
           </Link>
-        </li>
-        <li>
-          <Link
-            from={Route.fullPath}
-            data-testid="l-to-non-nested-bazid-edit"
-            to="./baz/$bazid/edit"
-            params={{ bazid: '456' }}
-          >
-            /non-nested/baz/456/edit
+          <Link from={Route.fullPath} data-testid="l-to-prefix" to="./prefix">
+            To prefix param tests
+          </Link>
+          <Link from={Route.fullPath} data-testid="l-to-suffix" to="./suffix">
+            To suffix param tests
+          </Link>
+          <Link from={Route.fullPath} data-testid="l-to-path" to="./path">
+            To path tests
           </Link>
         </li>
       </ul>
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/route.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/route.tsx
new file mode 100644
index 0000000000..a7548429a0
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/route.tsx
@@ -0,0 +1,58 @@
+import { Link, Outlet, createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/suffix')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-suffix-root-route-heading">
+        Hello non-nested suffix layout
+      </div>
+      <div>
+        <Link
+          from={Route.fullPath}
+          to="{$baz}suffix"
+          params={{ baz: 'baz' }}
+          data-testid="to-suffix-index"
+        >
+          To suffix index
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="{$baz}suffix/foo"
+          params={{ baz: 'baz' }}
+          data-testid="to-suffix-foo"
+        >
+          To suffix foo
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="{$baz}suffix/foo"
+          params={{ baz: 'baz2' }}
+          data-testid="to-suffix-foo-2"
+        >
+          To suffix foo 2
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="{$baz}suffix/bar"
+          params={{ baz: 'baz' }}
+          data-testid="to-suffix-bar"
+        >
+          To suffix bar
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="{$baz}suffix/bar"
+          params={{ baz: 'baz2' }}
+          data-testid="to-suffix-bar-2"
+        >
+          To suffix bar 2
+        </Link>
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.foo.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.foo.tsx
new file mode 100644
index 0000000000..41796223b9
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.foo.tsx
@@ -0,0 +1,20 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/suffix/{$baz}suffix/foo')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+
+  return (
+    <div>
+      <div data-testid="non-nested-suffix-baz-foo-heading">
+        Hello nested suffix foo page
+      </div>
+      <div data-testid="non-nested-suffix-baz-foo-param">
+        {JSON.stringify(params)}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.index.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.index.tsx
new file mode 100644
index 0000000000..3291f4a104
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.index.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/suffix/{$baz}suffix/')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-suffix-baz-index-heading">
+        Hello nested suffix index
+      </div>
+      <div data-testid="non-nested-suffix-baz-index-param">
+        {JSON.stringify(params)}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.route.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.route.tsx
new file mode 100644
index 0000000000..724217f6ab
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.route.tsx
@@ -0,0 +1,16 @@
+import { Outlet, createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/suffix/{$baz}suffix')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-suffix-baz-route-heading">
+        Hello non-nested suffix route layout
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx
new file mode 100644
index 0000000000..b56ff69c44
--- /dev/null
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/non-nested/suffix/{$baz}suffix_/bar')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-suffix-baz-bar-heading">
+        Hello non-nested suffix bar
+      </div>
+      <div data-testid="non-nested-suffix-baz-bar-param">
+        {JSON.stringify(params)}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/react-router/basic-file-based/tests/app.spec.ts b/e2e/react-router/basic-file-based/tests/app.spec.ts
index 38de31e829..d825ca7b51 100644
--- a/e2e/react-router/basic-file-based/tests/app.spec.ts
+++ b/e2e/react-router/basic-file-based/tests/app.spec.ts
@@ -308,38 +308,3 @@ test('Should remount deps when remountDeps does change ', async ({ page }) => {
     'Page component mounts: 2',
   )
 })
-
-test('Should not nest non-nested paths', async ({ page }) => {
-  await page.goto('/non-nested')
-  await page.waitForURL('/non-nested')
-  const nonNestedPathHeading = page.getByTestId('non-nested-path-heading')
-  const bazIdLink = page.getByTestId('l-to-non-nested-bazid')
-  const bazIdEditLink = page.getByTestId('l-to-non-nested-bazid-edit')
-
-  await expect(nonNestedPathHeading).toBeInViewport()
-  await expect(bazIdLink).toHaveAttribute('href', '/non-nested/baz/123')
-  await expect(bazIdEditLink).toHaveAttribute(
-    'href',
-    '/non-nested/baz/456/edit',
-  )
-
-  await bazIdLink.click()
-  await page.waitForURL('/non-nested/baz/123')
-  const bazHeading = page.getByTestId('non-nested-baz-heading')
-  const bazIdHeading = page.getByTestId('non-nested-bazid-heading')
-  const bazIdParam = page.getByTestId('non-nested-bazid-param')
-  await expect(nonNestedPathHeading).toBeInViewport()
-  await expect(bazHeading).toBeInViewport()
-  await expect(bazIdHeading).toBeInViewport()
-  await expect(bazIdParam).toContainText(JSON.stringify({ bazid: '123' }))
-
-  await bazIdEditLink.click()
-  await page.waitForURL('/non-nested/baz/456/edit')
-  const bazIdEditHeading = page.getByTestId('non-nested-bazid-edit-heading')
-  const bazIdEditParam = page.getByTestId('non-nested-bazid-edit-param')
-  await expect(nonNestedPathHeading).toBeInViewport()
-  await expect(bazHeading).toBeHidden()
-  await expect(bazIdHeading).toBeHidden()
-  await expect(bazIdEditHeading).toBeInViewport()
-  await expect(bazIdEditParam).toContainText(JSON.stringify({ bazid: '456' }))
-})
diff --git a/e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts b/e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts
new file mode 100644
index 0000000000..2fdede5549
--- /dev/null
+++ b/e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts
@@ -0,0 +1,192 @@
+import { expect, test } from '@playwright/test'
+
+const testCases: Array<{
+  name: string
+  testPathDesc: string
+  testPathPrefix: string
+  testPathSuffix: string
+  paramValue: Record<string, string>
+  paramValue2: Record<string, string>
+}> = [
+  {
+    name: 'Named path params',
+    testPathDesc: 'named',
+    testPathPrefix: '',
+    testPathSuffix: '',
+    paramValue: { baz: 'baz' },
+    paramValue2: { baz: 'baz_' },
+  },
+  {
+    name: 'prefix params',
+    testPathPrefix: 'prefix',
+    testPathSuffix: '',
+    testPathDesc: 'prefix',
+    paramValue: { baz: 'baz' },
+    paramValue2: { baz: 'baz_' },
+  },
+  {
+    name: 'suffix params',
+    testPathPrefix: '',
+    testPathSuffix: 'suffix',
+    testPathDesc: 'suffix',
+    paramValue: { baz: 'baz' },
+    paramValue2: { baz: 'baz2' },
+  },
+  {
+    name: 'path',
+    testPathPrefix: '',
+    testPathSuffix: '',
+    testPathDesc: 'path',
+    paramValue: {},
+    paramValue2: {},
+  },
+]
+
+test.describe('Non-nested paths', () => {
+  testCases.forEach(
+    ({
+      name,
+      testPathDesc,
+      testPathPrefix,
+      testPathSuffix,
+      paramValue,
+      paramValue2,
+    }) => {
+      test.describe(name, () => {
+        const path = `/non-nested/${testPathDesc}`
+        const paramNameDesc = Object.keys(paramValue)[0] ?? 'baz'
+
+        test.beforeEach(async ({ page }) => {
+          await page.goto('/non-nested')
+          await page.waitForURL('/non-nested')
+        })
+
+        test('Should not un-nest nested paths', async ({ page }) => {
+          const nonNestedPathHeading = page.getByTestId(
+            'non-nested-path-heading',
+          )
+          await expect(nonNestedPathHeading).toBeVisible()
+
+          await page.getByTestId(`l-to-${testPathDesc}`).click()
+          await page.waitForURL(path)
+
+          const rootRouteHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-root-route-heading`,
+          )
+
+          await expect(rootRouteHeading).toBeVisible()
+
+          const pathRouteHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-route-heading`,
+          )
+
+          const indexHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-index-heading`,
+          )
+
+          const fooHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-foo-heading`,
+          )
+
+          const indexParams = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-index-param`,
+          )
+
+          const fooParams = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-foo-param`,
+          )
+
+          const indexLink = page.getByTestId(`to-${testPathDesc}-index`)
+          const fooLink = page.getByTestId(`to-${testPathDesc}-foo`)
+          const foo2Link = page.getByTestId(`to-${testPathDesc}-foo-2`)
+
+          const indexPath = `${path}/${testPathPrefix}${paramValue[paramNameDesc] ?? 'baz'}${testPathSuffix}`
+          const fooPath = `${path}/${testPathPrefix}${paramValue[paramNameDesc] ?? 'baz'}${testPathSuffix}/foo`
+          const foo2Path = `${path}/${testPathPrefix}${paramValue2[paramNameDesc] ?? 'baz'}${testPathSuffix}/foo`
+
+          console.log(await indexLink.getAttribute('href'))
+          await expect(indexLink).toHaveAttribute('href', indexPath)
+          await expect(fooLink).toHaveAttribute('href', fooPath)
+          await expect(foo2Link).toHaveAttribute('href', foo2Path)
+
+          await indexLink.click()
+          await page.waitForURL(indexPath)
+          await expect(rootRouteHeading).toBeVisible()
+          await expect(pathRouteHeading).toBeVisible()
+          await expect(indexHeading).toBeVisible()
+          const indexParamValue = await indexParams.innerText()
+          expect(JSON.parse(indexParamValue)).toEqual(paramValue)
+
+          await fooLink.click()
+          await page.waitForURL(fooPath)
+          await expect(rootRouteHeading).toBeVisible()
+          await expect(pathRouteHeading).toBeVisible()
+          await expect(fooHeading).toBeVisible()
+          const fooParamValue = await fooParams.innerText()
+          expect(JSON.parse(fooParamValue)).toEqual(paramValue)
+
+          await foo2Link.click()
+          await page.waitForURL(foo2Path)
+          await expect(rootRouteHeading).toBeVisible()
+          await expect(pathRouteHeading).toBeVisible()
+          await expect(fooHeading).toBeVisible()
+          const foo2ParamValue = await fooParams.innerText()
+          expect(JSON.parse(foo2ParamValue)).toEqual(paramValue2)
+        })
+
+        test('Should not nest non-nested paths', async ({ page }) => {
+          const nonNestedPathHeading = page.getByTestId(
+            'non-nested-path-heading',
+          )
+          await expect(nonNestedPathHeading).toBeVisible()
+
+          await page.getByTestId(`l-to-${testPathDesc}`).click()
+          await page.waitForURL(path)
+
+          const rootRouteHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-root-route-heading`,
+          )
+
+          await expect(rootRouteHeading).toBeVisible()
+
+          const pathRouteHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-route-heading`,
+          )
+
+          const barHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-bar-heading`,
+          )
+
+          const barParams = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-bar-param`,
+          )
+
+          const barLink = page.getByTestId(`to-${testPathDesc}-bar`)
+          const bar2Link = page.getByTestId(`to-${testPathDesc}-bar-2`)
+
+          const barPath = `${path}/${testPathPrefix}${paramValue[paramNameDesc] ?? 'baz'}${testPathSuffix}/bar`
+          const bar2Path = `${path}/${testPathPrefix}${paramValue2[paramNameDesc] ?? 'baz'}${testPathSuffix}/bar`
+          await expect(barLink).toHaveAttribute('href', barPath)
+
+          await expect(bar2Link).toHaveAttribute('href', bar2Path)
+
+          await barLink.click()
+          await page.waitForURL(barPath)
+          await expect(rootRouteHeading).toBeVisible()
+          await expect(pathRouteHeading).not.toBeVisible()
+          await expect(barHeading).toBeVisible()
+          const barParamValue = await barParams.innerText()
+          expect(JSON.parse(barParamValue)).toEqual(paramValue)
+
+          await bar2Link.click()
+          await page.waitForURL(bar2Path)
+          await expect(rootRouteHeading).toBeVisible()
+          await expect(pathRouteHeading).not.toBeVisible()
+          await expect(barHeading).toBeVisible()
+          const bar2ParamValue = await barParams.innerText()
+          expect(JSON.parse(bar2ParamValue)).toEqual(paramValue2)
+        })
+      })
+    },
+  )
+})
diff --git a/packages/router-core/tests/match-by-path.test.ts b/packages/router-core/tests/match-by-path.test.ts
index bb886cf754..4de3b8d6c7 100644
--- a/packages/router-core/tests/match-by-path.test.ts
+++ b/packages/router-core/tests/match-by-path.test.ts
@@ -24,6 +24,7 @@ describe('default path matching', () => {
     ['/a/1', '/a/$id', { id: '1' }],
     ['/a/1/b', '/a/$id/b', { id: '1' }],
     ['/a/1/b/2', '/a/$id/b/$other', { id: '1', other: '2' }],
+    ['/a/1_/b/2', '/a/$id/b/$other', { id: '1_', other: '2' }],
     ['/a/1/b/2', '/a/$id/b/$id', { id: '2' }],
   ])('params %s => %s', (from, to, result) => {
     expect(
@@ -110,12 +111,14 @@ describe('case insensitive path matching', () => {
     ['/a/1', '/A/{-$id}', { id: '1' }],
     ['/a', '/A/{-$id}', {}],
     ['/a/1/b', '/A/{-$id}/B', { id: '1' }],
+    ['/a/1_/b', '/A/{-$id}/B', { id: '1_' }],
     // ['/a/b', '/A/{-$id}/B', {}],
     ['/a/1/b/2', '/A/{-$id}/B/{-$other}', { id: '1', other: '2' }],
     // ['/a/b/2', '/A/{-$id}/B/{-$other}', { other: '2' }],
     ['/a/1/b', '/A/{-$id}/B/{-$other}', { id: '1' }],
     // ['/a/b', '/A/{-$id}/B/{-$other}', {}],
     ['/a/1/b/2', '/A/{-$id}/B/{-$id}', { id: '2' }],
+    ['/a/1/b/2_', '/A/{-$id}/B/{-$id}', { id: '2_' }],
   ])('optional %s => %s', (from, to, result) => {
     expect(
       matchByPath('/', from, { to, caseSensitive: false, fuzzy: false }),
@@ -201,12 +204,12 @@ describe('fuzzy path matching', () => {
 describe('non-nested paths', () => {
   describe('default path matching', () => {
     it.each([
-      ['/', '/a_', '/a_', {}],
-      ['/', '/a_/b_', '/a_/b_', {}],
-      ['/', '/a_', '/a_/', {}],
-      ['/', '/a_/', '/a_/', {}],
-      ['/', '/a_/', '/a_', undefined],
-      ['/', '/b_', '/a_', undefined],
+      ['/', '/a', '/a_', {}],
+      ['/', '/a/b', '/a_/b_', {}],
+      ['/', '/a', '/a_/', {}],
+      ['/', '/a/', '/a_/', {}],
+      ['/', '/a/', '/a_', undefined],
+      ['/', '/b', '/a_', undefined],
     ])('static %s %s => %s', (base, from, to, result) => {
       expect(
         matchByPath(base, from, { to, caseSensitive: true, fuzzy: false }),
@@ -217,6 +220,7 @@ describe('non-nested paths', () => {
       ['/a/1', '/a_/$id_', { id: '1' }],
       ['/a/1/b', '/a_/$id_/b_', { id: '1' }],
       ['/a/1/b/2', '/a_/$id_/b_/$other_', { id: '1', other: '2' }],
+      ['/a/1_/b/2', '/a_/$id_/b_/$other_', { id: '1_', other: '2' }],
       ['/a/1/b/2', '/a_/$id_/b_/$id_', { id: '2' }],
     ])('params %s => %s', (from, to, result) => {
       expect(
diff --git a/packages/router-core/tests/path.test.ts b/packages/router-core/tests/path.test.ts
index ae5b3aaadb..71c217ed31 100644
--- a/packages/router-core/tests/path.test.ts
+++ b/packages/router-core/tests/path.test.ts
@@ -347,12 +347,24 @@ describe('interpolatePath', () => {
         params: { id: '123' },
         result: '/users/123',
       },
+      {
+        name: 'should interpolate the path',
+        path: '/users/$id',
+        params: { id: '123_' },
+        result: '/users/123_',
+      },
       {
         name: 'should interpolate the path with multiple params',
         path: '/users/$id/$name',
         params: { id: '123', name: 'tanner' },
         result: '/users/123/tanner',
       },
+      {
+        name: 'should interpolate the path with multiple params',
+        path: '/users/$id/$name',
+        params: { id: '123_', name: 'tanner' },
+        result: '/users/123_/tanner',
+      },
       {
         name: 'should interpolate the path with extra params',
         path: '/users/$id',
@@ -512,6 +524,12 @@ describe('interpolatePath', () => {
         params: { foo: 'bar' },
         result: '/bar.suffix',
       },
+      {
+        name: 'with suffix',
+        to: '/{$foo}.suffix',
+        params: { foo: 'bar_' },
+        result: '/bar_.suffix',
+      },
       {
         name: 'with prefix and suffix',
         to: '/prefix{$param}.suffix',
@@ -780,6 +798,16 @@ describe('matchPathname', () => {
           bar: 'foo',
         },
       },
+      {
+        name: 'regular',
+        input: '/docs/foo_',
+        matchingOptions: {
+          to: '/docs/$bar',
+        },
+        expectedMatchedParams: {
+          bar: 'foo_',
+        },
+      },
       {
         name: 'regular curly braces',
         input: '/docs/foo',
@@ -790,6 +818,16 @@ describe('matchPathname', () => {
           bar: 'foo',
         },
       },
+      {
+        name: 'with prefix',
+        input: '/docs/prefixfoo_',
+        matchingOptions: {
+          to: '/docs/prefix{$bar}',
+        },
+        expectedMatchedParams: {
+          bar: 'foo_',
+        },
+      },
       {
         name: 'with prefix',
         input: '/docs/prefixfoo',

From 91705d67c5fc78f51469a6171a9705307de202d0 Mon Sep 17 00:00:00 2001
From: Nico Lynzaad <nlynzaad@zylangroup.com>
Date: Mon, 22 Sep 2025 02:20:31 +0200
Subject: [PATCH 3/4] update tests for solid

---
 .../basic-file-based/src/routeTree.gen.ts     | 570 ++++++++++++++++--
 .../src/routes/non-nested/baz.$bazid.tsx      |  23 -
 .../src/routes/non-nested/baz.tsx             |  14 -
 .../routes/non-nested/baz_.$bazid.edit.tsx    |  22 -
 .../src/routes/non-nested/named/$baz.foo.tsx  |  20 +
 .../routes/non-nested/named/$baz.index.tsx    |  19 +
 .../routes/non-nested/named/$baz.route.tsx    |  16 +
 .../src/routes/non-nested/named/$baz_.bar.tsx |  19 +
 .../src/routes/non-nested/named/route.tsx     |  58 ++
 .../src/routes/non-nested/path/baz.foo.tsx    |  20 +
 .../src/routes/non-nested/path/baz.index.tsx  |  19 +
 .../src/routes/non-nested/path/baz.route.tsx  |  16 +
 .../src/routes/non-nested/path/baz_.bar.tsx   |  19 +
 .../src/routes/non-nested/path/route.tsx      |  33 +
 .../non-nested/prefix/prefix{$baz}.foo.tsx    |  20 +
 .../non-nested/prefix/prefix{$baz}.index.tsx  |  19 +
 .../non-nested/prefix/prefix{$baz}.route.tsx  |  16 +
 .../non-nested/prefix/prefix{$baz}_.bar.tsx   |  19 +
 .../src/routes/non-nested/prefix/route.tsx    |  58 ++
 .../src/routes/non-nested/route.tsx           |  26 +-
 .../src/routes/non-nested/suffix/route.tsx    |  58 ++
 .../non-nested/suffix/{$baz}suffix.foo.tsx    |  20 +
 .../non-nested/suffix/{$baz}suffix.index.tsx  |  19 +
 .../non-nested/suffix/{$baz}suffix.route.tsx  |  16 +
 .../non-nested/suffix/{$baz}suffix_.bar.tsx   |  19 +
 .../basic-file-based/tests/app.spec.ts        |  35 --
 .../tests/non-nested-paths.spec.ts            | 192 ++++++
 27 files changed, 1209 insertions(+), 176 deletions(-)
 delete mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/baz.$bazid.tsx
 delete mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/baz.tsx
 delete mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/baz_.$bazid.edit.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz.foo.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz.index.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz.route.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/named/route.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz.foo.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz.index.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz.route.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/path/route.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.foo.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.index.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.route.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/route.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/route.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.foo.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.index.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.route.tsx
 create mode 100644 e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx
 create mode 100644 e2e/solid-router/basic-file-based/tests/non-nested-paths.spec.ts

diff --git a/e2e/solid-router/basic-file-based/src/routeTree.gen.ts b/e2e/solid-router/basic-file-based/src/routeTree.gen.ts
index 2309296864..1dab293d2e 100644
--- a/e2e/solid-router/basic-file-based/src/routeTree.gen.ts
+++ b/e2e/solid-router/basic-file-based/src/routeTree.gen.ts
@@ -30,7 +30,6 @@ import { Route as ParamsPsIndexRouteImport } from './routes/params-ps/index'
 import { Route as SearchParamsDefaultRouteImport } from './routes/search-params/default'
 import { Route as RedirectTargetRouteImport } from './routes/redirect/$target'
 import { Route as PostsPostIdRouteImport } from './routes/posts.$postId'
-import { Route as NonNestedBazRouteImport } from './routes/non-nested/baz'
 import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2'
 import { Route as groupLazyinsideRouteImport } from './routes/(group)/lazyinside'
 import { Route as groupInsideRouteImport } from './routes/(group)/inside'
@@ -39,6 +38,10 @@ import { Route as anotherGroupOnlyrouteinsideRouteImport } from './routes/(anoth
 import { Route as RelativeUseNavigateRouteRouteImport } from './routes/relative/useNavigate/route'
 import { Route as RelativeLinkRouteRouteImport } from './routes/relative/link/route'
 import { Route as ParamsPsNonNestedRouteRouteImport } from './routes/params-ps/non-nested/route'
+import { Route as NonNestedSuffixRouteRouteImport } from './routes/non-nested/suffix/route'
+import { Route as NonNestedPrefixRouteRouteImport } from './routes/non-nested/prefix/route'
+import { Route as NonNestedPathRouteRouteImport } from './routes/non-nested/path/route'
+import { Route as NonNestedNamedRouteRouteImport } from './routes/non-nested/named/route'
 import { Route as RedirectTargetIndexRouteImport } from './routes/redirect/$target/index'
 import { Route as RelativeUseNavigateRelativeUseNavigateBRouteImport } from './routes/relative/useNavigate/relative-useNavigate-b'
 import { Route as RelativeUseNavigateRelativeUseNavigateARouteImport } from './routes/relative/useNavigate/relative-useNavigate-a'
@@ -51,21 +54,35 @@ import { Route as RedirectTargetViaLoaderRouteImport } from './routes/redirect/$
 import { Route as RedirectTargetViaBeforeLoadRouteImport } from './routes/redirect/$target/via-beforeLoad'
 import { Route as PostsPostIdEditRouteImport } from './routes/posts_.$postId.edit'
 import { Route as ParamsSingleValueRouteImport } from './routes/params.single.$value'
-import { Route as NonNestedBazBazidRouteImport } from './routes/non-nested/baz.$bazid'
 import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b'
 import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a'
 import { Route as groupSubfolderInsideRouteImport } from './routes/(group)/subfolder/inside'
 import { Route as groupLayoutInsidelayoutRouteImport } from './routes/(group)/_layout.insidelayout'
 import { Route as ParamsPsNonNestedFooRouteRouteImport } from './routes/params-ps/non-nested/$foo_/route'
 import { Route as ParamsPsNamedFooRouteRouteImport } from './routes/params-ps/named/$foo/route'
+import { Route as NonNestedSuffixChar123bazChar125suffixRouteRouteImport } from './routes/non-nested/suffix/{$baz}suffix.route'
+import { Route as NonNestedPrefixPrefixChar123bazChar125RouteRouteImport } from './routes/non-nested/prefix/prefix{$baz}.route'
+import { Route as NonNestedPathBazRouteRouteImport } from './routes/non-nested/path/baz.route'
+import { Route as NonNestedNamedBazRouteRouteImport } from './routes/non-nested/named/$baz.route'
 import { Route as RelativeUseNavigateWithSearchIndexRouteImport } from './routes/relative/useNavigate/with-search/index'
 import { Route as RelativeUseNavigatePathIndexRouteImport } from './routes/relative/useNavigate/path/index'
 import { Route as RelativeUseNavigateNestedIndexRouteImport } from './routes/relative/useNavigate/nested/index'
 import { Route as RelativeLinkWithSearchIndexRouteImport } from './routes/relative/link/with-search/index'
 import { Route as RelativeLinkPathIndexRouteImport } from './routes/relative/link/path/index'
 import { Route as RelativeLinkNestedIndexRouteImport } from './routes/relative/link/nested/index'
+import { Route as NonNestedSuffixChar123bazChar125suffixIndexRouteImport } from './routes/non-nested/suffix/{$baz}suffix.index'
+import { Route as NonNestedPrefixPrefixChar123bazChar125IndexRouteImport } from './routes/non-nested/prefix/prefix{$baz}.index'
+import { Route as NonNestedPathBazIndexRouteImport } from './routes/non-nested/path/baz.index'
+import { Route as NonNestedNamedBazIndexRouteImport } from './routes/non-nested/named/$baz.index'
 import { Route as ParamsPsNonNestedFooBarRouteImport } from './routes/params-ps/non-nested/$foo_/$bar'
-import { Route as NonNestedBazBazidEditRouteImport } from './routes/non-nested/baz_.$bazid.edit'
+import { Route as NonNestedSuffixChar123bazChar125suffixBarRouteImport } from './routes/non-nested/suffix/{$baz}suffix_.bar'
+import { Route as NonNestedSuffixChar123bazChar125suffixFooRouteImport } from './routes/non-nested/suffix/{$baz}suffix.foo'
+import { Route as NonNestedPrefixPrefixChar123bazChar125BarRouteImport } from './routes/non-nested/prefix/prefix{$baz}_.bar'
+import { Route as NonNestedPrefixPrefixChar123bazChar125FooRouteImport } from './routes/non-nested/prefix/prefix{$baz}.foo'
+import { Route as NonNestedPathBazBarRouteImport } from './routes/non-nested/path/baz_.bar'
+import { Route as NonNestedPathBazFooRouteImport } from './routes/non-nested/path/baz.foo'
+import { Route as NonNestedNamedBazBarRouteImport } from './routes/non-nested/named/$baz_.bar'
+import { Route as NonNestedNamedBazFooRouteImport } from './routes/non-nested/named/$baz.foo'
 import { Route as ParamsPsNamedFooBarRouteRouteImport } from './routes/params-ps/named/$foo/$bar.route'
 import { Route as RelativeUseNavigatePathPathIndexRouteImport } from './routes/relative/useNavigate/path/$path/index'
 import { Route as RelativeUseNavigateNestedDeepIndexRouteImport } from './routes/relative/useNavigate/nested/deep/index'
@@ -173,11 +190,6 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({
   path: '/$postId',
   getParentRoute: () => PostsRoute,
 } as any)
-const NonNestedBazRoute = NonNestedBazRouteImport.update({
-  id: '/baz',
-  path: '/baz',
-  getParentRoute: () => NonNestedRouteRoute,
-} as any)
 const LayoutLayout2Route = LayoutLayout2RouteImport.update({
   id: '/_layout-2',
   getParentRoute: () => LayoutRoute,
@@ -220,6 +232,26 @@ const ParamsPsNonNestedRouteRoute = ParamsPsNonNestedRouteRouteImport.update({
   path: '/params-ps/non-nested',
   getParentRoute: () => rootRouteImport,
 } as any)
+const NonNestedSuffixRouteRoute = NonNestedSuffixRouteRouteImport.update({
+  id: '/suffix',
+  path: '/suffix',
+  getParentRoute: () => NonNestedRouteRoute,
+} as any)
+const NonNestedPrefixRouteRoute = NonNestedPrefixRouteRouteImport.update({
+  id: '/prefix',
+  path: '/prefix',
+  getParentRoute: () => NonNestedRouteRoute,
+} as any)
+const NonNestedPathRouteRoute = NonNestedPathRouteRouteImport.update({
+  id: '/path',
+  path: '/path',
+  getParentRoute: () => NonNestedRouteRoute,
+} as any)
+const NonNestedNamedRouteRoute = NonNestedNamedRouteRouteImport.update({
+  id: '/named',
+  path: '/named',
+  getParentRoute: () => NonNestedRouteRoute,
+} as any)
 const RedirectTargetIndexRoute = RedirectTargetIndexRouteImport.update({
   id: '/',
   path: '/',
@@ -285,11 +317,6 @@ const ParamsSingleValueRoute = ParamsSingleValueRouteImport.update({
   path: '/params/single/$value',
   getParentRoute: () => rootRouteImport,
 } as any)
-const NonNestedBazBazidRoute = NonNestedBazBazidRouteImport.update({
-  id: '/$bazid',
-  path: '/$bazid',
-  getParentRoute: () => NonNestedBazRoute,
-} as any)
 const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({
   id: '/layout-b',
   path: '/layout-b',
@@ -321,6 +348,28 @@ const ParamsPsNamedFooRouteRoute = ParamsPsNamedFooRouteRouteImport.update({
   path: '/params-ps/named/$foo',
   getParentRoute: () => rootRouteImport,
 } as any)
+const NonNestedSuffixChar123bazChar125suffixRouteRoute =
+  NonNestedSuffixChar123bazChar125suffixRouteRouteImport.update({
+    id: '/{$baz}suffix',
+    path: '/{$baz}suffix',
+    getParentRoute: () => NonNestedSuffixRouteRoute,
+  } as any)
+const NonNestedPrefixPrefixChar123bazChar125RouteRoute =
+  NonNestedPrefixPrefixChar123bazChar125RouteRouteImport.update({
+    id: '/prefix{$baz}',
+    path: '/prefix{$baz}',
+    getParentRoute: () => NonNestedPrefixRouteRoute,
+  } as any)
+const NonNestedPathBazRouteRoute = NonNestedPathBazRouteRouteImport.update({
+  id: '/baz',
+  path: '/baz',
+  getParentRoute: () => NonNestedPathRouteRoute,
+} as any)
+const NonNestedNamedBazRouteRoute = NonNestedNamedBazRouteRouteImport.update({
+  id: '/$baz',
+  path: '/$baz',
+  getParentRoute: () => NonNestedNamedRouteRoute,
+} as any)
 const RelativeUseNavigateWithSearchIndexRoute =
   RelativeUseNavigateWithSearchIndexRouteImport.update({
     id: '/with-search/',
@@ -355,15 +404,76 @@ const RelativeLinkNestedIndexRoute = RelativeLinkNestedIndexRouteImport.update({
   path: '/nested/',
   getParentRoute: () => RelativeLinkRouteRoute,
 } as any)
+const NonNestedSuffixChar123bazChar125suffixIndexRoute =
+  NonNestedSuffixChar123bazChar125suffixIndexRouteImport.update({
+    id: '/',
+    path: '/',
+    getParentRoute: () => NonNestedSuffixChar123bazChar125suffixRouteRoute,
+  } as any)
+const NonNestedPrefixPrefixChar123bazChar125IndexRoute =
+  NonNestedPrefixPrefixChar123bazChar125IndexRouteImport.update({
+    id: '/',
+    path: '/',
+    getParentRoute: () => NonNestedPrefixPrefixChar123bazChar125RouteRoute,
+  } as any)
+const NonNestedPathBazIndexRoute = NonNestedPathBazIndexRouteImport.update({
+  id: '/',
+  path: '/',
+  getParentRoute: () => NonNestedPathBazRouteRoute,
+} as any)
+const NonNestedNamedBazIndexRoute = NonNestedNamedBazIndexRouteImport.update({
+  id: '/',
+  path: '/',
+  getParentRoute: () => NonNestedNamedBazRouteRoute,
+} as any)
 const ParamsPsNonNestedFooBarRoute = ParamsPsNonNestedFooBarRouteImport.update({
   id: '/$bar',
   path: '/$bar',
   getParentRoute: () => ParamsPsNonNestedFooRouteRoute,
 } as any)
-const NonNestedBazBazidEditRoute = NonNestedBazBazidEditRouteImport.update({
-  id: '/baz_/$bazid/edit',
-  path: '/baz/$bazid/edit',
-  getParentRoute: () => NonNestedRouteRoute,
+const NonNestedSuffixChar123bazChar125suffixBarRoute =
+  NonNestedSuffixChar123bazChar125suffixBarRouteImport.update({
+    id: '/{$baz}suffix_/bar',
+    path: '/{$baz}suffix/bar',
+    getParentRoute: () => NonNestedSuffixRouteRoute,
+  } as any)
+const NonNestedSuffixChar123bazChar125suffixFooRoute =
+  NonNestedSuffixChar123bazChar125suffixFooRouteImport.update({
+    id: '/foo',
+    path: '/foo',
+    getParentRoute: () => NonNestedSuffixChar123bazChar125suffixRouteRoute,
+  } as any)
+const NonNestedPrefixPrefixChar123bazChar125BarRoute =
+  NonNestedPrefixPrefixChar123bazChar125BarRouteImport.update({
+    id: '/prefix{$baz}_/bar',
+    path: '/prefix{$baz}/bar',
+    getParentRoute: () => NonNestedPrefixRouteRoute,
+  } as any)
+const NonNestedPrefixPrefixChar123bazChar125FooRoute =
+  NonNestedPrefixPrefixChar123bazChar125FooRouteImport.update({
+    id: '/foo',
+    path: '/foo',
+    getParentRoute: () => NonNestedPrefixPrefixChar123bazChar125RouteRoute,
+  } as any)
+const NonNestedPathBazBarRoute = NonNestedPathBazBarRouteImport.update({
+  id: '/baz_/bar',
+  path: '/baz/bar',
+  getParentRoute: () => NonNestedPathRouteRoute,
+} as any)
+const NonNestedPathBazFooRoute = NonNestedPathBazFooRouteImport.update({
+  id: '/foo',
+  path: '/foo',
+  getParentRoute: () => NonNestedPathBazRouteRoute,
+} as any)
+const NonNestedNamedBazBarRoute = NonNestedNamedBazBarRouteImport.update({
+  id: '/$baz_/bar',
+  path: '/$baz/bar',
+  getParentRoute: () => NonNestedNamedRouteRoute,
+} as any)
+const NonNestedNamedBazFooRoute = NonNestedNamedBazFooRouteImport.update({
+  id: '/foo',
+  path: '/foo',
+  getParentRoute: () => NonNestedNamedBazRouteRoute,
 } as any)
 const ParamsPsNamedFooBarRouteRoute =
   ParamsPsNamedFooBarRouteRouteImport.update({
@@ -412,13 +522,16 @@ export interface FileRoutesByFullPath {
   '/notRemountDeps': typeof NotRemountDepsRoute
   '/posts': typeof PostsRouteWithChildren
   '/remountDeps': typeof RemountDepsRoute
+  '/non-nested/named': typeof NonNestedNamedRouteRouteWithChildren
+  '/non-nested/path': typeof NonNestedPathRouteRouteWithChildren
+  '/non-nested/prefix': typeof NonNestedPrefixRouteRouteWithChildren
+  '/non-nested/suffix': typeof NonNestedSuffixRouteRouteWithChildren
   '/params-ps/non-nested': typeof ParamsPsNonNestedRouteRouteWithChildren
   '/relative/link': typeof RelativeLinkRouteRouteWithChildren
   '/relative/useNavigate': typeof RelativeUseNavigateRouteRouteWithChildren
   '/onlyrouteinside': typeof anotherGroupOnlyrouteinsideRoute
   '/inside': typeof groupInsideRoute
   '/lazyinside': typeof groupLazyinsideRoute
-  '/non-nested/baz': typeof NonNestedBazRouteWithChildren
   '/posts/$postId': typeof PostsPostIdRoute
   '/redirect/$target': typeof RedirectTargetRouteWithChildren
   '/search-params/default': typeof SearchParamsDefaultRoute
@@ -427,13 +540,16 @@ export interface FileRoutesByFullPath {
   '/redirect': typeof RedirectIndexRoute
   '/relative': typeof RelativeIndexRoute
   '/search-params/': typeof SearchParamsIndexRoute
+  '/non-nested/named/$baz': typeof NonNestedNamedBazRouteRouteWithChildren
+  '/non-nested/path/baz': typeof NonNestedPathBazRouteRouteWithChildren
+  '/non-nested/prefix/prefix{$baz}': typeof NonNestedPrefixPrefixChar123bazChar125RouteRouteWithChildren
+  '/non-nested/suffix/{$baz}suffix': typeof NonNestedSuffixChar123bazChar125suffixRouteRouteWithChildren
   '/params-ps/named/$foo': typeof ParamsPsNamedFooRouteRouteWithChildren
   '/params-ps/non-nested/$foo': typeof ParamsPsNonNestedFooRouteRouteWithChildren
   '/insidelayout': typeof groupLayoutInsidelayoutRoute
   '/subfolder/inside': typeof groupSubfolderInsideRoute
   '/layout-a': typeof LayoutLayout2LayoutARoute
   '/layout-b': typeof LayoutLayout2LayoutBRoute
-  '/non-nested/baz/$bazid': typeof NonNestedBazBazidRoute
   '/params/single/$value': typeof ParamsSingleValueRoute
   '/posts/$postId/edit': typeof PostsPostIdEditRoute
   '/redirect/$target/via-beforeLoad': typeof RedirectTargetViaBeforeLoadRoute
@@ -447,8 +563,19 @@ export interface FileRoutesByFullPath {
   '/relative/useNavigate/relative-useNavigate-b': typeof RelativeUseNavigateRelativeUseNavigateBRoute
   '/redirect/$target/': typeof RedirectTargetIndexRoute
   '/params-ps/named/$foo/$bar': typeof ParamsPsNamedFooBarRouteRouteWithChildren
-  '/non-nested/baz/$bazid/edit': typeof NonNestedBazBazidEditRoute
+  '/non-nested/named/$baz/foo': typeof NonNestedNamedBazFooRoute
+  '/non-nested/named/$baz/bar': typeof NonNestedNamedBazBarRoute
+  '/non-nested/path/baz/foo': typeof NonNestedPathBazFooRoute
+  '/non-nested/path/baz/bar': typeof NonNestedPathBazBarRoute
+  '/non-nested/prefix/prefix{$baz}/foo': typeof NonNestedPrefixPrefixChar123bazChar125FooRoute
+  '/non-nested/prefix/prefix{$baz}/bar': typeof NonNestedPrefixPrefixChar123bazChar125BarRoute
+  '/non-nested/suffix/{$baz}suffix/foo': typeof NonNestedSuffixChar123bazChar125suffixFooRoute
+  '/non-nested/suffix/{$baz}suffix/bar': typeof NonNestedSuffixChar123bazChar125suffixBarRoute
   '/params-ps/non-nested/$foo/$bar': typeof ParamsPsNonNestedFooBarRoute
+  '/non-nested/named/$baz/': typeof NonNestedNamedBazIndexRoute
+  '/non-nested/path/baz/': typeof NonNestedPathBazIndexRoute
+  '/non-nested/prefix/prefix{$baz}/': typeof NonNestedPrefixPrefixChar123bazChar125IndexRoute
+  '/non-nested/suffix/{$baz}suffix/': typeof NonNestedSuffixChar123bazChar125suffixIndexRoute
   '/relative/link/nested': typeof RelativeLinkNestedIndexRoute
   '/relative/link/path': typeof RelativeLinkPathIndexRoute
   '/relative/link/with-search': typeof RelativeLinkWithSearchIndexRoute
@@ -470,13 +597,16 @@ export interface FileRoutesByTo {
   '/editing-b': typeof EditingBRoute
   '/notRemountDeps': typeof NotRemountDepsRoute
   '/remountDeps': typeof RemountDepsRoute
+  '/non-nested/named': typeof NonNestedNamedRouteRouteWithChildren
+  '/non-nested/path': typeof NonNestedPathRouteRouteWithChildren
+  '/non-nested/prefix': typeof NonNestedPrefixRouteRouteWithChildren
+  '/non-nested/suffix': typeof NonNestedSuffixRouteRouteWithChildren
   '/params-ps/non-nested': typeof ParamsPsNonNestedRouteRouteWithChildren
   '/relative/link': typeof RelativeLinkRouteRouteWithChildren
   '/relative/useNavigate': typeof RelativeUseNavigateRouteRouteWithChildren
   '/onlyrouteinside': typeof anotherGroupOnlyrouteinsideRoute
   '/inside': typeof groupInsideRoute
   '/lazyinside': typeof groupLazyinsideRoute
-  '/non-nested/baz': typeof NonNestedBazRouteWithChildren
   '/posts/$postId': typeof PostsPostIdRoute
   '/search-params/default': typeof SearchParamsDefaultRoute
   '/params-ps': typeof ParamsPsIndexRoute
@@ -490,7 +620,6 @@ export interface FileRoutesByTo {
   '/subfolder/inside': typeof groupSubfolderInsideRoute
   '/layout-a': typeof LayoutLayout2LayoutARoute
   '/layout-b': typeof LayoutLayout2LayoutBRoute
-  '/non-nested/baz/$bazid': typeof NonNestedBazBazidRoute
   '/params/single/$value': typeof ParamsSingleValueRoute
   '/posts/$postId/edit': typeof PostsPostIdEditRoute
   '/redirect/$target/via-beforeLoad': typeof RedirectTargetViaBeforeLoadRoute
@@ -504,8 +633,19 @@ export interface FileRoutesByTo {
   '/relative/useNavigate/relative-useNavigate-b': typeof RelativeUseNavigateRelativeUseNavigateBRoute
   '/redirect/$target': typeof RedirectTargetIndexRoute
   '/params-ps/named/$foo/$bar': typeof ParamsPsNamedFooBarRouteRouteWithChildren
-  '/non-nested/baz/$bazid/edit': typeof NonNestedBazBazidEditRoute
+  '/non-nested/named/$baz/foo': typeof NonNestedNamedBazFooRoute
+  '/non-nested/named/$baz/bar': typeof NonNestedNamedBazBarRoute
+  '/non-nested/path/baz/foo': typeof NonNestedPathBazFooRoute
+  '/non-nested/path/baz/bar': typeof NonNestedPathBazBarRoute
+  '/non-nested/prefix/prefix{$baz}/foo': typeof NonNestedPrefixPrefixChar123bazChar125FooRoute
+  '/non-nested/prefix/prefix{$baz}/bar': typeof NonNestedPrefixPrefixChar123bazChar125BarRoute
+  '/non-nested/suffix/{$baz}suffix/foo': typeof NonNestedSuffixChar123bazChar125suffixFooRoute
+  '/non-nested/suffix/{$baz}suffix/bar': typeof NonNestedSuffixChar123bazChar125suffixBarRoute
   '/params-ps/non-nested/$foo/$bar': typeof ParamsPsNonNestedFooBarRoute
+  '/non-nested/named/$baz': typeof NonNestedNamedBazIndexRoute
+  '/non-nested/path/baz': typeof NonNestedPathBazIndexRoute
+  '/non-nested/prefix/prefix{$baz}': typeof NonNestedPrefixPrefixChar123bazChar125IndexRoute
+  '/non-nested/suffix/{$baz}suffix': typeof NonNestedSuffixChar123bazChar125suffixIndexRoute
   '/relative/link/nested': typeof RelativeLinkNestedIndexRoute
   '/relative/link/path': typeof RelativeLinkPathIndexRoute
   '/relative/link/with-search': typeof RelativeLinkWithSearchIndexRoute
@@ -531,6 +671,10 @@ export interface FileRoutesById {
   '/notRemountDeps': typeof NotRemountDepsRoute
   '/posts': typeof PostsRouteWithChildren
   '/remountDeps': typeof RemountDepsRoute
+  '/non-nested/named': typeof NonNestedNamedRouteRouteWithChildren
+  '/non-nested/path': typeof NonNestedPathRouteRouteWithChildren
+  '/non-nested/prefix': typeof NonNestedPrefixRouteRouteWithChildren
+  '/non-nested/suffix': typeof NonNestedSuffixRouteRouteWithChildren
   '/params-ps/non-nested': typeof ParamsPsNonNestedRouteRouteWithChildren
   '/relative/link': typeof RelativeLinkRouteRouteWithChildren
   '/relative/useNavigate': typeof RelativeUseNavigateRouteRouteWithChildren
@@ -540,7 +684,6 @@ export interface FileRoutesById {
   '/(group)/inside': typeof groupInsideRoute
   '/(group)/lazyinside': typeof groupLazyinsideRoute
   '/_layout/_layout-2': typeof LayoutLayout2RouteWithChildren
-  '/non-nested/baz': typeof NonNestedBazRouteWithChildren
   '/posts/$postId': typeof PostsPostIdRoute
   '/redirect/$target': typeof RedirectTargetRouteWithChildren
   '/search-params/default': typeof SearchParamsDefaultRoute
@@ -549,13 +692,16 @@ export interface FileRoutesById {
   '/redirect/': typeof RedirectIndexRoute
   '/relative/': typeof RelativeIndexRoute
   '/search-params/': typeof SearchParamsIndexRoute
+  '/non-nested/named/$baz': typeof NonNestedNamedBazRouteRouteWithChildren
+  '/non-nested/path/baz': typeof NonNestedPathBazRouteRouteWithChildren
+  '/non-nested/prefix/prefix{$baz}': typeof NonNestedPrefixPrefixChar123bazChar125RouteRouteWithChildren
+  '/non-nested/suffix/{$baz}suffix': typeof NonNestedSuffixChar123bazChar125suffixRouteRouteWithChildren
   '/params-ps/named/$foo': typeof ParamsPsNamedFooRouteRouteWithChildren
   '/params-ps/non-nested/$foo_': typeof ParamsPsNonNestedFooRouteRouteWithChildren
   '/(group)/_layout/insidelayout': typeof groupLayoutInsidelayoutRoute
   '/(group)/subfolder/inside': typeof groupSubfolderInsideRoute
   '/_layout/_layout-2/layout-a': typeof LayoutLayout2LayoutARoute
   '/_layout/_layout-2/layout-b': typeof LayoutLayout2LayoutBRoute
-  '/non-nested/baz/$bazid': typeof NonNestedBazBazidRoute
   '/params/single/$value': typeof ParamsSingleValueRoute
   '/posts_/$postId/edit': typeof PostsPostIdEditRoute
   '/redirect/$target/via-beforeLoad': typeof RedirectTargetViaBeforeLoadRoute
@@ -569,8 +715,19 @@ export interface FileRoutesById {
   '/relative/useNavigate/relative-useNavigate-b': typeof RelativeUseNavigateRelativeUseNavigateBRoute
   '/redirect/$target/': typeof RedirectTargetIndexRoute
   '/params-ps/named/$foo/$bar': typeof ParamsPsNamedFooBarRouteRouteWithChildren
-  '/non-nested/baz_/$bazid/edit': typeof NonNestedBazBazidEditRoute
+  '/non-nested/named/$baz/foo': typeof NonNestedNamedBazFooRoute
+  '/non-nested/named/$baz_/bar': typeof NonNestedNamedBazBarRoute
+  '/non-nested/path/baz/foo': typeof NonNestedPathBazFooRoute
+  '/non-nested/path/baz_/bar': typeof NonNestedPathBazBarRoute
+  '/non-nested/prefix/prefix{$baz}/foo': typeof NonNestedPrefixPrefixChar123bazChar125FooRoute
+  '/non-nested/prefix/prefix{$baz}_/bar': typeof NonNestedPrefixPrefixChar123bazChar125BarRoute
+  '/non-nested/suffix/{$baz}suffix/foo': typeof NonNestedSuffixChar123bazChar125suffixFooRoute
+  '/non-nested/suffix/{$baz}suffix_/bar': typeof NonNestedSuffixChar123bazChar125suffixBarRoute
   '/params-ps/non-nested/$foo_/$bar': typeof ParamsPsNonNestedFooBarRoute
+  '/non-nested/named/$baz/': typeof NonNestedNamedBazIndexRoute
+  '/non-nested/path/baz/': typeof NonNestedPathBazIndexRoute
+  '/non-nested/prefix/prefix{$baz}/': typeof NonNestedPrefixPrefixChar123bazChar125IndexRoute
+  '/non-nested/suffix/{$baz}suffix/': typeof NonNestedSuffixChar123bazChar125suffixIndexRoute
   '/relative/link/nested/': typeof RelativeLinkNestedIndexRoute
   '/relative/link/path/': typeof RelativeLinkPathIndexRoute
   '/relative/link/with-search/': typeof RelativeLinkWithSearchIndexRoute
@@ -596,13 +753,16 @@ export interface FileRouteTypes {
     | '/notRemountDeps'
     | '/posts'
     | '/remountDeps'
+    | '/non-nested/named'
+    | '/non-nested/path'
+    | '/non-nested/prefix'
+    | '/non-nested/suffix'
     | '/params-ps/non-nested'
     | '/relative/link'
     | '/relative/useNavigate'
     | '/onlyrouteinside'
     | '/inside'
     | '/lazyinside'
-    | '/non-nested/baz'
     | '/posts/$postId'
     | '/redirect/$target'
     | '/search-params/default'
@@ -611,13 +771,16 @@ export interface FileRouteTypes {
     | '/redirect'
     | '/relative'
     | '/search-params/'
+    | '/non-nested/named/$baz'
+    | '/non-nested/path/baz'
+    | '/non-nested/prefix/prefix{$baz}'
+    | '/non-nested/suffix/{$baz}suffix'
     | '/params-ps/named/$foo'
     | '/params-ps/non-nested/$foo'
     | '/insidelayout'
     | '/subfolder/inside'
     | '/layout-a'
     | '/layout-b'
-    | '/non-nested/baz/$bazid'
     | '/params/single/$value'
     | '/posts/$postId/edit'
     | '/redirect/$target/via-beforeLoad'
@@ -631,8 +794,19 @@ export interface FileRouteTypes {
     | '/relative/useNavigate/relative-useNavigate-b'
     | '/redirect/$target/'
     | '/params-ps/named/$foo/$bar'
-    | '/non-nested/baz/$bazid/edit'
+    | '/non-nested/named/$baz/foo'
+    | '/non-nested/named/$baz/bar'
+    | '/non-nested/path/baz/foo'
+    | '/non-nested/path/baz/bar'
+    | '/non-nested/prefix/prefix{$baz}/foo'
+    | '/non-nested/prefix/prefix{$baz}/bar'
+    | '/non-nested/suffix/{$baz}suffix/foo'
+    | '/non-nested/suffix/{$baz}suffix/bar'
     | '/params-ps/non-nested/$foo/$bar'
+    | '/non-nested/named/$baz/'
+    | '/non-nested/path/baz/'
+    | '/non-nested/prefix/prefix{$baz}/'
+    | '/non-nested/suffix/{$baz}suffix/'
     | '/relative/link/nested'
     | '/relative/link/path'
     | '/relative/link/with-search'
@@ -654,13 +828,16 @@ export interface FileRouteTypes {
     | '/editing-b'
     | '/notRemountDeps'
     | '/remountDeps'
+    | '/non-nested/named'
+    | '/non-nested/path'
+    | '/non-nested/prefix'
+    | '/non-nested/suffix'
     | '/params-ps/non-nested'
     | '/relative/link'
     | '/relative/useNavigate'
     | '/onlyrouteinside'
     | '/inside'
     | '/lazyinside'
-    | '/non-nested/baz'
     | '/posts/$postId'
     | '/search-params/default'
     | '/params-ps'
@@ -674,7 +851,6 @@ export interface FileRouteTypes {
     | '/subfolder/inside'
     | '/layout-a'
     | '/layout-b'
-    | '/non-nested/baz/$bazid'
     | '/params/single/$value'
     | '/posts/$postId/edit'
     | '/redirect/$target/via-beforeLoad'
@@ -688,8 +864,19 @@ export interface FileRouteTypes {
     | '/relative/useNavigate/relative-useNavigate-b'
     | '/redirect/$target'
     | '/params-ps/named/$foo/$bar'
-    | '/non-nested/baz/$bazid/edit'
+    | '/non-nested/named/$baz/foo'
+    | '/non-nested/named/$baz/bar'
+    | '/non-nested/path/baz/foo'
+    | '/non-nested/path/baz/bar'
+    | '/non-nested/prefix/prefix{$baz}/foo'
+    | '/non-nested/prefix/prefix{$baz}/bar'
+    | '/non-nested/suffix/{$baz}suffix/foo'
+    | '/non-nested/suffix/{$baz}suffix/bar'
     | '/params-ps/non-nested/$foo/$bar'
+    | '/non-nested/named/$baz'
+    | '/non-nested/path/baz'
+    | '/non-nested/prefix/prefix{$baz}'
+    | '/non-nested/suffix/{$baz}suffix'
     | '/relative/link/nested'
     | '/relative/link/path'
     | '/relative/link/with-search'
@@ -714,6 +901,10 @@ export interface FileRouteTypes {
     | '/notRemountDeps'
     | '/posts'
     | '/remountDeps'
+    | '/non-nested/named'
+    | '/non-nested/path'
+    | '/non-nested/prefix'
+    | '/non-nested/suffix'
     | '/params-ps/non-nested'
     | '/relative/link'
     | '/relative/useNavigate'
@@ -723,7 +914,6 @@ export interface FileRouteTypes {
     | '/(group)/inside'
     | '/(group)/lazyinside'
     | '/_layout/_layout-2'
-    | '/non-nested/baz'
     | '/posts/$postId'
     | '/redirect/$target'
     | '/search-params/default'
@@ -732,13 +922,16 @@ export interface FileRouteTypes {
     | '/redirect/'
     | '/relative/'
     | '/search-params/'
+    | '/non-nested/named/$baz'
+    | '/non-nested/path/baz'
+    | '/non-nested/prefix/prefix{$baz}'
+    | '/non-nested/suffix/{$baz}suffix'
     | '/params-ps/named/$foo'
     | '/params-ps/non-nested/$foo_'
     | '/(group)/_layout/insidelayout'
     | '/(group)/subfolder/inside'
     | '/_layout/_layout-2/layout-a'
     | '/_layout/_layout-2/layout-b'
-    | '/non-nested/baz/$bazid'
     | '/params/single/$value'
     | '/posts_/$postId/edit'
     | '/redirect/$target/via-beforeLoad'
@@ -752,8 +945,19 @@ export interface FileRouteTypes {
     | '/relative/useNavigate/relative-useNavigate-b'
     | '/redirect/$target/'
     | '/params-ps/named/$foo/$bar'
-    | '/non-nested/baz_/$bazid/edit'
+    | '/non-nested/named/$baz/foo'
+    | '/non-nested/named/$baz_/bar'
+    | '/non-nested/path/baz/foo'
+    | '/non-nested/path/baz_/bar'
+    | '/non-nested/prefix/prefix{$baz}/foo'
+    | '/non-nested/prefix/prefix{$baz}_/bar'
+    | '/non-nested/suffix/{$baz}suffix/foo'
+    | '/non-nested/suffix/{$baz}suffix_/bar'
     | '/params-ps/non-nested/$foo_/$bar'
+    | '/non-nested/named/$baz/'
+    | '/non-nested/path/baz/'
+    | '/non-nested/prefix/prefix{$baz}/'
+    | '/non-nested/suffix/{$baz}suffix/'
     | '/relative/link/nested/'
     | '/relative/link/path/'
     | '/relative/link/with-search/'
@@ -938,13 +1142,6 @@ declare module '@tanstack/solid-router' {
       preLoaderRoute: typeof PostsPostIdRouteImport
       parentRoute: typeof PostsRoute
     }
-    '/non-nested/baz': {
-      id: '/non-nested/baz'
-      path: '/baz'
-      fullPath: '/non-nested/baz'
-      preLoaderRoute: typeof NonNestedBazRouteImport
-      parentRoute: typeof NonNestedRouteRoute
-    }
     '/_layout/_layout-2': {
       id: '/_layout/_layout-2'
       path: ''
@@ -1001,6 +1198,34 @@ declare module '@tanstack/solid-router' {
       preLoaderRoute: typeof ParamsPsNonNestedRouteRouteImport
       parentRoute: typeof rootRouteImport
     }
+    '/non-nested/suffix': {
+      id: '/non-nested/suffix'
+      path: '/suffix'
+      fullPath: '/non-nested/suffix'
+      preLoaderRoute: typeof NonNestedSuffixRouteRouteImport
+      parentRoute: typeof NonNestedRouteRoute
+    }
+    '/non-nested/prefix': {
+      id: '/non-nested/prefix'
+      path: '/prefix'
+      fullPath: '/non-nested/prefix'
+      preLoaderRoute: typeof NonNestedPrefixRouteRouteImport
+      parentRoute: typeof NonNestedRouteRoute
+    }
+    '/non-nested/path': {
+      id: '/non-nested/path'
+      path: '/path'
+      fullPath: '/non-nested/path'
+      preLoaderRoute: typeof NonNestedPathRouteRouteImport
+      parentRoute: typeof NonNestedRouteRoute
+    }
+    '/non-nested/named': {
+      id: '/non-nested/named'
+      path: '/named'
+      fullPath: '/non-nested/named'
+      preLoaderRoute: typeof NonNestedNamedRouteRouteImport
+      parentRoute: typeof NonNestedRouteRoute
+    }
     '/redirect/$target/': {
       id: '/redirect/$target/'
       path: '/'
@@ -1085,13 +1310,6 @@ declare module '@tanstack/solid-router' {
       preLoaderRoute: typeof ParamsSingleValueRouteImport
       parentRoute: typeof rootRouteImport
     }
-    '/non-nested/baz/$bazid': {
-      id: '/non-nested/baz/$bazid'
-      path: '/$bazid'
-      fullPath: '/non-nested/baz/$bazid'
-      preLoaderRoute: typeof NonNestedBazBazidRouteImport
-      parentRoute: typeof NonNestedBazRoute
-    }
     '/_layout/_layout-2/layout-b': {
       id: '/_layout/_layout-2/layout-b'
       path: '/layout-b'
@@ -1134,6 +1352,34 @@ declare module '@tanstack/solid-router' {
       preLoaderRoute: typeof ParamsPsNamedFooRouteRouteImport
       parentRoute: typeof rootRouteImport
     }
+    '/non-nested/suffix/{$baz}suffix': {
+      id: '/non-nested/suffix/{$baz}suffix'
+      path: '/{$baz}suffix'
+      fullPath: '/non-nested/suffix/{$baz}suffix'
+      preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRouteImport
+      parentRoute: typeof NonNestedSuffixRouteRoute
+    }
+    '/non-nested/prefix/prefix{$baz}': {
+      id: '/non-nested/prefix/prefix{$baz}'
+      path: '/prefix{$baz}'
+      fullPath: '/non-nested/prefix/prefix{$baz}'
+      preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRouteImport
+      parentRoute: typeof NonNestedPrefixRouteRoute
+    }
+    '/non-nested/path/baz': {
+      id: '/non-nested/path/baz'
+      path: '/baz'
+      fullPath: '/non-nested/path/baz'
+      preLoaderRoute: typeof NonNestedPathBazRouteRouteImport
+      parentRoute: typeof NonNestedPathRouteRoute
+    }
+    '/non-nested/named/$baz': {
+      id: '/non-nested/named/$baz'
+      path: '/$baz'
+      fullPath: '/non-nested/named/$baz'
+      preLoaderRoute: typeof NonNestedNamedBazRouteRouteImport
+      parentRoute: typeof NonNestedNamedRouteRoute
+    }
     '/relative/useNavigate/with-search/': {
       id: '/relative/useNavigate/with-search/'
       path: '/with-search'
@@ -1176,6 +1422,34 @@ declare module '@tanstack/solid-router' {
       preLoaderRoute: typeof RelativeLinkNestedIndexRouteImport
       parentRoute: typeof RelativeLinkRouteRoute
     }
+    '/non-nested/suffix/{$baz}suffix/': {
+      id: '/non-nested/suffix/{$baz}suffix/'
+      path: '/'
+      fullPath: '/non-nested/suffix/{$baz}suffix/'
+      preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixIndexRouteImport
+      parentRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRoute
+    }
+    '/non-nested/prefix/prefix{$baz}/': {
+      id: '/non-nested/prefix/prefix{$baz}/'
+      path: '/'
+      fullPath: '/non-nested/prefix/prefix{$baz}/'
+      preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125IndexRouteImport
+      parentRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRoute
+    }
+    '/non-nested/path/baz/': {
+      id: '/non-nested/path/baz/'
+      path: '/'
+      fullPath: '/non-nested/path/baz/'
+      preLoaderRoute: typeof NonNestedPathBazIndexRouteImport
+      parentRoute: typeof NonNestedPathBazRouteRoute
+    }
+    '/non-nested/named/$baz/': {
+      id: '/non-nested/named/$baz/'
+      path: '/'
+      fullPath: '/non-nested/named/$baz/'
+      preLoaderRoute: typeof NonNestedNamedBazIndexRouteImport
+      parentRoute: typeof NonNestedNamedBazRouteRoute
+    }
     '/params-ps/non-nested/$foo_/$bar': {
       id: '/params-ps/non-nested/$foo_/$bar'
       path: '/$bar'
@@ -1183,12 +1457,61 @@ declare module '@tanstack/solid-router' {
       preLoaderRoute: typeof ParamsPsNonNestedFooBarRouteImport
       parentRoute: typeof ParamsPsNonNestedFooRouteRoute
     }
-    '/non-nested/baz_/$bazid/edit': {
-      id: '/non-nested/baz_/$bazid/edit'
-      path: '/baz/$bazid/edit'
-      fullPath: '/non-nested/baz/$bazid/edit'
-      preLoaderRoute: typeof NonNestedBazBazidEditRouteImport
-      parentRoute: typeof NonNestedRouteRoute
+    '/non-nested/suffix/{$baz}suffix_/bar': {
+      id: '/non-nested/suffix/{$baz}suffix_/bar'
+      path: '/{$baz}suffix/bar'
+      fullPath: '/non-nested/suffix/{$baz}suffix/bar'
+      preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixBarRouteImport
+      parentRoute: typeof NonNestedSuffixRouteRoute
+    }
+    '/non-nested/suffix/{$baz}suffix/foo': {
+      id: '/non-nested/suffix/{$baz}suffix/foo'
+      path: '/foo'
+      fullPath: '/non-nested/suffix/{$baz}suffix/foo'
+      preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixFooRouteImport
+      parentRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRoute
+    }
+    '/non-nested/prefix/prefix{$baz}_/bar': {
+      id: '/non-nested/prefix/prefix{$baz}_/bar'
+      path: '/prefix{$baz}/bar'
+      fullPath: '/non-nested/prefix/prefix{$baz}/bar'
+      preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125BarRouteImport
+      parentRoute: typeof NonNestedPrefixRouteRoute
+    }
+    '/non-nested/prefix/prefix{$baz}/foo': {
+      id: '/non-nested/prefix/prefix{$baz}/foo'
+      path: '/foo'
+      fullPath: '/non-nested/prefix/prefix{$baz}/foo'
+      preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125FooRouteImport
+      parentRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRoute
+    }
+    '/non-nested/path/baz_/bar': {
+      id: '/non-nested/path/baz_/bar'
+      path: '/baz/bar'
+      fullPath: '/non-nested/path/baz/bar'
+      preLoaderRoute: typeof NonNestedPathBazBarRouteImport
+      parentRoute: typeof NonNestedPathRouteRoute
+    }
+    '/non-nested/path/baz/foo': {
+      id: '/non-nested/path/baz/foo'
+      path: '/foo'
+      fullPath: '/non-nested/path/baz/foo'
+      preLoaderRoute: typeof NonNestedPathBazFooRouteImport
+      parentRoute: typeof NonNestedPathBazRouteRoute
+    }
+    '/non-nested/named/$baz_/bar': {
+      id: '/non-nested/named/$baz_/bar'
+      path: '/$baz/bar'
+      fullPath: '/non-nested/named/$baz/bar'
+      preLoaderRoute: typeof NonNestedNamedBazBarRouteImport
+      parentRoute: typeof NonNestedNamedRouteRoute
+    }
+    '/non-nested/named/$baz/foo': {
+      id: '/non-nested/named/$baz/foo'
+      path: '/foo'
+      fullPath: '/non-nested/named/$baz/foo'
+      preLoaderRoute: typeof NonNestedNamedBazFooRouteImport
+      parentRoute: typeof NonNestedNamedBazRouteRoute
     }
     '/params-ps/named/$foo/$bar': {
       id: '/params-ps/named/$foo/$bar'
@@ -1235,26 +1558,141 @@ declare module '@tanstack/solid-router' {
   }
 }
 
-interface NonNestedBazRouteChildren {
-  NonNestedBazBazidRoute: typeof NonNestedBazBazidRoute
+interface NonNestedNamedBazRouteRouteChildren {
+  NonNestedNamedBazFooRoute: typeof NonNestedNamedBazFooRoute
+  NonNestedNamedBazIndexRoute: typeof NonNestedNamedBazIndexRoute
 }
 
-const NonNestedBazRouteChildren: NonNestedBazRouteChildren = {
-  NonNestedBazBazidRoute: NonNestedBazBazidRoute,
+const NonNestedNamedBazRouteRouteChildren: NonNestedNamedBazRouteRouteChildren =
+  {
+    NonNestedNamedBazFooRoute: NonNestedNamedBazFooRoute,
+    NonNestedNamedBazIndexRoute: NonNestedNamedBazIndexRoute,
+  }
+
+const NonNestedNamedBazRouteRouteWithChildren =
+  NonNestedNamedBazRouteRoute._addFileChildren(
+    NonNestedNamedBazRouteRouteChildren,
+  )
+
+interface NonNestedNamedRouteRouteChildren {
+  NonNestedNamedBazRouteRoute: typeof NonNestedNamedBazRouteRouteWithChildren
+  NonNestedNamedBazBarRoute: typeof NonNestedNamedBazBarRoute
 }
 
-const NonNestedBazRouteWithChildren = NonNestedBazRoute._addFileChildren(
-  NonNestedBazRouteChildren,
-)
+const NonNestedNamedRouteRouteChildren: NonNestedNamedRouteRouteChildren = {
+  NonNestedNamedBazRouteRoute: NonNestedNamedBazRouteRouteWithChildren,
+  NonNestedNamedBazBarRoute: NonNestedNamedBazBarRoute,
+}
+
+const NonNestedNamedRouteRouteWithChildren =
+  NonNestedNamedRouteRoute._addFileChildren(NonNestedNamedRouteRouteChildren)
+
+interface NonNestedPathBazRouteRouteChildren {
+  NonNestedPathBazFooRoute: typeof NonNestedPathBazFooRoute
+  NonNestedPathBazIndexRoute: typeof NonNestedPathBazIndexRoute
+}
+
+const NonNestedPathBazRouteRouteChildren: NonNestedPathBazRouteRouteChildren = {
+  NonNestedPathBazFooRoute: NonNestedPathBazFooRoute,
+  NonNestedPathBazIndexRoute: NonNestedPathBazIndexRoute,
+}
+
+const NonNestedPathBazRouteRouteWithChildren =
+  NonNestedPathBazRouteRoute._addFileChildren(
+    NonNestedPathBazRouteRouteChildren,
+  )
+
+interface NonNestedPathRouteRouteChildren {
+  NonNestedPathBazRouteRoute: typeof NonNestedPathBazRouteRouteWithChildren
+  NonNestedPathBazBarRoute: typeof NonNestedPathBazBarRoute
+}
+
+const NonNestedPathRouteRouteChildren: NonNestedPathRouteRouteChildren = {
+  NonNestedPathBazRouteRoute: NonNestedPathBazRouteRouteWithChildren,
+  NonNestedPathBazBarRoute: NonNestedPathBazBarRoute,
+}
+
+const NonNestedPathRouteRouteWithChildren =
+  NonNestedPathRouteRoute._addFileChildren(NonNestedPathRouteRouteChildren)
+
+interface NonNestedPrefixPrefixChar123bazChar125RouteRouteChildren {
+  NonNestedPrefixPrefixChar123bazChar125FooRoute: typeof NonNestedPrefixPrefixChar123bazChar125FooRoute
+  NonNestedPrefixPrefixChar123bazChar125IndexRoute: typeof NonNestedPrefixPrefixChar123bazChar125IndexRoute
+}
+
+const NonNestedPrefixPrefixChar123bazChar125RouteRouteChildren: NonNestedPrefixPrefixChar123bazChar125RouteRouteChildren =
+  {
+    NonNestedPrefixPrefixChar123bazChar125FooRoute:
+      NonNestedPrefixPrefixChar123bazChar125FooRoute,
+    NonNestedPrefixPrefixChar123bazChar125IndexRoute:
+      NonNestedPrefixPrefixChar123bazChar125IndexRoute,
+  }
+
+const NonNestedPrefixPrefixChar123bazChar125RouteRouteWithChildren =
+  NonNestedPrefixPrefixChar123bazChar125RouteRoute._addFileChildren(
+    NonNestedPrefixPrefixChar123bazChar125RouteRouteChildren,
+  )
+
+interface NonNestedPrefixRouteRouteChildren {
+  NonNestedPrefixPrefixChar123bazChar125RouteRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRouteWithChildren
+  NonNestedPrefixPrefixChar123bazChar125BarRoute: typeof NonNestedPrefixPrefixChar123bazChar125BarRoute
+}
+
+const NonNestedPrefixRouteRouteChildren: NonNestedPrefixRouteRouteChildren = {
+  NonNestedPrefixPrefixChar123bazChar125RouteRoute:
+    NonNestedPrefixPrefixChar123bazChar125RouteRouteWithChildren,
+  NonNestedPrefixPrefixChar123bazChar125BarRoute:
+    NonNestedPrefixPrefixChar123bazChar125BarRoute,
+}
+
+const NonNestedPrefixRouteRouteWithChildren =
+  NonNestedPrefixRouteRoute._addFileChildren(NonNestedPrefixRouteRouteChildren)
+
+interface NonNestedSuffixChar123bazChar125suffixRouteRouteChildren {
+  NonNestedSuffixChar123bazChar125suffixFooRoute: typeof NonNestedSuffixChar123bazChar125suffixFooRoute
+  NonNestedSuffixChar123bazChar125suffixIndexRoute: typeof NonNestedSuffixChar123bazChar125suffixIndexRoute
+}
+
+const NonNestedSuffixChar123bazChar125suffixRouteRouteChildren: NonNestedSuffixChar123bazChar125suffixRouteRouteChildren =
+  {
+    NonNestedSuffixChar123bazChar125suffixFooRoute:
+      NonNestedSuffixChar123bazChar125suffixFooRoute,
+    NonNestedSuffixChar123bazChar125suffixIndexRoute:
+      NonNestedSuffixChar123bazChar125suffixIndexRoute,
+  }
+
+const NonNestedSuffixChar123bazChar125suffixRouteRouteWithChildren =
+  NonNestedSuffixChar123bazChar125suffixRouteRoute._addFileChildren(
+    NonNestedSuffixChar123bazChar125suffixRouteRouteChildren,
+  )
+
+interface NonNestedSuffixRouteRouteChildren {
+  NonNestedSuffixChar123bazChar125suffixRouteRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRouteWithChildren
+  NonNestedSuffixChar123bazChar125suffixBarRoute: typeof NonNestedSuffixChar123bazChar125suffixBarRoute
+}
+
+const NonNestedSuffixRouteRouteChildren: NonNestedSuffixRouteRouteChildren = {
+  NonNestedSuffixChar123bazChar125suffixRouteRoute:
+    NonNestedSuffixChar123bazChar125suffixRouteRouteWithChildren,
+  NonNestedSuffixChar123bazChar125suffixBarRoute:
+    NonNestedSuffixChar123bazChar125suffixBarRoute,
+}
+
+const NonNestedSuffixRouteRouteWithChildren =
+  NonNestedSuffixRouteRoute._addFileChildren(NonNestedSuffixRouteRouteChildren)
 
 interface NonNestedRouteRouteChildren {
-  NonNestedBazRoute: typeof NonNestedBazRouteWithChildren
-  NonNestedBazBazidEditRoute: typeof NonNestedBazBazidEditRoute
+  NonNestedNamedRouteRoute: typeof NonNestedNamedRouteRouteWithChildren
+  NonNestedPathRouteRoute: typeof NonNestedPathRouteRouteWithChildren
+  NonNestedPrefixRouteRoute: typeof NonNestedPrefixRouteRouteWithChildren
+  NonNestedSuffixRouteRoute: typeof NonNestedSuffixRouteRouteWithChildren
 }
 
 const NonNestedRouteRouteChildren: NonNestedRouteRouteChildren = {
-  NonNestedBazRoute: NonNestedBazRouteWithChildren,
-  NonNestedBazBazidEditRoute: NonNestedBazBazidEditRoute,
+  NonNestedNamedRouteRoute: NonNestedNamedRouteRouteWithChildren,
+  NonNestedPathRouteRoute: NonNestedPathRouteRouteWithChildren,
+  NonNestedPrefixRouteRoute: NonNestedPrefixRouteRouteWithChildren,
+  NonNestedSuffixRouteRoute: NonNestedSuffixRouteRouteWithChildren,
 }
 
 const NonNestedRouteRouteWithChildren = NonNestedRouteRoute._addFileChildren(
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/baz.$bazid.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/baz.$bazid.tsx
deleted file mode 100644
index d43c79c780..0000000000
--- a/e2e/solid-router/basic-file-based/src/routes/non-nested/baz.$bazid.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-import { createFileRoute } from '@tanstack/solid-router'
-
-export const Route = createFileRoute('/non-nested/baz/$bazid')({
-  component: RouteComponent,
-})
-
-function RouteComponent() {
-  const params = Route.useParams()
-
-  return (
-    <>
-      <div data-testid="non-nested-bazid-heading">
-        Hello "/non-nested/baz/$bazid"!
-      </div>
-      <div>
-        params:{' '}
-        <span data-testid="non-nested-bazid-param">
-          {JSON.stringify(params())}
-        </span>
-      </div>
-    </>
-  )
-}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/baz.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/baz.tsx
deleted file mode 100644
index 42e76f8e3a..0000000000
--- a/e2e/solid-router/basic-file-based/src/routes/non-nested/baz.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { Outlet, createFileRoute } from '@tanstack/solid-router'
-
-export const Route = createFileRoute('/non-nested/baz')({
-  component: RouteComponent,
-})
-
-function RouteComponent() {
-  return (
-    <>
-      <div data-testid="non-nested-baz-heading">Hello "/non-nested/baz"!</div>
-      <Outlet />
-    </>
-  )
-}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/baz_.$bazid.edit.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/baz_.$bazid.edit.tsx
deleted file mode 100644
index 7cc0062d73..0000000000
--- a/e2e/solid-router/basic-file-based/src/routes/non-nested/baz_.$bazid.edit.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { createFileRoute } from '@tanstack/solid-router'
-
-export const Route = createFileRoute('/non-nested/baz_/$bazid/edit')({
-  component: RouteComponent,
-})
-
-function RouteComponent() {
-  const params = Route.useParams()
-  return (
-    <>
-      <div data-testid="non-nested-bazid-edit-heading">
-        Hello "/non-nested/baz_/$bazid/edit"!
-      </div>
-      <div>
-        params:{' '}
-        <span data-testid="non-nested-bazid-edit-param">
-          {JSON.stringify(params())}
-        </span>
-      </div>
-    </>
-  )
-}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz.foo.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz.foo.tsx
new file mode 100644
index 0000000000..1ce1960f8b
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz.foo.tsx
@@ -0,0 +1,20 @@
+import { createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/named/$baz/foo')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+
+  return (
+    <div>
+      <div data-testid="non-nested-named-baz-foo-heading">
+        Hello nested named baz foo page
+      </div>
+      <div data-testid="non-nested-named-baz-foo-param">
+        {JSON.stringify(params())}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz.index.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz.index.tsx
new file mode 100644
index 0000000000..91a8186db6
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz.index.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/named/$baz/')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-named-baz-index-heading">
+        Hello nested named baz index
+      </div>
+      <div data-testid="non-nested-named-baz-index-param">
+        {JSON.stringify(params())}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz.route.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz.route.tsx
new file mode 100644
index 0000000000..93bb825be1
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz.route.tsx
@@ -0,0 +1,16 @@
+import { Outlet, createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/named/$baz')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-named-baz-route-heading">
+        Hello non-nested named baz route layout
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx
new file mode 100644
index 0000000000..1f2170a771
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/named/$baz_/bar')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-named-baz-bar-heading">
+        Hello non-nested named bar
+      </div>
+      <div data-testid="non-nested-named-baz-bar-param">
+        {JSON.stringify(params())}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/named/route.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/named/route.tsx
new file mode 100644
index 0000000000..1eb6cb54d4
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/named/route.tsx
@@ -0,0 +1,58 @@
+import { Link, Outlet, createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/named')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-named-root-route-heading">
+        Hello non-nested named layout
+      </div>
+      <div>
+        <Link
+          from={Route.fullPath}
+          to="./$baz"
+          params={{ baz: 'baz' }}
+          data-testid="to-named-index"
+        >
+          To named index
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="./$baz/foo"
+          params={{ baz: 'baz' }}
+          data-testid="to-named-foo"
+        >
+          To named foo
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="./$baz/foo"
+          params={{ baz: 'baz_' }}
+          data-testid="to-named-foo-2"
+        >
+          To named foo 2
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="./$baz/bar"
+          params={{ baz: 'baz' }}
+          data-testid="to-named-bar"
+        >
+          To named bar
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="./$baz/bar"
+          params={{ baz: 'baz_' }}
+          data-testid="to-named-bar-2"
+        >
+          To named bar 2
+        </Link>
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz.foo.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz.foo.tsx
new file mode 100644
index 0000000000..f7b6e97632
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz.foo.tsx
@@ -0,0 +1,20 @@
+import { createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/path/baz/foo')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+
+  return (
+    <div>
+      <div data-testid="non-nested-path-baz-foo-heading">
+        Hello nested path baz foo page
+      </div>
+      <div data-testid="non-nested-path-baz-foo-param">
+        {JSON.stringify(params())}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz.index.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz.index.tsx
new file mode 100644
index 0000000000..9053ec481e
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz.index.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/path/baz/')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-path-baz-index-heading">
+        Hello nested path baz index
+      </div>
+      <div data-testid="non-nested-path-baz-index-param">
+        {JSON.stringify(params())}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz.route.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz.route.tsx
new file mode 100644
index 0000000000..ed7f8ba790
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz.route.tsx
@@ -0,0 +1,16 @@
+import { Outlet, createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/path/baz')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-path-baz-route-heading">
+        Hello non-nested path baz route layout
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx
new file mode 100644
index 0000000000..462c0ee4e1
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/path/baz_/bar')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-path-baz-bar-heading">
+        Hello non-nested path bar
+      </div>
+      <div data-testid="non-nested-path-baz-bar-param">
+        {JSON.stringify(params())}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/path/route.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/path/route.tsx
new file mode 100644
index 0000000000..279b6fbfab
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/path/route.tsx
@@ -0,0 +1,33 @@
+import { Link, Outlet, createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/path')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-path-root-route-heading">
+        Hello non-nested path layout
+      </div>
+      <div>
+        <Link from={Route.fullPath} to="./baz" data-testid="to-path-index">
+          To path index
+        </Link>
+        <Link from={Route.fullPath} to="./baz/foo" data-testid="to-path-foo">
+          To path foo
+        </Link>
+        <Link from={Route.fullPath} to="./baz/foo" data-testid="to-path-foo-2">
+          To path foo 2
+        </Link>
+        <Link from={Route.fullPath} to="./baz/bar" data-testid="to-path-bar">
+          To path bar
+        </Link>
+        <Link from={Route.fullPath} to="./baz/bar" data-testid="to-path-bar-2">
+          To path bar 2
+        </Link>
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.foo.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.foo.tsx
new file mode 100644
index 0000000000..ad9e1479df
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.foo.tsx
@@ -0,0 +1,20 @@
+import { createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/prefix/prefix{$baz}/foo')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+
+  return (
+    <div>
+      <div data-testid="non-nested-prefix-baz-foo-heading">
+        Hello nested prefix foo page
+      </div>
+      <div data-testid="non-nested-prefix-baz-foo-param">
+        {JSON.stringify(params())}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.index.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.index.tsx
new file mode 100644
index 0000000000..a6e09a9d97
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.index.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/prefix/prefix{$baz}/')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-prefix-baz-index-heading">
+        Hello nested prefix index
+      </div>
+      <div data-testid="non-nested-prefix-baz-index-param">
+        {JSON.stringify(params())}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.route.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.route.tsx
new file mode 100644
index 0000000000..41d94b7f7e
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}.route.tsx
@@ -0,0 +1,16 @@
+import { Outlet, createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/prefix/prefix{$baz}')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-prefix-baz-route-heading">
+        Hello non-nested prefix route layout
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
new file mode 100644
index 0000000000..4b883975db
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/prefix/prefix{$baz}_/bar')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-prefix-baz-bar-heading">
+        Hello non-nested wildcard bar
+      </div>
+      <div data-testid="non-nested-prefix-baz-bar-param">
+        {JSON.stringify(params())}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/route.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/route.tsx
new file mode 100644
index 0000000000..6a80067245
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/route.tsx
@@ -0,0 +1,58 @@
+import { Link, Outlet, createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/prefix')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-prefix-root-route-heading">
+        Hello non-nested prefix layout
+      </div>
+      <div>
+        <Link
+          from={Route.fullPath}
+          to="prefix{$baz}"
+          params={{ baz: 'baz' }}
+          data-testid="to-prefix-index"
+        >
+          To prefix index
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="prefix{$baz}/foo"
+          params={{ baz: 'baz' }}
+          data-testid="to-prefix-foo"
+        >
+          To prefix foo
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="prefix{$baz}/foo"
+          params={{ baz: 'baz_' }}
+          data-testid="to-prefix-foo-2"
+        >
+          To prefix foo 2
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="prefix{$baz}/bar"
+          params={{ baz: 'baz' }}
+          data-testid="to-prefix-bar"
+        >
+          To prefix bar
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="prefix{$baz}/bar"
+          params={{ baz: 'baz_' }}
+          data-testid="to-prefix-bar-2"
+        >
+          To prefix bar 2
+        </Link>
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/route.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/route.tsx
index f63bb14717..5a21eff91e 100644
--- a/e2e/solid-router/basic-file-based/src/routes/non-nested/route.tsx
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/route.tsx
@@ -12,23 +12,17 @@ function RouteComponent() {
       </h3>
       <ul class="grid mb-2">
         <li>
-          <Link
-            from={Route.fullPath}
-            data-testid="l-to-non-nested-bazid"
-            to="./baz/$bazid"
-            params={{ bazid: '123' }}
-          >
-            /non-nested/baz/123
+          <Link from={Route.fullPath} data-testid="l-to-named" to="./named">
+            To named param tests
           </Link>
-        </li>
-        <li>
-          <Link
-            from={Route.fullPath}
-            data-testid="l-to-non-nested-bazid-edit"
-            to="./baz/$bazid/edit"
-            params={{ bazid: '456' }}
-          >
-            /non-nested/baz/456/edit
+          <Link from={Route.fullPath} data-testid="l-to-prefix" to="./prefix">
+            To prefix param tests
+          </Link>
+          <Link from={Route.fullPath} data-testid="l-to-suffix" to="./suffix">
+            To suffix param tests
+          </Link>
+          <Link from={Route.fullPath} data-testid="l-to-path" to="./path">
+            To path tests
           </Link>
         </li>
       </ul>
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/route.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/route.tsx
new file mode 100644
index 0000000000..5fbee63113
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/route.tsx
@@ -0,0 +1,58 @@
+import { Link, Outlet, createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/suffix')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-suffix-root-route-heading">
+        Hello non-nested suffix layout
+      </div>
+      <div>
+        <Link
+          from={Route.fullPath}
+          to="{$baz}suffix"
+          params={{ baz: 'baz' }}
+          data-testid="to-suffix-index"
+        >
+          To suffix index
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="{$baz}suffix/foo"
+          params={{ baz: 'baz' }}
+          data-testid="to-suffix-foo"
+        >
+          To suffix foo
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="{$baz}suffix/foo"
+          params={{ baz: 'baz2' }}
+          data-testid="to-suffix-foo-2"
+        >
+          To suffix foo 2
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="{$baz}suffix/bar"
+          params={{ baz: 'baz' }}
+          data-testid="to-suffix-bar"
+        >
+          To suffix bar
+        </Link>
+        <Link
+          from={Route.fullPath}
+          to="{$baz}suffix/bar"
+          params={{ baz: 'baz2' }}
+          data-testid="to-suffix-bar-2"
+        >
+          To suffix bar 2
+        </Link>
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.foo.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.foo.tsx
new file mode 100644
index 0000000000..ac5df1dc15
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.foo.tsx
@@ -0,0 +1,20 @@
+import { createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/suffix/{$baz}suffix/foo')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+
+  return (
+    <div>
+      <div data-testid="non-nested-suffix-baz-foo-heading">
+        Hello nested suffix foo page
+      </div>
+      <div data-testid="non-nested-suffix-baz-foo-param">
+        {JSON.stringify(params())}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.index.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.index.tsx
new file mode 100644
index 0000000000..0dd908d0a3
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.index.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/suffix/{$baz}suffix/')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-suffix-baz-index-heading">
+        Hello nested suffix index
+      </div>
+      <div data-testid="non-nested-suffix-baz-index-param">
+        {JSON.stringify(params())}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.route.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.route.tsx
new file mode 100644
index 0000000000..d27f65d510
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix.route.tsx
@@ -0,0 +1,16 @@
+import { Outlet, createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/suffix/{$baz}suffix')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  return (
+    <div>
+      <div data-testid="non-nested-suffix-baz-route-heading">
+        Hello non-nested suffix route layout
+      </div>
+      <Outlet />
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx
new file mode 100644
index 0000000000..26403727c6
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/solid-router'
+
+export const Route = createFileRoute('/non-nested/suffix/{$baz}suffix_/bar')({
+  component: RouteComponent,
+})
+
+function RouteComponent() {
+  const params = Route.useParams()
+  return (
+    <div>
+      <div data-testid="non-nested-suffix-baz-bar-heading">
+        Hello non-nested suffix bar
+      </div>
+      <div data-testid="non-nested-suffix-baz-bar-param">
+        {JSON.stringify(params())}
+      </div>
+    </div>
+  )
+}
diff --git a/e2e/solid-router/basic-file-based/tests/app.spec.ts b/e2e/solid-router/basic-file-based/tests/app.spec.ts
index 2b0ffa17a9..c0b1b69dc5 100644
--- a/e2e/solid-router/basic-file-based/tests/app.spec.ts
+++ b/e2e/solid-router/basic-file-based/tests/app.spec.ts
@@ -296,38 +296,3 @@ test('Should remount deps when remountDeps does change ', async ({ page }) => {
     'Page component mounts: 2',
   )
 })
-
-test('Should not nest non-nested paths', async ({ page }) => {
-  await page.goto('/non-nested')
-  await page.waitForURL('/non-nested')
-  const nonNestedPathHeading = page.getByTestId('non-nested-path-heading')
-  const bazIdLink = page.getByTestId('l-to-non-nested-bazid')
-  const bazIdEditLink = page.getByTestId('l-to-non-nested-bazid-edit')
-
-  await expect(nonNestedPathHeading).toBeInViewport()
-  await expect(bazIdLink).toHaveAttribute('href', '/non-nested/baz/123')
-  await expect(bazIdEditLink).toHaveAttribute(
-    'href',
-    '/non-nested/baz/456/edit',
-  )
-
-  await bazIdLink.click()
-  await page.waitForURL('/non-nested/baz/123')
-  const bazHeading = page.getByTestId('non-nested-baz-heading')
-  const bazIdHeading = page.getByTestId('non-nested-bazid-heading')
-  const bazIdParam = page.getByTestId('non-nested-bazid-param')
-  await expect(nonNestedPathHeading).toBeInViewport()
-  await expect(bazHeading).toBeInViewport()
-  await expect(bazIdHeading).toBeInViewport()
-  await expect(bazIdParam).toContainText(JSON.stringify({ bazid: '123' }))
-
-  await bazIdEditLink.click()
-  await page.waitForURL('/non-nested/baz/456/edit')
-  const bazIdEditHeading = page.getByTestId('non-nested-bazid-edit-heading')
-  const bazIdEditParam = page.getByTestId('non-nested-bazid-edit-param')
-  await expect(nonNestedPathHeading).toBeInViewport()
-  await expect(bazHeading).toBeHidden()
-  await expect(bazIdHeading).toBeHidden()
-  await expect(bazIdEditHeading).toBeInViewport()
-  await expect(bazIdEditParam).toContainText(JSON.stringify({ bazid: '456' }))
-})
diff --git a/e2e/solid-router/basic-file-based/tests/non-nested-paths.spec.ts b/e2e/solid-router/basic-file-based/tests/non-nested-paths.spec.ts
new file mode 100644
index 0000000000..2fdede5549
--- /dev/null
+++ b/e2e/solid-router/basic-file-based/tests/non-nested-paths.spec.ts
@@ -0,0 +1,192 @@
+import { expect, test } from '@playwright/test'
+
+const testCases: Array<{
+  name: string
+  testPathDesc: string
+  testPathPrefix: string
+  testPathSuffix: string
+  paramValue: Record<string, string>
+  paramValue2: Record<string, string>
+}> = [
+  {
+    name: 'Named path params',
+    testPathDesc: 'named',
+    testPathPrefix: '',
+    testPathSuffix: '',
+    paramValue: { baz: 'baz' },
+    paramValue2: { baz: 'baz_' },
+  },
+  {
+    name: 'prefix params',
+    testPathPrefix: 'prefix',
+    testPathSuffix: '',
+    testPathDesc: 'prefix',
+    paramValue: { baz: 'baz' },
+    paramValue2: { baz: 'baz_' },
+  },
+  {
+    name: 'suffix params',
+    testPathPrefix: '',
+    testPathSuffix: 'suffix',
+    testPathDesc: 'suffix',
+    paramValue: { baz: 'baz' },
+    paramValue2: { baz: 'baz2' },
+  },
+  {
+    name: 'path',
+    testPathPrefix: '',
+    testPathSuffix: '',
+    testPathDesc: 'path',
+    paramValue: {},
+    paramValue2: {},
+  },
+]
+
+test.describe('Non-nested paths', () => {
+  testCases.forEach(
+    ({
+      name,
+      testPathDesc,
+      testPathPrefix,
+      testPathSuffix,
+      paramValue,
+      paramValue2,
+    }) => {
+      test.describe(name, () => {
+        const path = `/non-nested/${testPathDesc}`
+        const paramNameDesc = Object.keys(paramValue)[0] ?? 'baz'
+
+        test.beforeEach(async ({ page }) => {
+          await page.goto('/non-nested')
+          await page.waitForURL('/non-nested')
+        })
+
+        test('Should not un-nest nested paths', async ({ page }) => {
+          const nonNestedPathHeading = page.getByTestId(
+            'non-nested-path-heading',
+          )
+          await expect(nonNestedPathHeading).toBeVisible()
+
+          await page.getByTestId(`l-to-${testPathDesc}`).click()
+          await page.waitForURL(path)
+
+          const rootRouteHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-root-route-heading`,
+          )
+
+          await expect(rootRouteHeading).toBeVisible()
+
+          const pathRouteHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-route-heading`,
+          )
+
+          const indexHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-index-heading`,
+          )
+
+          const fooHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-foo-heading`,
+          )
+
+          const indexParams = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-index-param`,
+          )
+
+          const fooParams = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-foo-param`,
+          )
+
+          const indexLink = page.getByTestId(`to-${testPathDesc}-index`)
+          const fooLink = page.getByTestId(`to-${testPathDesc}-foo`)
+          const foo2Link = page.getByTestId(`to-${testPathDesc}-foo-2`)
+
+          const indexPath = `${path}/${testPathPrefix}${paramValue[paramNameDesc] ?? 'baz'}${testPathSuffix}`
+          const fooPath = `${path}/${testPathPrefix}${paramValue[paramNameDesc] ?? 'baz'}${testPathSuffix}/foo`
+          const foo2Path = `${path}/${testPathPrefix}${paramValue2[paramNameDesc] ?? 'baz'}${testPathSuffix}/foo`
+
+          console.log(await indexLink.getAttribute('href'))
+          await expect(indexLink).toHaveAttribute('href', indexPath)
+          await expect(fooLink).toHaveAttribute('href', fooPath)
+          await expect(foo2Link).toHaveAttribute('href', foo2Path)
+
+          await indexLink.click()
+          await page.waitForURL(indexPath)
+          await expect(rootRouteHeading).toBeVisible()
+          await expect(pathRouteHeading).toBeVisible()
+          await expect(indexHeading).toBeVisible()
+          const indexParamValue = await indexParams.innerText()
+          expect(JSON.parse(indexParamValue)).toEqual(paramValue)
+
+          await fooLink.click()
+          await page.waitForURL(fooPath)
+          await expect(rootRouteHeading).toBeVisible()
+          await expect(pathRouteHeading).toBeVisible()
+          await expect(fooHeading).toBeVisible()
+          const fooParamValue = await fooParams.innerText()
+          expect(JSON.parse(fooParamValue)).toEqual(paramValue)
+
+          await foo2Link.click()
+          await page.waitForURL(foo2Path)
+          await expect(rootRouteHeading).toBeVisible()
+          await expect(pathRouteHeading).toBeVisible()
+          await expect(fooHeading).toBeVisible()
+          const foo2ParamValue = await fooParams.innerText()
+          expect(JSON.parse(foo2ParamValue)).toEqual(paramValue2)
+        })
+
+        test('Should not nest non-nested paths', async ({ page }) => {
+          const nonNestedPathHeading = page.getByTestId(
+            'non-nested-path-heading',
+          )
+          await expect(nonNestedPathHeading).toBeVisible()
+
+          await page.getByTestId(`l-to-${testPathDesc}`).click()
+          await page.waitForURL(path)
+
+          const rootRouteHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-root-route-heading`,
+          )
+
+          await expect(rootRouteHeading).toBeVisible()
+
+          const pathRouteHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-route-heading`,
+          )
+
+          const barHeading = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-bar-heading`,
+          )
+
+          const barParams = page.getByTestId(
+            `non-nested-${testPathDesc}-${paramNameDesc}-bar-param`,
+          )
+
+          const barLink = page.getByTestId(`to-${testPathDesc}-bar`)
+          const bar2Link = page.getByTestId(`to-${testPathDesc}-bar-2`)
+
+          const barPath = `${path}/${testPathPrefix}${paramValue[paramNameDesc] ?? 'baz'}${testPathSuffix}/bar`
+          const bar2Path = `${path}/${testPathPrefix}${paramValue2[paramNameDesc] ?? 'baz'}${testPathSuffix}/bar`
+          await expect(barLink).toHaveAttribute('href', barPath)
+
+          await expect(bar2Link).toHaveAttribute('href', bar2Path)
+
+          await barLink.click()
+          await page.waitForURL(barPath)
+          await expect(rootRouteHeading).toBeVisible()
+          await expect(pathRouteHeading).not.toBeVisible()
+          await expect(barHeading).toBeVisible()
+          const barParamValue = await barParams.innerText()
+          expect(JSON.parse(barParamValue)).toEqual(paramValue)
+
+          await bar2Link.click()
+          await page.waitForURL(bar2Path)
+          await expect(rootRouteHeading).toBeVisible()
+          await expect(pathRouteHeading).not.toBeVisible()
+          await expect(barHeading).toBeVisible()
+          const bar2ParamValue = await barParams.innerText()
+          expect(JSON.parse(bar2ParamValue)).toEqual(paramValue2)
+        })
+      })
+    },
+  )
+})

From 5aa2f1d3bbe20760b3b2b948627e04a035051231 Mon Sep 17 00:00:00 2001
From: Nico Lynzaad <nlynzaad@zylangroup.com>
Date: Mon, 22 Sep 2025 03:06:01 +0200
Subject: [PATCH 4/4] minor cleanups

---
 .../src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx        | 2 +-
 .../src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx        | 2 +-
 packages/router-core/tests/path.test.ts                       | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx b/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
index 5ce90f08dc..6a0cd93430 100644
--- a/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
+++ b/e2e/react-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
@@ -9,7 +9,7 @@ function RouteComponent() {
   return (
     <div>
       <div data-testid="non-nested-prefix-baz-bar-heading">
-        Hello non-nested wildcard bar
+        Hello non-nested prefix bar
       </div>
       <div data-testid="non-nested-prefix-baz-bar-param">
         {JSON.stringify(params)}
diff --git a/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx b/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
index 4b883975db..c1a3928b01 100644
--- a/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
+++ b/e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx
@@ -9,7 +9,7 @@ function RouteComponent() {
   return (
     <div>
       <div data-testid="non-nested-prefix-baz-bar-heading">
-        Hello non-nested wildcard bar
+        Hello non-nested prefix bar
       </div>
       <div data-testid="non-nested-prefix-baz-bar-param">
         {JSON.stringify(params())}
diff --git a/packages/router-core/tests/path.test.ts b/packages/router-core/tests/path.test.ts
index 71c217ed31..7f77809c54 100644
--- a/packages/router-core/tests/path.test.ts
+++ b/packages/router-core/tests/path.test.ts
@@ -1168,7 +1168,7 @@ describe('non-nested paths', async () => {
   describe('resolvePath', () => {
     describe.each([
       ['/', '/', '/a_', '/a'],
-      ['/', '/', 'a/', '/a'],
+      ['/', '/', 'a_/', '/a'],
       ['/', '/', '/a_/b_', '/a/b'],
       ['/', 'a', 'b_', '/a/b'],
       ['/a/b', 'c', '/a/b/c_', '/a/b/c'],
@@ -1361,7 +1361,7 @@ describe('non-nested paths', async () => {
             },
             {
               name: 'with nested prefix + suffix',
-              to: '/params/named/prefix{$foo}suffix',
+              to: '/params_/named_/prefix{$foo}suffix_',
               expected: '/params/named/prefix{$foo}suffix',
             },
           ])('$name', ({ to, expected }) => {
