Skip to content

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Dec 16, 2025

add e2e suites:

basic-virtual-file-routes
basic-virtual-named-export-config-file-based

Summary by CodeRabbit

  • New Features
    • Added two Vue example apps showcasing file-based virtual routing: nested layouts, posts list/detail, a classic subtree, not-found handling, devtools, and Tailwind-based styling.
  • Tests
    • Added end-to-end Playwright suites covering navigation, layouts, post pages, and not-found flows.
  • Chores
    • Added project tooling and config for dev/build/test (Vite/TypeScript/PostCSS) and updated ignore patterns for build/cache/test artifacts.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 16, 2025

Walkthrough

Adds two end-to-end Vue example projects demonstrating virtual file–based routing with generated route trees, nested layouts, data loaders, Vite/Tailwind configuration, Playwright E2E tests, and test server setup/teardown utilities.

Changes

Cohort / File(s) Summary
Project scaffolding (basic virtual file)
e2e/vue-router/basic-virtual-file-based/package.json, e2e/vue-router/basic-virtual-file-based/vite.config.ts, e2e/vue-router/basic-virtual-file-based/tsconfig.json, e2e/vue-router/basic-virtual-file-based/postcss.config.mjs, e2e/vue-router/basic-virtual-file-based/.gitignore, e2e/vue-router/basic-virtual-file-based/index.html
New project manifest and build/test configuration: Vite plugins (tanstackRouter, vue, vueJsx), TypeScript config, PostCSS/Tailwind config, Playwright wiring (see Playwright config cohort), and ignore patterns.
Project scaffolding (named-export variant)
e2e/vue-router/basic-virtual-named-export-config-file-based/package.json, e2e/vue-router/basic-virtual-named-export-config-file-based/vite.config.ts, e2e/vue-router/basic-virtual-named-export-config-file-based/tsconfig.json, e2e/vue-router/basic-virtual-named-export-config-file-based/postcss.config.mjs, e2e/vue-router/basic-virtual-named-export-config-file-based/.gitignore, e2e/vue-router/basic-virtual-named-export-config-file-based/index.html
Mirror of the first project's manifest and tooling for the named-export configuration variant.
Playwright configs & test server lifecycle
e2e/vue-router/basic-virtual-file-based/playwright.config.ts, e2e/vue-router/basic-virtual-file-based/tests/setup/global.setup.ts, e2e/vue-router/basic-virtual-file-based/tests/setup/global.teardown.ts, e2e/vue-router/basic-virtual-named-export-config-file-based/playwright.config.ts, e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts, e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts
Playwright configuration files and global setup/teardown that start/stop a dummy E2E server; webServer commands build/preview the Vite app and baseURL derives from package ports.
E2E tests
e2e/vue-router/basic-virtual-file-based/tests/app.spec.ts, e2e/vue-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts
Playwright tests verifying navigation: posts list/detail, nested layouts (layout-a/layout-b), and not-found flow with recovery.
Virtual route configs
e2e/vue-router/basic-virtual-file-based/routes.ts, e2e/vue-router/basic-virtual-named-export-config-file-based/routes.ts
Virtual-file route declarations using @tanstack/virtual-file-routes composing root, posts subtree, nested layouts, and a physical subtree mapping.
Generated route trees & type augmentations
e2e/vue-router/basic-virtual-file-based/src/routeTree.gen.ts, e2e/vue-router/basic-virtual-named-export-config-file-based/src/routeTree.gen.ts
Auto-generated routeTree files that instantiate routes, wire children via _addFileChildren, and add FileRoutes* interfaces plus module augmentations for per-path typings.
App entry & router setup
e2e/vue-router/basic-virtual-file-based/src/main.tsx, e2e/vue-router/basic-virtual-named-export-config-file-based/src/main.tsx
App bootstrap creating TanStack Vue Router instance (preload/stale/scroll settings), RouterProvider mounting, and module augmentation to expose router on Register interface.
Data utilities
e2e/vue-router/basic-virtual-file-based/src/posts.tsx, e2e/vue-router/basic-virtual-named-export-config-file-based/src/posts.tsx
Exports PostType, fetchPosts, fetchPost with environment-aware endpoint selection (jsonplaceholder vs local test server) and 404 handling via notFound().
Route components: root, home, posts, post-detail
.../src/routes/root.tsx, .../src/routes/home.tsx, .../src/routes/posts.tsx, .../src/routes/posts/posts-home.tsx, .../src/routes/posts/posts-detail.tsx
Root route with navigation and notFound component; home page, posts list with loader and links, posts index, and post-detail route with loader, errorComponent, and notFoundComponent.
Route components: layouts & layout variants
.../src/routes/layout/first-layout.tsx, .../src/routes/layout/second-layout.tsx, .../src/routes/a.tsx, .../src/routes/b.tsx
Two-level nested layouts (first -> second) exposing Outlet and Link navigation; simple Layout A/B components for nested routes.
File-based subtree: hello
.../src/routes/file-based-subtree/hello/route.tsx, .../src/routes/file-based-subtree/hello/index.tsx, .../src/routes/file-based-subtree/hello/universe.tsx, .../src/routes/file-based-subtree/hello/world.tsx
File-based subtree demonstrating nested routes with Links and Outlet and child pages (index, universe, world).
Styling
e2e/vue-router/basic-virtual-file-based/src/styles.css, e2e/vue-router/basic-virtual-named-export-config-file-based/src/styles.css
Tailwind integration, base layer border color rules, and light/dark theme color tokens for background/text/borders.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas needing extra attention:
    • Generated routeTree.gen.ts files — verify module augmentations and FileRoutes* interface correctness.
    • Playwright webServer commands and port/baseURL computation in playwright.config.ts.
    • Data fetchers (posts.tsx) for correct test-mode endpoint wiring and notFound behavior.
    • Consistency between virtual routes.ts and the generated route tree (parent/child relationships and physical subtree mapping).

Possibly related PRs

Suggested reviewers

  • schiller-manuel
  • brenelz

Poem

"I hopped through routes and nested trees, 🐇
Links and layouts on the breeze,
Posts fetched quick, tests tread light,
Generated branches, typed just right—
A tiny rabbit cheers tonight!"

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test(vue-router): virtual routes' accurately describes the primary change: adding end-to-end test suites for Vue Router virtual routes, specifically covering file-based and named-export configuration approaches.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test(vue-router)-virtual-routes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@nx-cloud
Copy link

nx-cloud bot commented Dec 16, 2025

View your CI Pipeline Execution ↗ for commit 9d27139

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

☁️ Nx Cloud last updated this comment at 2025-12-16 16:30:59 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 16, 2025

More templates

@tanstack/arktype-adapter

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

@tanstack/directive-functions-plugin

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

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/vue-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-router@6109

@tanstack/vue-router-devtools

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

@tanstack/vue-router-ssr-query

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

@tanstack/vue-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-start@6109

@tanstack/vue-start-client

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

@tanstack/vue-start-server

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

@tanstack/zod-adapter

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

commit: 9d27139

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 28

Note

Due to the large number of review comments, Critical severity comments were prioritized as inline comments.

🧹 Nitpick comments (5)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/styles.css (1)

18-20: Consider removing redundant border styling.

The universal selector here applies border utilities that overlap with the border-color already set in the base layer (lines 6-12). Both rules target the same elements with border styling.

If you prefer the @apply approach, you can simplify by removing the base layer border styling:

-@layer base {
-  *,
-  ::after,
-  ::before,
-  ::backdrop,
-  ::file-selector-button {
-    border-color: var(--color-gray-200, currentcolor);
-  }
-}
-
 html {
   color-scheme: light dark;
 }

Or keep the base layer and remove the universal selector styling:

 html {
   color-scheme: light dark;
 }
-* {
-  @apply border-gray-200 dark:border-gray-800;
-}
 body {
   @apply bg-gray-50 text-gray-950 dark:bg-gray-900 dark:text-gray-200;
 }
e2e/vue-router/basic-virtual-file-based/src/posts.tsx (1)

31-36: Consider adding error handling for consistency.

Unlike fetchPost, this function lacks error handling. If the request fails, it could result in an unhandled promise rejection. For consistency and test reliability, consider adding a catch block similar to fetchPost.

Apply this diff to add error handling:

 export const fetchPosts = async () => {
   console.info('Fetching posts...')
   return axios
     .get<Array<PostType>>(`${queryURL}/posts`)
     .then((r) => r.data.slice(0, 10))
+    .catch((err) => {
+      console.error('Error fetching posts:', err)
+      throw err
+    })
 }
e2e/vue-router/basic-virtual-named-export-config-file-based/src/posts.tsx (1)

10-14: Consider using const with a conditional expression.

Using const with a ternary makes the intent clearer and prevents accidental reassignment.

-let queryURL = 'https://jsonplaceholder.typicode.com'
-
-if (import.meta.env.VITE_NODE_ENV === 'test') {
-  queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}`
-}
+const queryURL =
+  import.meta.env.VITE_NODE_ENV === 'test'
+    ? `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}`
+    : 'https://jsonplaceholder.typicode.com'
e2e/vue-router/basic-virtual-file-based/src/main.tsx (1)

21-21: Consider handling missing app element gracefully.

The non-null assertion on Line 21 will throw a runtime error if the app element doesn't exist in the DOM.

Consider adding a null check:

-const rootElement = document.getElementById('app')!
+const rootElement = document.getElementById('app')
+if (!rootElement) {
+  throw new Error('Root element #app not found')
+}
e2e/vue-router/basic-virtual-file-based/playwright.config.ts (1)

29-29: Consider extracting the webServer command for readability.

The command on Line 29 is quite long and could be more maintainable if extracted to a separate script file or broken into multiple lines.

Example:

  webServer: {
-    command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`,
+    command: [
+      `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT}`,
+      `pnpm build && pnpm preview --port ${PORT}`
+    ].join(' '),
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 77c7508 and e72bf03.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (55)
  • e2e/vue-router/basic-virtual-file-based/.gitignore (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/index.html (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/package.json (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/playwright.config.ts (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/postcss.config.mjs (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/routes.ts (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/main.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/posts.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routeTree.gen.ts (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/a.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/b.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/index.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/universe.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/world.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/home.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/layout/first-layout.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/layout/second-layout.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-home.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/root.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/styles.css (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/tests/app.spec.ts (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/tests/setup/global.setup.ts (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/tests/setup/global.teardown.ts (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/tsconfig.json (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/vite.config.ts (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/.gitignore (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/index.html (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/package.json (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/playwright.config.ts (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/postcss.config.mjs (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/routes.ts (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/main.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/posts.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/a.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/index.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/route.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/universe.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/world.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/home.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/layout/first-layout.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/layout/second-layout.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-home.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/root.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/styles.css (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tsconfig.json (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/vite.config.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript strict mode with extensive type safety for all code

Files:

  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/index.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/world.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/home.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/b.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/main.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/universe.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/universe.tsx
  • e2e/vue-router/basic-virtual-file-based/src/main.tsx
  • e2e/vue-router/basic-virtual-file-based/src/posts.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/world.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/root.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-home.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/routes.ts
  • e2e/vue-router/basic-virtual-file-based/routes.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/index.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/posts.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx
  • e2e/vue-router/basic-virtual-file-based/vite.config.ts
  • e2e/vue-router/basic-virtual-file-based/playwright.config.ts
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/route.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/vite.config.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/root.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/layout/second-layout.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx
  • e2e/vue-router/basic-virtual-file-based/tests/app.spec.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx
  • e2e/vue-router/basic-virtual-file-based/tests/setup/global.setup.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/home.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/layout/first-layout.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/layout/second-layout.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/layout/first-layout.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/a.tsx
  • e2e/vue-router/basic-virtual-file-based/tests/setup/global.teardown.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/a.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-home.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/playwright.config.ts
  • e2e/vue-router/basic-virtual-file-based/src/routeTree.gen.ts
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Implement ESLint rules for router best practices using the ESLint plugin router

Files:

  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/index.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/world.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/home.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/b.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/main.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/universe.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/universe.tsx
  • e2e/vue-router/basic-virtual-file-based/src/main.tsx
  • e2e/vue-router/basic-virtual-file-based/src/posts.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/world.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/root.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-home.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/routes.ts
  • e2e/vue-router/basic-virtual-file-based/routes.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/index.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/posts.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx
  • e2e/vue-router/basic-virtual-file-based/vite.config.ts
  • e2e/vue-router/basic-virtual-file-based/playwright.config.ts
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/route.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/vite.config.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/root.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/layout/second-layout.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx
  • e2e/vue-router/basic-virtual-file-based/tests/app.spec.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx
  • e2e/vue-router/basic-virtual-file-based/tests/setup/global.setup.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/home.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/layout/first-layout.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/layout/second-layout.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/layout/first-layout.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/a.tsx
  • e2e/vue-router/basic-virtual-file-based/tests/setup/global.teardown.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/a.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-home.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/playwright.config.ts
  • e2e/vue-router/basic-virtual-file-based/src/routeTree.gen.ts
**/package.json

📄 CodeRabbit inference engine (AGENTS.md)

Use workspace protocol workspace:* for internal dependencies in package.json files

Files:

  • e2e/vue-router/basic-virtual-named-export-config-file-based/package.json
  • e2e/vue-router/basic-virtual-file-based/package.json
🧠 Learnings (9)
📓 Common learnings
Learnt from: nlynzaad
Repo: TanStack/router PR: 5402
File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
Timestamp: 2025-10-08T08:11:47.088Z
Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.
Learnt from: FatahChan
Repo: TanStack/router PR: 5475
File: e2e/react-start/basic-prerendering/src/routes/redirect/$target/via-beforeLoad.tsx:8-0
Timestamp: 2025-10-14T18:59:33.990Z
Learning: In TanStack Router e2e test files, when a route parameter is validated at the route level (e.g., using zod in validateSearch or param validation), switch statements on that parameter do not require a default case, as the validation ensures only expected values will reach the switch.
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-06T15:03:07.223Z
Learning: Use file-based routing in `src/routes/` directories or code-based routing with route definitions
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 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/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/index.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/home.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/b.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/universe.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/index.html
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts
  • e2e/vue-router/basic-virtual-file-based/src/main.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/world.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/root.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/routes.ts
  • e2e/vue-router/basic-virtual-file-based/routes.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/index.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx
  • e2e/vue-router/basic-virtual-file-based/.gitignore
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/route.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/root.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/package.json
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/layout/second-layout.tsx
  • e2e/vue-router/basic-virtual-file-based/index.html
  • e2e/vue-router/basic-virtual-file-based/tests/app.spec.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/.gitignore
  • e2e/vue-router/basic-virtual-file-based/tsconfig.json
  • e2e/vue-router/basic-virtual-file-based/tests/setup/global.setup.ts
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tsconfig.json
  • e2e/vue-router/basic-virtual-file-based/src/routes/home.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/layout/second-layout.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/layout/first-layout.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/a.tsx
  • e2e/vue-router/basic-virtual-file-based/tests/setup/global.teardown.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/a.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-home.tsx
  • e2e/vue-router/basic-virtual-file-based/package.json
  • e2e/vue-router/basic-virtual-file-based/src/routeTree.gen.ts
📚 Learning: 2025-12-06T15:03:07.223Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-06T15:03:07.223Z
Learning: Use file-based routing in `src/routes/` directories or code-based routing with route definitions

Applied to files:

  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/index.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/world.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/home.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/b.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-home.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/routes.ts
  • e2e/vue-router/basic-virtual-file-based/routes.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/index.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/route.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/home.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/layout/first-layout.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/layout/second-layout.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/layout/first-layout.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/a.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/a.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-home.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routeTree.gen.ts
📚 Learning: 2025-12-06T15:03:07.223Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-06T15:03:07.223Z
Learning: Applies to **/*.{js,ts,tsx} : Implement ESLint rules for router best practices using the ESLint plugin router

Applied to files:

  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/home.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/b.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/main.tsx
  • e2e/vue-router/basic-virtual-file-based/src/main.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/world.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/root.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-home.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/routes.ts
  • e2e/vue-router/basic-virtual-file-based/routes.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/index.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/route.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/root.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/package.json
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/layout/second-layout.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/.gitignore
  • e2e/vue-router/basic-virtual-file-based/tsconfig.json
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tsconfig.json
  • e2e/vue-router/basic-virtual-file-based/src/routes/home.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/layout/second-layout.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/layout/first-layout.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/a.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/a.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-home.tsx
  • e2e/vue-router/basic-virtual-file-based/package.json
📚 Learning: 2025-11-02T16:16:24.898Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5732
File: packages/start-client-core/src/client/hydrateStart.ts:6-9
Timestamp: 2025-11-02T16:16:24.898Z
Learning: In packages/start-client-core/src/client/hydrateStart.ts, the `import/no-duplicates` ESLint disable is necessary for imports from `#tanstack-router-entry` and `#tanstack-start-entry` because both aliases resolve to the same placeholder file (`fake-start-entry.js`) in package.json during static analysis, even though they resolve to different files at runtime.

Applied to files:

  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/main.tsx
  • e2e/vue-router/basic-virtual-file-based/src/main.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/package.json
  • e2e/vue-router/basic-virtual-file-based/tests/setup/global.setup.ts
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tsconfig.json
  • e2e/vue-router/basic-virtual-file-based/package.json
📚 Learning: 2025-10-09T12:59:14.842Z
Learnt from: hokkyss
Repo: TanStack/router PR: 5418
File: e2e/react-start/custom-identifier-prefix/public/site.webmanifest:2-3
Timestamp: 2025-10-09T12:59:14.842Z
Learning: In e2e test fixtures (files under e2e directories), empty or placeholder values in configuration files like site.webmanifest are acceptable and should not be flagged unless the test specifically validates those fields.

Applied to files:

  • e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts
  • e2e/vue-router/basic-virtual-file-based/playwright.config.ts
  • e2e/vue-router/basic-virtual-named-export-config-file-based/playwright.config.ts
📚 Learning: 2025-10-01T18:31:35.420Z
Learnt from: schiller-manuel
Repo: TanStack/router PR: 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/vue-router/basic-virtual-file-based/src/main.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/root.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/routes.ts
  • e2e/vue-router/basic-virtual-file-based/routes.ts
  • e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/index.tsx
  • e2e/vue-router/basic-virtual-file-based/.gitignore
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/root.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/package.json
  • e2e/vue-router/basic-virtual-named-export-config-file-based/.gitignore
  • e2e/vue-router/basic-virtual-file-based/tsconfig.json
  • e2e/vue-router/basic-virtual-file-based/src/routes/layout/first-layout.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/a.tsx
  • e2e/vue-router/basic-virtual-file-based/package.json
  • e2e/vue-router/basic-virtual-file-based/src/routeTree.gen.ts
📚 Learning: 2025-10-09T12:59:02.129Z
Learnt from: hokkyss
Repo: TanStack/router PR: 5418
File: e2e/react-start/custom-identifier-prefix/src/styles/app.css:19-21
Timestamp: 2025-10-09T12:59:02.129Z
Learning: In e2e test directories (paths containing `e2e/`), accessibility concerns like outline suppression patterns are less critical since the code is for testing purposes, not production use.

Applied to files:

  • e2e/vue-router/basic-virtual-file-based/.gitignore
📚 Learning: 2025-12-06T15:03:07.223Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-06T15:03:07.223Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript strict mode with extensive type safety for all code

Applied to files:

  • e2e/vue-router/basic-virtual-file-based/tsconfig.json
  • e2e/vue-router/basic-virtual-named-export-config-file-based/tsconfig.json
🧬 Code graph analysis (32)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/index.tsx (3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/a.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
  • Route (3-27)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/world.tsx (3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/index.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
  • Route (3-27)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/universe.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/home.tsx (2)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/a.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx (2)
e2e/vue-router/basic-virtual-file-based/src/routes/root.tsx (1)
  • Route (9-19)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/posts.tsx (1)
  • fetchPost (16-29)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/main.tsx (1)
e2e/solid-router/js-only-file-based/src/main.jsx (1)
  • rootElement (14-14)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/universe.tsx (5)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/index.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
  • Route (3-27)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/world.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-home.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/index.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx (3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/universe.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/world.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
  • Route (3-27)
e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts (2)
e2e/vue-router/basic-virtual-file-based/tests/setup/global.teardown.ts (1)
  • teardown (4-6)
scripts/set-ts-version.js (1)
  • packageJson (33-33)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/universe.tsx (3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/index.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
  • Route (3-27)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/world.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/main.tsx (1)
e2e/solid-router/js-only-file-based/src/main.jsx (1)
  • rootElement (14-14)
e2e/vue-router/basic-virtual-file-based/src/posts.tsx (1)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/posts.tsx (3)
  • PostType (4-8)
  • fetchPost (16-29)
  • fetchPosts (31-36)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/root.tsx (3)
e2e/vue-router/basic-virtual-file-based/src/routes/root.tsx (1)
  • Route (9-19)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/a.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-home.tsx (3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
  • Route (3-27)
e2e/vue-router/basic-virtual-file-based/src/routes/home.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx (1)
  • Route (4-7)
e2e/vue-router/basic-virtual-named-export-config-file-based/routes.ts (1)
e2e/vue-router/basic-virtual-file-based/routes.ts (1)
  • routes (9-22)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx (2)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx (1)
  • Route (4-7)
e2e/vue-router/basic-virtual-file-based/src/posts.tsx (1)
  • fetchPosts (31-36)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/posts.tsx (1)
e2e/vue-router/basic-virtual-file-based/src/posts.tsx (3)
  • PostType (4-8)
  • fetchPost (16-29)
  • fetchPosts (31-36)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx (3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/a.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/index.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
  • Route (3-27)
e2e/vue-router/basic-virtual-file-based/vite.config.ts (2)
e2e/vue-router/basic-virtual-file-based/routes.ts (1)
  • routes (9-22)
e2e/vue-router/basic-virtual-named-export-config-file-based/routes.ts (1)
  • routes (9-22)
e2e/vue-router/basic-virtual-file-based/playwright.config.ts (1)
scripts/set-ts-version.js (1)
  • packageJson (33-33)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
  • Route (3-27)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/layout/second-layout.tsx (4)
e2e/vue-router/basic-virtual-file-based/src/routes/layout/first-layout.tsx (1)
  • Route (3-5)
e2e/vue-router/basic-virtual-file-based/src/routes/layout/second-layout.tsx (1)
  • Route (3-5)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/a.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx (2)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx (1)
  • PostErrorComponent (5-7)
e2e/vue-router/basic-virtual-file-based/src/posts.tsx (1)
  • fetchPost (16-29)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx (2)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx (1)
  • Route (9-16)
e2e/vue-router/basic-virtual-file-based/src/posts.tsx (1)
  • fetchPosts (31-36)
e2e/vue-router/basic-virtual-file-based/tests/setup/global.setup.ts (1)
scripts/set-ts-version.js (1)
  • packageJson (33-33)
e2e/vue-router/basic-virtual-file-based/src/routes/home.tsx (14)
e2e/vue-router/basic-virtual-file-based/src/routes/a.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/b.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/index.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/universe.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/world.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/layout/first-layout.tsx (1)
  • Route (3-5)
e2e/vue-router/basic-virtual-file-based/src/routes/layout/second-layout.tsx (1)
  • Route (3-5)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx (1)
  • Route (9-16)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-home.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx (1)
  • Route (4-7)
e2e/vue-router/basic-virtual-file-based/src/routes/root.tsx (1)
  • Route (9-19)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/a.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/index.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/layout/first-layout.tsx (1)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
  • Route (3-27)
e2e/vue-router/basic-virtual-file-based/src/routes/layout/second-layout.tsx (11)
e2e/vue-router/basic-virtual-file-based/src/routes/a.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/b.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
  • Route (3-27)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/universe.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/world.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/home.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/layout/first-layout.tsx (1)
  • Route (3-5)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx (1)
  • Route (9-16)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx (1)
  • Route (4-7)
e2e/vue-router/basic-virtual-file-based/src/routes/root.tsx (1)
  • Route (9-19)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
  • Route (3-27)
e2e/vue-router/basic-virtual-file-based/src/routes/layout/first-layout.tsx (6)
e2e/vue-router/basic-virtual-file-based/src/routes/a.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/b.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
  • Route (3-27)
e2e/vue-router/basic-virtual-file-based/src/routes/home.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/layout/second-layout.tsx (1)
  • Route (3-5)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx (1)
  • Route (4-7)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/a.tsx (6)
e2e/vue-router/basic-virtual-file-based/src/routes/a.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx (1)
  • Route (3-27)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx (1)
  • Route (4-7)
e2e/vue-router/basic-virtual-file-based/src/routes/root.tsx (1)
  • Route (9-19)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/b.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/file-based-subtree/hello/index.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-file-based/tests/setup/global.teardown.ts (2)
e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts (1)
  • teardown (4-6)
scripts/set-ts-version.js (1)
  • packageJson (33-33)
e2e/vue-router/basic-virtual-file-based/src/routes/a.tsx (1)
e2e/vue-router/basic-virtual-file-based/src/routes/home.tsx (1)
  • Route (1-3)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-home.tsx (1)
e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-home.tsx (1)
  • Route (1-3)
🔇 Additional comments (37)
e2e/vue-router/basic-virtual-named-export-config-file-based/.gitignore (1)

1-13: LGTM!

The .gitignore configuration correctly excludes standard dependencies, build artifacts, Playwright test outputs, and the autogenerated route tree file (src/routeTree.gen.ts). The patterns are properly formatted and comprehensive for a Vue Router e2e test project.

e2e/vue-router/basic-virtual-file-based/.gitignore (1)

1-11: LGTM!

Standard and well-organized .gitignore configuration for a Vue + Playwright e2e project. The ignore patterns appropriately exclude build artifacts, package dependencies, OS-specific files, and test output directories without any redundancy.

e2e/vue-router/basic-virtual-named-export-config-file-based/tsconfig.json (1)

1-16: LGTM! Well-configured for Vue + Vite e2e tests.

The TypeScript configuration is appropriate for this Vue Router e2e test project. It correctly enables strict mode (per coding guidelines), uses modern bundler module resolution, properly configures Vue JSX support, and includes necessary Vite client types.

e2e/vue-router/basic-virtual-named-export-config-file-based/postcss.config.mjs (1)

1-5: Configuration correctly implements Tailwind CSS v4 with PostCSS.

The configuration properly adds @tailwindcss/postcss to the postcss.config.mjs file, and @tailwindcss/postcss v4.1.18 is available. The empty options object uses plugin defaults, which is valid for standard Tailwind setup. Dependencies are correctly declared in package.json.

e2e/vue-router/basic-virtual-file-based/src/posts.tsx (4)

1-2: LGTM!

The imports are appropriate for the data-fetching utilities. Using redaxios as a lightweight HTTP client is a good choice for e2e tests.


4-8: LGTM!

The type definition is correct and consistent with the sibling test suite in basic-virtual-named-export-config-file-based/src/posts.tsx.


16-29: LGTM!

The implementation correctly handles 404 errors by throwing notFound() from TanStack Router, which integrates well with the router's error handling system. The error handling is appropriate and consistent with the sibling test suite.


10-14: No actionable concerns identified. The VITE_NODE_ENV and VITE_EXTERNAL_PORT environment variables are properly configured in the Playwright configuration file where the build and preview commands are executed. These variables are successfully passed to the build process and accessible in the application code via import.meta.env.

e2e/vue-router/basic-virtual-file-based/package.json (2)

14-24: Internal dependencies follow workspace protocol correctly.

The use of workspace:^ for TanStack internal packages (@tanstack/router-plugin, @tanstack/virtual-file-routes, @tanstack/vue-router, @tanstack/vue-router-devtools, @tanstack/router-e2e-utils) aligns with the coding guidelines.


32-32: Vite version ^7.1.7 is stable and well-established. The latest version is 7.3.0, meaning 7.1.7 is available and mature. No action needed.

e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx (1)

9-37: PostsComponent implementation looks good.

The component correctly:

  • Uses Route.useLoaderData() to access loader data
  • Renders posts as a list with navigation links
  • Includes an Outlet for nested routes
  • Adds a non-existent post for testing the notFound behavior
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx (1)

18-27: PostComponent implementation is correct.

The component properly uses Route.useLoaderData() and accesses the reactive post data with post().title and post().body.

e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx (1)

18-27: PostComponent implementation is correct.

The component properly uses Route.useLoaderData() and accesses the reactive post data.

e2e/vue-router/basic-virtual-named-export-config-file-based/src/posts.tsx (1)

16-36: Data fetching utilities look good.

The implementation correctly:

  • Types the API responses with PostType
  • Handles 404 errors by throwing notFound() from vue-router
  • Re-throws other errors for proper error boundary handling
  • Limits posts to 10 items for the list view
e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts (1)

1-6: LGTM!

The setup file correctly uses the modern JSON import assertion syntax and properly integrates with the e2e test infrastructure.

e2e/vue-router/basic-virtual-file-based/index.html (1)

1-11: LGTM!

Clean HTML5 scaffold that properly bootstraps the Vue Router application with module script support.

e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts (1)

1-6: LGTM!

The teardown file correctly mirrors the setup pattern and properly stops the dummy server using the package name.

e2e/vue-router/basic-virtual-file-based/src/styles.css (1)

1-21: LGTM!

Clean Tailwind CSS v4 setup with proper theme support for light and dark modes.

e2e/vue-router/basic-virtual-file-based/tests/setup/global.teardown.ts (1)

1-6: LGTM!

Proper teardown implementation that cleans up the e2e dummy server. The import attributes syntax is correct and matches the modern standard.

e2e/vue-router/basic-virtual-file-based/tsconfig.json (1)

1-16: LGTM!

TypeScript configuration correctly enables strict mode as required by coding guidelines and properly configures JSX for Vue with appropriate compiler options for the e2e test project.

e2e/vue-router/basic-virtual-named-export-config-file-based/package.json (1)

1-35: LGTM!

Package manifest correctly uses the workspace:^ protocol for all internal TanStack dependencies as required by coding guidelines. Scripts and dependency versions are appropriate for an e2e test project.

e2e/vue-router/basic-virtual-named-export-config-file-based/vite.config.ts (1)

1-18: LGTM!

The Vite configuration is well-structured with appropriate plugins for Vue and TanStack Router. The virtual route configuration setup aligns with the e2e test objectives.

e2e/vue-router/basic-virtual-file-based/tests/setup/global.setup.ts (1)

1-6: LGTM!

The global setup correctly initializes the e2e test server using the package name. The import attribute syntax for JSON is appropriate.

e2e/vue-router/basic-virtual-file-based/tests/app.spec.ts (1)

1-33: LGTM!

The Playwright tests provide good coverage of navigation flows including posts, nested layouts, and not-found handling. The test structure and assertions are appropriate.

e2e/vue-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts (1)

1-33: LGTM!

The test suite mirrors the basic-virtual-file-based tests appropriately, providing consistent e2e coverage for the named-export-config variant.

e2e/vue-router/basic-virtual-file-based/src/main.tsx (1)

23-25: Clarify the purpose of the innerHTML check.

The conditional rendering based on !rootElement.innerHTML is unconventional for a Vue app entrypoint. This pattern is typically used for SSR hydration scenarios, but there's no SSR setup evident in this e2e test.

Is this intended for SSR hydration, or can it be simplified to always render?

-if (!rootElement.innerHTML) {
-  render(() => <RouterProvider router={router} />, rootElement)
-}
+render(() => <RouterProvider router={router} />, rootElement)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/root.tsx (1)

9-75: LGTM!

The root route configuration is well-structured with proper navigation, not-found handling, and devtools integration. The intentional @ts-expect-error on Line 60 correctly documents the test case for non-existent routes.

e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/layout/second-layout.tsx (1)

7-34: LGTM!

The nested layout component is well-structured with proper navigation links and outlet placement.

e2e/vue-router/basic-virtual-file-based/src/routes/root.tsx (1)

9-75: LGTM!

The root route is properly configured with navigation, error handling, and devtools. The structure mirrors best practices for TanStack Vue Router.

e2e/vue-router/basic-virtual-file-based/playwright.config.ts (1)

1-41: LGTM!

The Playwright configuration is well-structured with proper port management, global setup/teardown, and environment variable handling for the e2e test environment.

e2e/vue-router/basic-virtual-file-based/src/routes/layout/first-layout.tsx (1)

7-16: LGTM!

The layout component correctly renders a wrapper with an outlet for nested routes.

e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx (1)

9-38: LGTM!

The posts component properly uses loader data, renders a list of posts with navigation links, and includes a test case for non-existent posts. The reactive data handling with posts() is appropriate for Vue.

e2e/vue-router/basic-virtual-file-based/routes.ts (1)

9-22: LGTM!

The virtual route tree is well-structured with proper nesting of layouts, dynamic routes, and physical subtree mapping. The declarative route definition aligns with the virtual-file-routes API design.

e2e/vue-router/basic-virtual-named-export-config-file-based/routes.ts (1)

1-22: LGTM! Virtual route configuration is well-structured.

The route configuration correctly uses the @tanstack/virtual-file-routes helpers to define a hierarchical route structure with root, index, nested routes, layouts, and physical file-based subtrees. The structure is consistent with the established pattern in the codebase.

e2e/vue-router/basic-virtual-file-based/vite.config.ts (1)

1-19: LGTM! Vite configuration is correctly set up.

The configuration properly integrates the TanStack Router plugin with Vue, enabling virtual file-based routing with auto code splitting. All necessary plugins are included and correctly configured.

e2e/vue-router/basic-virtual-named-export-config-file-based/playwright.config.ts (2)

8-10: LGTM! Playwright configuration is well-structured.

The configuration correctly:

  • Derives ports using the e2e-utils helpers for isolation
  • Sets up single-worker execution for stability
  • Configures the web server with proper environment variable propagation
  • Defines a single Chromium project for testing

Also applies to: 14-19, 23-41


20-21: Verify the global teardown file path exists.

The globalTeardown path references a local file './tests/setup/global.teardown.ts', but ensure this file exists in the current directory. If the teardown is shared with the basic-virtual-file-based directory, the path may need to be updated to point to the shared file.

Run this script to check if the file exists and compare with related directories:

#!/bin/bash
# Check if teardown file exists in current directory
if [ -f "e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts" ]; then
  echo "✓ Local teardown file exists"
  cat e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts
else
  echo "✗ Local teardown file NOT found"
fi

# Check if it exists in the other directory
if [ -f "e2e/vue-router/basic-virtual-file-based/tests/setup/global.teardown.ts" ]; then
  echo "✓ Teardown file exists in basic-virtual-file-based"
fi

# List all setup/teardown files in vue-router e2e tests
fd "global\.(setup|teardown)\.ts" e2e/vue-router

Comment on lines +1 to +3
export const Route = createFileRoute({
component: LayoutAComponent,
})
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Missing import for createFileRoute.

The file uses createFileRoute but doesn't import it. This will cause a compilation error.

Add the missing import at the top of the file:

+import { createFileRoute } from '@tanstack/vue-router'
+
 export const Route = createFileRoute({
   component: LayoutAComponent,
 })
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const Route = createFileRoute({
component: LayoutAComponent,
})
import { createFileRoute } from '@tanstack/vue-router'
export const Route = createFileRoute({
component: LayoutAComponent,
})
🤖 Prompt for AI Agents
In e2e/vue-router/basic-virtual-file-based/src/routes/a.tsx lines 1-3, the code
calls createFileRoute but doesn't import it; add a top-level import for
createFileRoute (for example: import { createFileRoute } from
'virtual:generated-pages' or from the project's routing helper module used
elsewhere) so the symbol is defined and the file compiles.

Comment on lines +1 to +3
export const Route = createFileRoute({
component: LayoutBComponent,
})
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Missing import for createFileRoute.

The file uses createFileRoute but doesn't import it. This will cause a compilation error.

Add the missing import at the top of the file:

+import { createFileRoute } from '@tanstack/vue-router'
+
 export const Route = createFileRoute({
   component: LayoutBComponent,
 })
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const Route = createFileRoute({
component: LayoutBComponent,
})
import { createFileRoute } from '@tanstack/vue-router'
export const Route = createFileRoute({
component: LayoutBComponent,
})
🤖 Prompt for AI Agents
e2e/vue-router/basic-virtual-file-based/src/routes/b.tsx lines 1-3: the file
uses createFileRoute but doesn't import it; add an import for createFileRoute at
the top of the file (for example: import { createFileRoute } from
'virtual:generated-pages') so the symbol is defined and the file compiles.

Comment on lines +1 to +3
export const Route = createFileRoute({
component: () => <div>This is the index</div>,
})
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Missing import for createFileRoute.

The createFileRoute function is used but never imported, which will cause a ReferenceError at runtime.

Apply this diff to add the missing import:

+import { createFileRoute } from '@tanstack/vue-router'
+
 export const Route = createFileRoute({
   component: () => <div>This is the index</div>,
 })
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const Route = createFileRoute({
component: () => <div>This is the index</div>,
})
import { createFileRoute } from '@tanstack/vue-router'
export const Route = createFileRoute({
component: () => <div>This is the index</div>,
})
🤖 Prompt for AI Agents
In
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/index.tsx
lines 1-3, the createFileRoute function is used but not imported; add an import
for createFileRoute from its module (where other routes import it from in the
project, e.g., the router utilities) at the top of this file and then keep the
existing export unchanged so the component can reference createFileRoute without
causing a ReferenceError.

Comment on lines +1 to +27
import { Link, Outlet } from '@tanstack/vue-router'

export const Route = createFileRoute({
component: () => (
<div>
Hello!
<br />{' '}
<Link
to="/classic/hello/universe"
activeProps={{
class: 'font-bold',
}}
>
say hello to the universe
</Link>{' '}
<Link
to="/classic/hello/world"
activeProps={{
class: 'font-bold',
}}
>
say hello to the world
</Link>
<Outlet />
</div>
),
})
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Missing import for createFileRoute.

The function createFileRoute is called but never imported, which will cause a ReferenceError at runtime.

Apply this diff to add the missing import:

-import { Link, Outlet } from '@tanstack/vue-router'
+import { createFileRoute, Link, Outlet } from '@tanstack/vue-router'
 
 export const Route = createFileRoute({
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { Link, Outlet } from '@tanstack/vue-router'
export const Route = createFileRoute({
component: () => (
<div>
Hello!
<br />{' '}
<Link
to="/classic/hello/universe"
activeProps={{
class: 'font-bold',
}}
>
say hello to the universe
</Link>{' '}
<Link
to="/classic/hello/world"
activeProps={{
class: 'font-bold',
}}
>
say hello to the world
</Link>
<Outlet />
</div>
),
})
import { createFileRoute, Link, Outlet } from '@tanstack/vue-router'
export const Route = createFileRoute({
component: () => (
<div>
Hello!
<br />{' '}
<Link
to="/classic/hello/universe"
activeProps={{
class: 'font-bold',
}}
>
say hello to the universe
</Link>{' '}
<Link
to="/classic/hello/world"
activeProps={{
class: 'font-bold',
}}
>
say hello to the world
</Link>
<Outlet />
</div>
),
})
🤖 Prompt for AI Agents
e2e/vue-router/basic-virtual-file-based/src/routes/file-based-subtree/hello/route.tsx
lines 1-27: The file calls createFileRoute but never imports it; add an import
for createFileRoute from '@tanstack/vue-router' alongside the existing Link and
Outlet import (e.g., include createFileRoute in the import list) so the symbol
is defined and the component builds at runtime.

Comment on lines +1 to +5
import { Link, Outlet } from '@tanstack/vue-router'

export const Route = createFileRoute({
component: LayoutComponent,
})
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Missing import for createFileRoute.

The function createFileRoute is used on Line 3 but not imported, which will cause a runtime error.

Apply this diff to add the missing import:

-import { Link, Outlet } from '@tanstack/vue-router'
+import { Link, Outlet, createFileRoute } from '@tanstack/vue-router'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { Link, Outlet } from '@tanstack/vue-router'
export const Route = createFileRoute({
component: LayoutComponent,
})
import { Link, Outlet, createFileRoute } from '@tanstack/vue-router'
export const Route = createFileRoute({
component: LayoutComponent,
})
🤖 Prompt for AI Agents
In
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/layout/second-layout.tsx
around lines 1-5, the file calls createFileRoute but never imports it; add
createFileRoute to the import from '@tanstack/vue-router' (e.g. include
createFileRoute in the named import on line 1) so the symbol is available where
Route is created.

Comment on lines +1 to +9
import { ErrorComponent } from '@tanstack/vue-router'
import { fetchPost } from '../../posts'
import type { ErrorComponentProps } from '@tanstack/vue-router'

export function PostErrorComponent({ error }: ErrorComponentProps) {
return <ErrorComponent error={error} />
}

export const Route = createFileRoute({
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Missing import for createFileRoute.

createFileRoute is used on line 9 but is not imported. This will cause a runtime error.

-import { ErrorComponent } from '@tanstack/vue-router'
+import { createFileRoute, ErrorComponent } from '@tanstack/vue-router'
 import { fetchPost } from '../../posts'
 import type { ErrorComponentProps } from '@tanstack/vue-router'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { ErrorComponent } from '@tanstack/vue-router'
import { fetchPost } from '../../posts'
import type { ErrorComponentProps } from '@tanstack/vue-router'
export function PostErrorComponent({ error }: ErrorComponentProps) {
return <ErrorComponent error={error} />
}
export const Route = createFileRoute({
import { createFileRoute, ErrorComponent } from '@tanstack/vue-router'
import { fetchPost } from '../../posts'
import type { ErrorComponentProps } from '@tanstack/vue-router'
export function PostErrorComponent({ error }: ErrorComponentProps) {
return <ErrorComponent error={error} />
}
export const Route = createFileRoute({
🤖 Prompt for AI Agents
In
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx
around lines 1 to 9, the function createFileRoute is used on line 9 but not
imported; add an import for createFileRoute (e.g., import { createFileRoute }
from '@tanstack/vue-router') at the top with the other imports so the symbol is
defined and prevents the runtime error.

Comment on lines +1 to +3
export const Route = createFileRoute({
component: PostsIndexComponent,
})
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Missing import for createFileRoute.

The createFileRoute function is used but never imported, which will cause a ReferenceError at runtime.

Apply this diff to add the missing import:

+import { createFileRoute } from '@tanstack/vue-router'
+
 export const Route = createFileRoute({
   component: PostsIndexComponent,
 })
🤖 Prompt for AI Agents
In
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-home.tsx
around lines 1-3, the function createFileRoute is used but not imported; add an
import for createFileRoute at the top of the file (e.g. import { createFileRoute
} from 'virtual:generated-pages' or from the actual module that provides it) so
the identifier is defined before the export and the runtime ReferenceError is
avoided.

Comment on lines +1 to +7
import { Link, Outlet } from '@tanstack/vue-router'
import { fetchPosts } from '../../posts'

export const Route = createFileRoute({
loader: fetchPosts,
component: PostsComponent,
})
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Missing import for createFileRoute.

The function createFileRoute is used on Line 4 but not imported, which will cause a runtime error.

Apply this diff to add the missing import:

-import { Link, Outlet } from '@tanstack/vue-router'
+import { Link, Outlet, createFileRoute } from '@tanstack/vue-router'
 import { fetchPosts } from '../../posts'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { Link, Outlet } from '@tanstack/vue-router'
import { fetchPosts } from '../../posts'
export const Route = createFileRoute({
loader: fetchPosts,
component: PostsComponent,
})
import { Link, Outlet, createFileRoute } from '@tanstack/vue-router'
import { fetchPosts } from '../../posts'
export const Route = createFileRoute({
loader: fetchPosts,
component: PostsComponent,
})
🤖 Prompt for AI Agents
In
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx
lines 1-7, the createFileRoute identifier is used but not imported; add an
import for createFileRoute from '@tanstack/vue-router' alongside the existing
imports (e.g., include createFileRoute in the import list at the top) so the
function is available for the Route declaration.

@@ -0,0 +1,23 @@
@import 'tailwindcss';

@source './**/*.{js,jsx,ts,tsx}';
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Add .vue extension to the source glob.

This is a Vue project, but the source glob only includes JS/TS file extensions. Tailwind CSS needs to scan .vue files to detect utility classes used in Vue components.

Apply this diff to include Vue files:

-@source './**/*.{js,jsx,ts,tsx}';
+@source './**/*.{js,jsx,ts,tsx,vue}';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@source './**/*.{js,jsx,ts,tsx}';
@source './**/*.{js,jsx,ts,tsx,vue}';
🤖 Prompt for AI Agents
In e2e/vue-router/basic-virtual-named-export-config-file-based/src/styles.css
around line 3, the Tailwind source glob only lists JS/TS extensions so .vue
files are not scanned; update the source glob to include the .vue extension
(e.g. change the pattern to include ,vue in the brace list like
.{js,jsx,ts,tsx,vue}) so Tailwind will scan Vue single-file components for
utility classes.

@birkskyum birkskyum merged commit 949c3f4 into main Dec 16, 2025
5 of 6 checks passed
@birkskyum birkskyum deleted the test(vue-router)-virtual-routes branch December 16, 2025 16:32
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx (1)

1-3: Missing import for createFileRoute.

This issue was already flagged in a previous review. The function createFileRoute is used on line 9 but is not imported, which will cause a runtime error.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e72bf03 and 9d27139.

📒 Files selected for processing (6)
  • e2e/vue-router/basic-virtual-file-based/src/main.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/main.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx (1 hunks)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/main.tsx
  • e2e/vue-router/basic-virtual-file-based/src/main.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx
  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx
  • e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript strict mode with extensive type safety for all code

Files:

  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Implement ESLint rules for router best practices using the ESLint plugin router

Files:

  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx
🧠 Learnings (4)
📓 Common learnings
Learnt from: nlynzaad
Repo: TanStack/router PR: 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.
📚 Learning: 2025-12-06T15:03:07.223Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-06T15:03:07.223Z
Learning: Applies to **/*.{js,ts,tsx} : Implement ESLint rules for router best practices using the ESLint plugin router

Applied to files:

  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 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/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx
📚 Learning: 2025-11-02T16:16:24.898Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5732
File: packages/start-client-core/src/client/hydrateStart.ts:6-9
Timestamp: 2025-11-02T16:16:24.898Z
Learning: In packages/start-client-core/src/client/hydrateStart.ts, the `import/no-duplicates` ESLint disable is necessary for imports from `#tanstack-router-entry` and `#tanstack-start-entry` because both aliases resolve to the same placeholder file (`fake-start-entry.js`) in package.json during static analysis, even though they resolve to different files at runtime.

Applied to files:

  • e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx
🔇 Additional comments (2)
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx (2)

5-7: LGTM!

The PostErrorComponent correctly forwards the error to the underlying ErrorComponent.


18-27: LGTM!

The PostComponent correctly consumes the loader data via Route.useLoaderData() and safely accesses nested properties using optional chaining.

Comment on lines +9 to +16
export const Route = createFileRoute({
loader: async ({ params: { postId } }) => fetchPost(postId),
errorComponent: PostErrorComponent as any,
notFoundComponent: () => {
return <p>Post not found</p>
},
component: PostComponent,
})
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Search for createFileRoute usage patterns in the repository
find . -type f \( -name "*.tsx" -o -name "*.ts" \) | head -20 | xargs grep -l "createFileRoute" | head -10

Repository: TanStack/router

Length of output: 178


🏁 Script executed:

# Read the files to see createFileRoute usage patterns
echo "=== about.tsx ===" && cat -n ./e2e/react-router/basepath-file-based/src/routes/about.tsx
echo ""
echo "=== index.tsx ===" && cat -n ./e2e/react-router/basepath-file-based/src/routes/index.tsx

Repository: TanStack/router

Length of output: 1365


🏁 Script executed:

# Check for vue-router examples with createFileRoute
find ./e2e/vue-router -type f \( -name "*.tsx" -o -name "*.ts" \) | xargs grep -l "createFileRoute" | head -5

Repository: TanStack/router

Length of output: 488


🏁 Script executed:

# Check one of the Vue router examples
cat -n "./e2e/vue-router/basic-file-based-jsx/src/routes/(another-group)/onlyrouteinside.tsx"

Repository: TanStack/router

Length of output: 1204


🏁 Script executed:

# Check the actual file under review
cat -n "./e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx"

Repository: TanStack/router

Length of output: 1010


🏁 Script executed:

# Check the directory structure to understand the route hierarchy and parameters
ls -la "./e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/"

Repository: TanStack/router

Length of output: 354


🏁 Script executed:

# Check the posts.tsx file to understand the parameter definition
cat -n "./e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx"

Repository: TanStack/router

Length of output: 1314


🏁 Script executed:

# Check the root directory structure of this e2e app to understand the setup
ls -la "./e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/"

Repository: TanStack/router

Length of output: 575


🏁 Script executed:

# Check for other examples with dynamic route segments to confirm naming pattern
rg -A 2 'createFileRoute\(' ./e2e/vue-router/ -m 3 --type tsx

Repository: TanStack/router

Length of output: 86


🏁 Script executed:

# Search for createFileRoute with dynamic route segments
rg -A 2 'createFileRoute\(' ./e2e/vue-router --type ts -A 2 | head -40

Repository: TanStack/router

Length of output: 3113


🏁 Script executed:

# Check the difference between basic-virtual-file-based and basic-file-based-jsx
ls -la ./e2e/vue-router/ | grep "file-based"

Repository: TanStack/router

Length of output: 442


🏁 Script executed:

# Compare the setup between basic-file-based-jsx and basic-virtual-named-export-config-file-based
echo "=== basic-file-based-jsx posts-detail ===" && cat -n "./e2e/vue-router/basic-file-based-jsx/src/routes/posts/posts-detail.tsx"

Repository: TanStack/router

Length of output: 221


🏁 Script executed:

# Check the directory structure of basic-file-based-jsx
ls -la "./e2e/vue-router/basic-file-based-jsx/src/routes/"

Repository: TanStack/router

Length of output: 1252


🏁 Script executed:

# Check the posts.$postId.tsx file to see how it uses createFileRoute
cat -n "./e2e/vue-router/basic-file-based-jsx/src/routes/posts.\$postId.tsx"

Repository: TanStack/router

Length of output: 981


🏁 Script executed:

# Check if there's a special config or setup for the basic-virtual-named-export-config-file-based variant
cat -n "./e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx"

Repository: TanStack/router

Length of output: 1314


🏁 Script executed:

# Check the root.tsx to understand the routing setup for this variant
cat -n "./e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/root.tsx"

Repository: TanStack/router

Length of output: 2162


Add the route path argument to createFileRoute call.

The createFileRoute API requires the route path as a string argument before the configuration object. Based on the directory structure and the postId parameter, add the path:

export const Route = createFileRoute('/posts/$postId')({
  loader: async ({ params: { postId } }) => fetchPost(postId),
  errorComponent: PostErrorComponent as any,
  notFoundComponent: () => {
    return <p>Post not found</p>
  },
  component: PostComponent,
})
🤖 Prompt for AI Agents
In
e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx
around lines 9 to 16, the createFileRoute call is missing the required route
path string argument; update the call to pass the path '/posts/$postId' before
the config object and adjust syntax to call
createFileRoute('/posts/$postId')({...}) so the loader, errorComponent,
notFoundComponent and component remain inside the config object.


export const Route = createFileRoute({
loader: async ({ params: { postId } }) => fetchPost(postId),
errorComponent: PostErrorComponent as any,
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Remove the as any type cast.

The as any cast defeats TypeScript's type safety guarantees and violates the coding guideline requiring strict TypeScript with extensive type safety.

Investigate why PostErrorComponent doesn't satisfy the expected type and address the root cause. If there's a genuine type mismatch with the Vue Router error component signature, consider:

  • Adjusting the component signature to match the expected type
  • Using a more specific type assertion if the types are compatible but TypeScript cannot infer it

As per coding guidelines, strict type safety should be maintained for all TypeScript files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants