test(solid-router): add basepath-file-based e2e suite #5623
main fromrefs/pull/5623/head·merged by birkskyum(GitHub profile, opens in a new tab) - 1
View your CI Pipeline Execution ↗ for commit 287c7945ed2e81e9fe9c72525bf1f0af1bafb8cc
Command Status Duration Result nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded 7m 35s View ↗ nx run-many --target=build --exclude=examples/*...✅ Succeeded 1s View ↗
☁️ Nx Cloud last updated this comment at
2025-10-25 22:35:27UTCMore templates
- tanstack-router-solid-example-basic
- tanstack-router-solid-example-basic-devtools-panel
- tanstack-router-solid-example-basic-file-based
- tanstack-router-solid-example-basic-non-nested-devtools
- tanstack-router-solid-example-basic-solid-query
- tanstack-router-solid-example-basic-solid-query-file-based
- tanstack-router-solid-example-basic-ssr-streaming-file-based
- tanstack-router-solid-example-kitchen-sink-file-based
- tanstack-router-solid-example-kitchen-sink-solid-query
- tanstack-router-solid-example-kitchen-sink-solid-query-file-based
- tanstack-router-solid-example-quickstart-file-based
- tanstack-solid-start-example-bare
- tanstack-solid-start-example-basic
- tanstack-solid-start-example-basic-auth
- tanstack-solid-start-example-basic-cloudflare
- tanstack-solid-start-example-basic-netlify
- tanstack-solid-start-example-basic-nitro
- tanstack-start-example-basic-solid-query
- tanstack-solid-start-example-basic-static
- tanstack-router-react-example-authenticated-routes
- tanstack-router-react-example-authenticated-routes-firebase
- tanstack-router-react-example-basic
- tanstack-router-react-example-basic-default-search-params
- tanstack-router-react-example-basic-devtools-panel
- tanstack-router-react-example-basic-file-based
- tanstack-router-react-example-basic-non-nested-devtools
- tanstack-router-react-example-react-query
- tanstack-router-react-example-basic-react-query-file-based
- tanstack-router-react-example-basic-ssr-file-based
- tanstack-router-react-example-basic-ssr-streaming-file-based
- tanstack-router-react-example-basic-virtual-file-based
- tanstack-router-react-example-basic-virtual-inside-file-based
- tanstack-router-react-example-deferred-data
- tanstack-router-i18n-paraglide
- tanstack-router-react-example-kitchen-sink
- tanstack-router-react-example-kitchen-sink-file-based
- tanstack-router-react-example-kitchen-sink-react-query
- tanstack-router-react-example-kitchen-sink-react-query-file-based
- tanstack-router-react-example-large-file-based
- tanstack-router-react-example-location-masking
- tanstack-router-react-example-navigation-blocking
- tanstack-router-react-example-quickstart
- tanstack-router-react-example-quickstart-esbuild-file-based
- tanstack-router-react-example-quickstart-file-based
- tanstack-router-react-example-quickstart-rspack-file-based
- tanstack-router-react-example-quickstart-webpack-file-based
- router-monorepo-react-query
- router-mono-simple
- router-mono-simple-lazy
- tanstack-router-react-example-scroll-restoration
- tanstack-search-validator-adapters
- tanstack-start-example-bare
- tanstack-start-example-basic
- tanstack-start-example-basic-auth
- tanstack-start-example-basic-cloudflare
- tanstack-start-example-basic-react-query
- tanstack-start-example-basic-static
- tanstack-start-bun-hosting
- tanstack-start-example-clerk-basic
- tanstack-start-example-convex-trellaux
- tanstack-start-example-counter
- tanstack-start-i18n-paraglide
- tanstack-start-example-large
- tanstack-start-example-material-ui
- tanstack-start-streaming-data-from-server-functions
- tanstack-start-example-supabase-basic
- tanstack-start-tailwind-v4
- tanstack-start-example-trellaux
- tanstack-start-example-workos
- tanstack-router-react-example-view-transitions
- tanstack-router-react-example-with-framer-motion
- tanstack-router-react-example-with-trpc
- tanstack-router-react-example-with-trpc-react-query
@tanstack/arktype-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5623@tanstack/directive-functions-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5623@tanstack/eslint-plugin-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5623@tanstack/history
npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5623@tanstack/nitro-v2-vite-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5623@tanstack/react-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5623@tanstack/react-router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5623@tanstack/react-router-ssr-query
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5623@tanstack/react-start
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5623@tanstack/react-start-client
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5623@tanstack/react-start-server
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5623@tanstack/router-cli
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5623@tanstack/router-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5623@tanstack/router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5623@tanstack/router-devtools-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5623@tanstack/router-generator
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5623@tanstack/router-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5623@tanstack/router-ssr-query-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5623@tanstack/router-utils
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5623@tanstack/router-vite-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5623@tanstack/server-functions-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5623@tanstack/solid-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5623@tanstack/solid-router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5623@tanstack/solid-router-ssr-query
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-ssr-query@5623@tanstack/solid-start
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5623@tanstack/solid-start-client
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5623@tanstack/solid-start-server
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5623@tanstack/start-client-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5623@tanstack/start-plugin-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5623@tanstack/start-server-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5623@tanstack/start-static-server-functions
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5623@tanstack/start-storage-context
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5623@tanstack/valibot-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5623@tanstack/virtual-file-routes
npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5623@tanstack/zod-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5623commit:
287c794Actionable comments posted: 1
🧹 Nitpick comments (1)
e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx (1)
4-4: Route path update is correct; consider DRYing the conditional path.Define a single editPath and reuse for getRouteApi and useParams to prevent future drift. No behavior change.
-const api = getRouteApi( - // @ts-expect-error path is updated with new Experimental Non Nested Paths to not include the trailing underscore - `/${useExperimentalNonNestedRoutes ? 'posts' : 'posts_'}/$postId/edit`, -) +const editPath = `/${useExperimentalNonNestedRoutes ? 'posts' : 'posts_'}/$postId/edit` +// @ts-expect-error path is updated with new Experimental Non Nested Paths to not include the trailing underscore +const api = getRouteApi(editPath) @@ - const paramsViaHook = useParams({ - // @ts-expect-error path is updated with new Experimental Non Nested Paths to not include the trailing underscore - from: `/${useExperimentalNonNestedRoutes ? 'posts' : 'posts_'}/$postId/edit`, - }) + const paramsViaHook = useParams({ + // @ts-expect-error path is updated with new Experimental Non Nested Paths to not include the trailing underscore + from: editPath, + })📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 08d78c1e2fc43e2d2a20203e168a18d1fc063078 and 287c7945ed2e81e9fe9c72525bf1f0af1bafb8cc.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (22)
e2e/solid-router/basepath-file-based/.gitignore(1 hunks)e2e/solid-router/basepath-file-based/index.html(1 hunks)e2e/solid-router/basepath-file-based/package.json(1 hunks)e2e/solid-router/basepath-file-based/playwright.config.ts(1 hunks)e2e/solid-router/basepath-file-based/src/main.tsx(1 hunks)e2e/solid-router/basepath-file-based/src/routeTree.gen.ts(1 hunks)e2e/solid-router/basepath-file-based/src/routes/__root.tsx(1 hunks)e2e/solid-router/basepath-file-based/src/routes/about.tsx(1 hunks)e2e/solid-router/basepath-file-based/src/routes/index.tsx(1 hunks)e2e/solid-router/basepath-file-based/tests/reload-document.test.ts(1 hunks)e2e/solid-router/basepath-file-based/tests/setup/global.setup.ts(1 hunks)e2e/solid-router/basepath-file-based/tests/setup/global.teardown.ts(1 hunks)e2e/solid-router/basepath-file-based/tsconfig.json(1 hunks)e2e/solid-router/basepath-file-based/vite.config.js(1 hunks)e2e/solid-router/basic-file-based/src/routeTree.gen.ts(18 hunks)e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx(1 hunks)e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx(1 hunks)e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx(1 hunks)e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx(1 hunks)e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx(1 hunks)e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx(1 hunks)e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript in strict mode with extensive type safety across the codebase
Files:
e2e/solid-router/basepath-file-based/playwright.config.tse2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsxe2e/solid-router/basepath-file-based/src/routes/__root.tsxe2e/solid-router/basepath-file-based/src/routes/index.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsxe2e/solid-router/basepath-file-based/tests/reload-document.test.tse2e/solid-router/basepath-file-based/src/routes/about.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsxe2e/solid-router/basepath-file-based/tests/setup/global.setup.tse2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsxe2e/solid-router/basepath-file-based/src/routeTree.gen.tse2e/solid-router/basepath-file-based/src/main.tsxe2e/solid-router/basepath-file-based/tests/setup/global.teardown.tse2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsxe2e/solid-router/basic-file-based/src/routeTree.gen.tse2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx
e2e/**
📄 CodeRabbit inference engine (AGENTS.md)
Store end-to-end tests under the e2e/ directory
Files:
e2e/solid-router/basepath-file-based/playwright.config.tse2e/solid-router/basepath-file-based/index.htmle2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsxe2e/solid-router/basepath-file-based/src/routes/__root.tsxe2e/solid-router/basepath-file-based/src/routes/index.tsxe2e/solid-router/basepath-file-based/tsconfig.jsone2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsxe2e/solid-router/basepath-file-based/tests/reload-document.test.tse2e/solid-router/basepath-file-based/src/routes/about.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsxe2e/solid-router/basepath-file-based/package.jsone2e/solid-router/basepath-file-based/tests/setup/global.setup.tse2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsxe2e/solid-router/basepath-file-based/src/routeTree.gen.tse2e/solid-router/basepath-file-based/src/main.tsxe2e/solid-router/basepath-file-based/tests/setup/global.teardown.tse2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsxe2e/solid-router/basic-file-based/src/routeTree.gen.tse2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsxe2e/solid-router/basepath-file-based/vite.config.js
**/src/routes/**
📄 CodeRabbit inference engine (AGENTS.md)
Place file-based routes under src/routes/ directories
Files:
e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsxe2e/solid-router/basepath-file-based/src/routes/__root.tsxe2e/solid-router/basepath-file-based/src/routes/index.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsxe2e/solid-router/basepath-file-based/src/routes/about.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsxe2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsxe2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx
**/package.json
📄 CodeRabbit inference engine (AGENTS.md)
Use workspace:* protocol for internal dependencies in package.json files
Files:
e2e/solid-router/basepath-file-based/package.json
🧠 Learnings (5)
📚 Learning: 2025-09-22T00:56:49.237Z
Learnt from: nlynzaad PR: TanStack/router#5182 File: e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx:3-5 Timestamp: 2025-09-22T00:56:49.237Z Learning: In TanStack Router, underscores are intentionally stripped from route segments (e.g., `$baz_` becomes `baz` in generated types) but should be preserved in base path segments. This is the correct behavior as of the fix in PR #5182.Applied to files:
e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsxe2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR PR: TanStack/router#0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to **/*.{ts,tsx} : Use TypeScript in strict mode with extensive type safety across the codebaseApplied to files:
e2e/solid-router/basepath-file-based/tsconfig.json
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR PR: TanStack/router#0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/Applied to files:
e2e/solid-router/basepath-file-based/package.json
📚 Learning: 2025-10-01T18:31:35.420Z
Learnt from: schiller-manuel PR: TanStack/router#5330 File: e2e/react-start/custom-basepath/src/routeTree.gen.ts:58-61 Timestamp: 2025-10-01T18:31:35.420Z Learning: Do not review files named `routeTree.gen.ts` in TanStack Router repositories, as these are autogenerated files that should not be manually modified.Applied to files:
e2e/solid-router/basepath-file-based/src/routeTree.gen.tse2e/solid-router/basic-file-based/src/routeTree.gen.ts
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad PR: TanStack/router#5402 File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21 Timestamp: 2025-10-08T08:11:47.088Z Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.Applied to files:
e2e/solid-router/basepath-file-based/src/routeTree.gen.tse2e/solid-router/basic-file-based/src/routeTree.gen.ts
🧬 Code graph analysis (13)
e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx (3)
e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx (1)
Route(3-5)
e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx (1)
Route(3-5)
e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx (1)
Route(3-5)
e2e/solid-router/basepath-file-based/src/routes/__root.tsx (2)
e2e/solid-router/basepath-file-based/src/routes/about.tsx (1)
Route(3-5)
e2e/solid-router/basepath-file-based/src/routes/index.tsx (1)
Route(3-5)
e2e/solid-router/basepath-file-based/src/routes/index.tsx (2)
e2e/solid-router/basepath-file-based/src/routes/__root.tsx (1)
Route(3-3)
e2e/solid-router/basepath-file-based/src/routes/about.tsx (1)
Route(3-5)
e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx (3)
e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.index.tsx (1)
Route(3-5)
e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz.route.tsx (1)
Route(3-5)
e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx (1)
Route(3-5)
e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx (2)
e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx (1)
Route(3-3)
e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/route.tsx (1)
Route(3-5)
e2e/solid-router/basepath-file-based/src/routes/about.tsx (2)
e2e/solid-router/basepath-file-based/src/routes/__root.tsx (1)
Route(3-3)
e2e/solid-router/basepath-file-based/src/routes/index.tsx (1)
Route(3-5)
e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx (2)
e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.foo.tsx (1)
Route(3-5)
e2e/react-router/basic-file-based/src/routes/non-nested/path/baz.index.tsx (1)
Route(3-5)
e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx (2)
e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx (1)
Route(4-6)
e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/route.tsx (1)
Route(3-5)
e2e/solid-router/basepath-file-based/src/routeTree.gen.ts (2)
examples/react/quickstart-esbuild-file-based/src/routeTree.gen.ts (1)
FileRouteTypes(68-75)
examples/react/start-bare/src/routeTree.gen.ts (1)
FileRouteTypes(39-46)
e2e/solid-router/basepath-file-based/src/main.tsx (1)
e2e/react-router/js-only-file-based/src/main.jsx (2)
router(8-13)rootElement(15-15)
e2e/solid-router/basepath-file-based/tests/setup/global.teardown.ts (1)
scripts/set-ts-version.js (1)
packageJson(33-33)
e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx (3)
e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx (1)
Route(3-5)
e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx (1)
Route(3-5)
e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx (1)
Route(3-5)
e2e/solid-router/basic-file-based/src/routes/posts_.$postId.edit.tsx (3)
e2e/react-router/basic-file-based/src/routes/posts_.$postId.edit.tsx (1)
Route(4-6)
packages/router-generator/tests/generator/types-disabled/routes/posts.tsx (1)
Route(6-8)
packages/router-generator/tests/generator/types-disabled/routes/posts/$postId.tsx (1)
Route(6-8)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Preview
- GitHub Check: Test
🔇 Additional comments (20)
e2e/solid-router/basepath-file-based/.gitignore (1)
1-11: LGTM!The gitignore entries are appropriate for a Vite-based e2e test project with Playwright.
e2e/solid-router/basepath-file-based/tsconfig.json (1)
1-16: LGTM!The TypeScript configuration correctly enables strict mode and is properly configured for Solid.js with appropriate compiler options.
e2e/solid-router/basepath-file-based/vite.config.js (1)
1-9: LGTM!The Vite configuration correctly sets the base path to '/app/' and properly configures the TanStack Router plugin with Solid.js support.
e2e/solid-router/basepath-file-based/package.json (1)
13-24: Dependencies correctly use workspace protocol.The internal dependencies properly use the
workspace:^protocol as per coding guidelines.e2e/solid-router/basepath-file-based/src/routes/__root.tsx (1)
1-3: LGTM!The root route is correctly defined using
createRootRoute(). A root route without a component is valid for this use case.e2e/solid-router/basepath-file-based/index.html (1)
1-11: LGTM!The HTML entry point is correctly structured for a Vite-based Solid.js application with appropriate root element and module script.
e2e/solid-router/basepath-file-based/tests/setup/global.setup.ts (1)
1-6: LGTM!The global setup correctly starts the dummy e2e server using the package name from package.json.
e2e/solid-router/basepath-file-based/tests/reload-document.test.ts (1)
1-18: LGTM!The e2e test is well-structured and thoroughly verifies that navigation respects the basepath (/app/) when reloadDocument is true. The test flow appropriately validates bidirectional navigation between routes.
e2e/solid-router/basepath-file-based/tests/setup/global.teardown.ts (1)
1-6: LGTM! Clean teardown implementation.The teardown properly stops the dummy server using the package name, complementing the setup script. The use of JSON import attributes and async/await is correct.
e2e/solid-router/basepath-file-based/src/routes/about.tsx (1)
1-20: LGTM! Route implementation follows best practices.The
/aboutroute is properly defined withcreateFileRoute, usesRoute.useNavigate()correctly, and includes appropriatedata-testidattributes for e2e testing. ThereloadDocument: truenavigation aligns with the test scenario for basepath behavior.e2e/solid-router/basepath-file-based/src/routes/index.tsx (1)
1-25: LGTM! Root route implementation is solid.The root
/route is correctly defined withcreateFileRoute, usesRoute.useNavigate()appropriately, and includes properdata-testidattributes for e2e testing. The implementation is consistent with the/aboutroute and supports the basepath navigation test scenario.e2e/solid-router/basepath-file-based/playwright.config.ts (1)
1-41: LGTM! Well-configured Playwright setup.The configuration properly uses port utilities, sets up global setup/teardown scripts, and configures the web server with appropriate build and serve commands. The use of
workers: 1is appropriate for e2e tests to avoid race conditions, andreuseExistingServer: !process.env.CIis a good developer experience pattern.e2e/solid-router/basepath-file-based/src/main.tsx (1)
1-25: LGTM! Solid router initialization with proper basepath configuration.The router is correctly configured with
basepath: '/app'which is the focus of this e2e suite. The module augmentation for type safety, conditional rendering check to prevent double-mounting, and default router options all follow best practices for TanStack Solid Router.e2e/solid-router/basic-file-based/src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx (1)
3-3: LGTM on normalized path.Consistent with the other non-nested prefix/suffix updates.
e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/route.tsx (1)
3-3: Param placeholder normalization approved.Removing the trailing underscore from $foo matches the new convention.
e2e/solid-router/basic-file-based/src/routes/non-nested/path/baz_.bar.tsx (1)
3-3: LGTM.Path normalization is consistent with sibling routes.
e2e/solid-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx (1)
3-3: Param segment normalization approved.Switch to '/non-nested/named/$baz/bar' matches the param underscore-stripping convention. Based on learnings.
e2e/solid-router/basic-file-based/src/routes/params-ps/non-nested/$foo_/$bar.tsx (1)
4-4: LGTM; coherent with the parent $foo route update.The from path toggle matches the new non-nested convention.
e2e/solid-router/basic-file-based/src/routeTree.gen.ts (1)
1-1931: Skipping review of generated route tree.routeTree.gen.ts is autogenerated and not meant for manual edits; trusting generator output. Based on learnings.
e2e/solid-router/basic-file-based/src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx (1)
3-3: Filename-path mismatch: The file still contains an underscore but the route path was normalized to remove it.The file
{$baz}suffix_.bar.tsxshould either be renamed to{$baz}suffix.bar.tsxOR thecreateFileRoutepath should be/non-nested/suffix/{$baz}suffix_/barto match the filename. Other underscore routes in the codebase (params-ps and named) maintain consistency between filename and path. This change creates an inconsistency.⛔ Skipped due to learnings
Learnt from: nlynzaad PR: TanStack/router#5182 File: e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx:3-5 Timestamp: 2025-09-22T00:56:49.237Z Learning: In TanStack Router, underscores are intentionally stripped from route segments (e.g., `$baz_` becomes `baz` in generated types) but should be preserved in base path segments. This is the correct behavior as of the fix in PR #5182.e2e/solid-router/basepath-file-based/package.json line 2@@ -0,0 +1,2 @@1+{2+ "name": "tanstack-solid-router-e2e-react-basepath-file-based",⚠️ Potential issue | 🔴 Critical
Fix incorrect package name referencing React instead of Solid.
The package name contains "react" but this is a Solid Router e2e test suite. The name should reference "solid" instead.
Apply this diff to fix the package name:
- "name": "tanstack-solid-router-e2e-react-basepath-file-based", + "name": "tanstack-solid-router-e2e-solid-basepath-file-based",📝 Committable suggestion
‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"name": "tanstack-solid-router-e2e-solid-basepath-file-based",🤖 Prompt for AI Agents
In e2e/solid-router/basepath-file-based/package.json around line 2, the package name incorrectly contains "react"; update the "name" field to reference "solid" instead (e.g., change "tanstack-solid-router-e2e-react-basepath-file-based" to "tanstack-solid-router-e2e-solid-basepath-file-based") so the package name correctly reflects this Solid Router e2e test suite.birkskyum(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Walkthrough#
Introduces a new end-to-end test suite for TanStack Solid Router's basepath functionality with file-based routing, including a Playwright test verifying navigate respects basepath during document reload. Updates route paths in an existing Solid Router e2e test by normalizing underscore separators.
Changes#
e2e/solid-router/basepath-file-based/.gitignore,index.html,package.json,playwright.config.ts,tsconfig.json,vite.config.js/app/and sets up server/test infrastructure.e2e/solid-router/basepath-file-based/src/main.tsx,src/routeTree.gen.ts,src/routes/__root.tsx,src/routes/about.tsx,src/routes/index.tsx/app/, and module augmentation. Defines root, index, and about routes with navigate functionality.e2e/solid-router/basepath-file-based/tests/reload-document.test.ts,tests/setup/global.setup.ts,tests/setup/global.teardown.tse2e/solid-router/basic-file-based/src/routeTree.gen.ts,src/routes/non-nested/named/$baz_.bar.tsx,src/routes/non-nested/path/baz_.bar.tsx,src/routes/non-nested/prefix/prefix{$baz}_.bar.tsx,src/routes/non-nested/suffix/{$baz}suffix_.bar.tsx,src/routes/params-ps/non-nested/$foo_/$bar.tsx,src/routes/params-ps/non-nested/$foo_/route.tsx,src/routes/posts_.$postId.edit.tsxSequence Diagram(s)#
Estimated code review effort#
🎯 3 (Moderate) | ⏱️ ~25 minutes
tests/reload-document.test.ts): Verify test logic and assertions align with basepath navigation behaviore2e/solid-router/basic-file-based/src/routeTree.gen.ts): Review route mapping and type declaration updates for consistency across all route renamesPossibly related PRs#
Suggested labels#
package: solid-routerSuggested reviewers#
Poem#
Pre-merge checks and finishing touches#
❌ Failed checks (1 warning)
@coderabbitai generate docstringsto improve docstring coverage.✅ Passed checks (2 passed)
e2e/solid-router/basepath-file-based/with configuration files, source routes, and test files specifically designed to test basepath functionality. The title uses the conventional commit format and is concise and specific enough that a developer scanning the history would understand this adds new test infrastructure for basepath handling in Solid Router. The title also appropriately scopes the change to the test domain via the "test(" prefix.✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share