-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
add nitro e2e suites #6274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
add nitro e2e suites #6274
Conversation
📝 WalkthroughWalkthroughFour complete e2e test projects added for TanStack Start with Nitro integration: React and Solid variants, each with SPA and SSR modes, including routing infrastructure, UI components, build configurations, tests, and styling. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx affected --targets=test:eslint,test:unit,tes... |
❌ Failed | 16m 22s | View ↗ |
nx run-many --target=build --exclude=examples/*... |
✅ Succeeded | 1m 53s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-01-02 13:58:29 UTC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
🧹 Nitpick comments (16)
e2e/react-start/basic-nitro/tests/setup/global.teardown.ts (1)
1-3: Add explicit return type annotation for TypeScript strict mode.The async function should have an explicit return type annotation for compliance with strict type safety.
🔎 Proposed fix
-export default async function teardown() { +export default async function teardown(): Promise<void> { // No additional teardown needed for Nitro }e2e/react-start/basic-nitro/.gitignore (1)
1-11: Add.nitropattern for consistency with parallel Nitro e2e projects.The
e2e/solid-start/basic-nitro-spa/.gitignoreincludes.nitro(line 7), but this file omits it. Since both are Nitro-based e2e setups, ensure consistency by adding the.nitropattern.🔎 Proposed fix
dist .output +.nitro /test-results/e2e/solid-start/basic-nitro/src/components/NotFound.tsx (1)
3-3: Improve type safety forchildrenprop.The
childrenprop is typed asany, which bypasses TypeScript's type checking. For SolidJS components, use a more specific type likeJSX.ElementorJSX.Element | undefined.🔎 Suggested type improvement
-export function NotFound({ children }: { children?: any }) { +export function NotFound({ children }: { children?: JSX.Element }) {If you need to support multiple types of children (strings, elements, etc.), you can use a union type:
-export function NotFound({ children }: { children?: any }) { +export function NotFound({ children }: { children?: JSX.Element | string }) {As per coding guidelines: Use TypeScript strict mode with extensive type safety for all code.
e2e/react-start/basic-nitro/package.json (1)
20-31: Useworkspace:*for internal dependencies per coding guidelines.The internal TanStack packages should use
workspace:*instead ofworkspace:^to align with project conventions.🔎 Proposed fix
"dependencies": { - "@tanstack/react-router": "workspace:^", - "@tanstack/react-router-devtools": "workspace:^", - "@tanstack/react-start": "workspace:^", + "@tanstack/react-router": "workspace:*", + "@tanstack/react-router-devtools": "workspace:*", + "@tanstack/react-start": "workspace:*", "react": "^19.0.0", "react-dom": "^19.0.0" }, "devDependencies": { "@playwright/test": "^1.50.1", "@tailwindcss/postcss": "^4.1.15", - "@tanstack/router-e2e-utils": "workspace:^", - "@tanstack/nitro-v2-vite-plugin": "workspace:^", + "@tanstack/router-e2e-utils": "workspace:*", + "@tanstack/nitro-v2-vite-plugin": "workspace:*",As per coding guidelines, use
workspace:*for internal dependencies.e2e/solid-start/basic-nitro-spa/src/styles/app.css (1)
3-30: Consider consolidating the two@layer baseblocks.Both blocks target
@layer base. While functionally correct, consolidating them improves readability. Also note that the border-color rule on lines 4-10 and the@apply border-gray-200on line 19 both target*- the latter will take precedence.🔎 Proposed consolidation
@import 'tailwindcss'; @layer base { *, ::after, ::before, ::backdrop, ::file-selector-button { border-color: var(--color-gray-200, currentcolor); } -} -@layer base { html { color-scheme: light dark; } * { @apply border-gray-200 dark:border-gray-800; } html, body { @apply text-gray-900 bg-gray-50 dark:bg-gray-950 dark:text-gray-200; } .using-mouse * { outline: none !important; } }e2e/solid-start/basic-nitro/src/styles/app.css (1)
3-30: Consider combining the duplicate@layer baseblocks.The file contains two separate
@layer basedeclarations. For better organization and maintainability, these should be combined into a single block.🔎 Proposed consolidation
@import 'tailwindcss'; @layer base { *, ::after, ::before, ::backdrop, ::file-selector-button { border-color: var(--color-gray-200, currentcolor); } -} - -@layer base { + html { color-scheme: light dark; } * { @apply border-gray-200 dark:border-gray-800; } html, body { @apply text-gray-900 bg-gray-50 dark:bg-gray-950 dark:text-gray-200; } .using-mouse * { outline: none !important; } }e2e/react-start/basic-nitro/src/router.tsx (1)
10-11: Inconsistent component passing pattern.
defaultErrorComponentpasses the component reference directly, whiledefaultNotFoundComponentwraps it in an arrow function. For consistency and clarity, both should use the same pattern.🔎 Suggested consistency fix
Option 1: Use direct references for both
defaultErrorComponent: DefaultCatchBoundary, - defaultNotFoundComponent: () => <NotFound />, + defaultNotFoundComponent: NotFound,Option 2: Wrap both in arrow functions
- defaultErrorComponent: DefaultCatchBoundary, + defaultErrorComponent: () => <DefaultCatchBoundary />, defaultNotFoundComponent: () => <NotFound />,Option 1 is preferred for simplicity unless there's a specific reason to use a wrapper function.
e2e/react-start/basic-nitro/tsconfig.json (1)
1-22: LGTM! Consider adding Vite types for consistency.The TypeScript configuration is properly set up with strict mode and appropriate React settings. All required compiler options are present.
For consistency with the Solid variant (e2e/solid-start/basic-nitro/tsconfig.json), consider adding the
typesfield to explicitly include Vite client types.🔎 Optional enhancement for consistency
"paths": { "~/*": ["./src/*"] }, - "noEmit": true + "noEmit": true, + "types": ["vite/client"] } }e2e/react-start/basic-nitro/src/components/DefaultCatchBoundary.tsx (1)
39-48: Use a button element instead of Link for the "Go Back" action.The current implementation uses a
Linkcomponent withto="/"but prevents default navigation and callswindow.history.back()instead. This creates semantic confusion and accessibility issues:
- Screen readers announce "link to home" but the action goes back in history
- The
to="/"attribute is never used- Violates semantic HTML best practices
A
<button>element is more appropriate for JavaScript-triggered actions that don't perform standard navigation.🔎 Proposed refactor
) : ( - <Link - to="/" + <button + onClick={() => { + window.history.back() + }} className={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold`} - onClick={(e) => { - e.preventDefault() - window.history.back() - }} > Go Back - </Link> + </button> )}e2e/solid-start/basic-nitro-spa/src/components/DefaultCatchBoundary.tsx (1)
39-48: Clarify "Go Back" navigation semantics.The "Go Back" link has
to="/"but prevents default and callswindow.history.back(). This creates a mismatch between the href (which points to home) and the actual behavior (which navigates back in history). Consider using a<button>element instead for better semantic clarity.🔎 Suggested refactor
- <Link - to="/" - class={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold`} - onClick={(e) => { - e.preventDefault() - window.history.back() - }} - > - Go Back - </Link> + <button + onClick={() => { + window.history.back() + }} + class={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold`} + > + Go Back + </button>e2e/react-start/basic-nitro/src/routes/__root.tsx (1)
61-64: Consider addinglangattribute to HTML element.While this is an e2e test fixture, adding
lang="en"to the<html>element is a best practice for accessibility and proper document semantics.🔎 Proposed enhancement
- <html> + <html lang="en"> <head> <HeadContent /> </head>e2e/solid-start/basic-nitro/tests/app.spec.ts (1)
12-25: Consider adding missing assertion for consistency.The React variant of this test (at
e2e/react-start/basic-nitro/tests/app.spec.ts:26) includes an additional assertion to verify the "Generated at:" timestamp is displayed on the page. Consider adding this for consistency:await expect(page.getByTestId('generated-at')).toContainText('Generated at:')e2e/solid-start/basic-nitro/src/utils/seo.ts (1)
1-33: LGTM! Consider filtering undefined values.The SEO utility function correctly generates meta tags and matches the established pattern in the codebase (see
examples/solid/start-basic-netlify/src/utils/seo.tsandexamples/solid/start-basic-nitro/src/utils/seo.ts).For a minor improvement, you could filter out tags with undefined content values to avoid rendering
content="undefined"in the HTML, though this is not critical for e2e test fixtures.🔎 Optional enhancement to filter undefined values
const tags = [ { title }, { name: 'description', content: description }, { name: 'keywords', content: keywords }, { name: 'twitter:title', content: title }, { name: 'twitter:description', content: description }, { name: 'twitter:creator', content: '@tannerlinsley' }, { name: 'twitter:site', content: '@tannerlinsley' }, { name: 'og:type', content: 'website' }, { name: 'og:title', content: title }, { name: 'og:description', content: description }, ...(image ? [ { name: 'twitter:image', content: image }, { name: 'twitter:card', content: 'summary_large_image' }, { name: 'og:image', content: image }, ] : []), - ] + ].filter(tag => 'content' in tag ? tag.content !== undefined : true) return tags }e2e/solid-start/basic-nitro-spa/tests/app.spec.ts (1)
21-30: Consider using modern Playwright locator API.Lines 25 and 28 use
page.click(), which is deprecated in favor of the locator API. Consider updating topage.locator()orpage.getByRole()for better maintainability.🔎 Suggested modernization
- await page.click('a[href="/static"]') + await page.locator('a[href="/static"]').click() await expect(page.getByTestId('static-heading')).toBeVisible() - await page.click('a[href="/"]') + await page.locator('a[href="/"]').click() await expect(page.getByTestId('home-heading')).toBeVisible()e2e/solid-start/basic-nitro-spa/package.json (2)
20-24: Internal dependencies useworkspace:^instead ofworkspace:*.The coding guidelines specify using
workspace:*for internal dependencies. Currently, these useworkspace:^. While both are valid workspace protocols, you may want to align with the repository's convention.Suggested change
"dependencies": { - "@tanstack/solid-router": "workspace:^", - "@tanstack/solid-router-devtools": "workspace:^", - "@tanstack/solid-start": "workspace:^", + "@tanstack/solid-router": "workspace:*", + "@tanstack/solid-router-devtools": "workspace:*", + "@tanstack/solid-start": "workspace:*", "solid-js": "^1.9.10" },
26-39: DevDependencies: Internal packages useworkspace:^andnitrouses unpinned nightly.Two observations:
Internal dev dependencies (
@tanstack/router-e2e-utils,@tanstack/nitro-v2-vite-plugin) useworkspace:^rather thanworkspace:*per coding guidelines.The
nitrodependency usesnpm:nitro-nightly@latest, which could cause non-reproducible builds if nightly versions introduce breaking changes.Suggested change for workspace protocol
"devDependencies": { "@playwright/test": "^1.50.1", "@tailwindcss/postcss": "^4.1.15", - "@tanstack/router-e2e-utils": "workspace:^", - "@tanstack/nitro-v2-vite-plugin": "workspace:^", + "@tanstack/router-e2e-utils": "workspace:*", + "@tanstack/nitro-v2-vite-plugin": "workspace:*",
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (29)
e2e/react-start/basic-nitro-spa/public/android-chrome-192x192.pngis excluded by!**/*.pnge2e/react-start/basic-nitro-spa/public/android-chrome-512x512.pngis excluded by!**/*.pnge2e/react-start/basic-nitro-spa/public/apple-touch-icon.pngis excluded by!**/*.pnge2e/react-start/basic-nitro-spa/public/favicon-16x16.pngis excluded by!**/*.pnge2e/react-start/basic-nitro-spa/public/favicon-32x32.pngis excluded by!**/*.pnge2e/react-start/basic-nitro-spa/public/favicon.icois excluded by!**/*.icoe2e/react-start/basic-nitro-spa/public/favicon.pngis excluded by!**/*.pnge2e/react-start/basic-nitro/public/android-chrome-192x192.pngis excluded by!**/*.pnge2e/react-start/basic-nitro/public/android-chrome-512x512.pngis excluded by!**/*.pnge2e/react-start/basic-nitro/public/apple-touch-icon.pngis excluded by!**/*.pnge2e/react-start/basic-nitro/public/favicon-16x16.pngis excluded by!**/*.pnge2e/react-start/basic-nitro/public/favicon-32x32.pngis excluded by!**/*.pnge2e/react-start/basic-nitro/public/favicon.icois excluded by!**/*.icoe2e/react-start/basic-nitro/public/favicon.pngis excluded by!**/*.pnge2e/solid-start/basic-nitro-spa/public/android-chrome-192x192.pngis excluded by!**/*.pnge2e/solid-start/basic-nitro-spa/public/android-chrome-512x512.pngis excluded by!**/*.pnge2e/solid-start/basic-nitro-spa/public/apple-touch-icon.pngis excluded by!**/*.pnge2e/solid-start/basic-nitro-spa/public/favicon-16x16.pngis excluded by!**/*.pnge2e/solid-start/basic-nitro-spa/public/favicon-32x32.pngis excluded by!**/*.pnge2e/solid-start/basic-nitro-spa/public/favicon.icois excluded by!**/*.icoe2e/solid-start/basic-nitro-spa/public/favicon.pngis excluded by!**/*.pnge2e/solid-start/basic-nitro/public/android-chrome-192x192.pngis excluded by!**/*.pnge2e/solid-start/basic-nitro/public/android-chrome-512x512.pngis excluded by!**/*.pnge2e/solid-start/basic-nitro/public/apple-touch-icon.pngis excluded by!**/*.pnge2e/solid-start/basic-nitro/public/favicon-16x16.pngis excluded by!**/*.pnge2e/solid-start/basic-nitro/public/favicon-32x32.pngis excluded by!**/*.pnge2e/solid-start/basic-nitro/public/favicon.icois excluded by!**/*.icoe2e/solid-start/basic-nitro/public/favicon.pngis excluded by!**/*.pngpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (76)
e2e/react-start/basic-nitro-spa/.gitignoree2e/react-start/basic-nitro-spa/package.jsone2e/react-start/basic-nitro-spa/playwright.config.tse2e/react-start/basic-nitro-spa/postcss.config.mjse2e/react-start/basic-nitro-spa/public/site.webmanifeste2e/react-start/basic-nitro-spa/src/components/DefaultCatchBoundary.tsxe2e/react-start/basic-nitro-spa/src/components/NotFound.tsxe2e/react-start/basic-nitro-spa/src/routeTree.gen.tse2e/react-start/basic-nitro-spa/src/router.tsxe2e/react-start/basic-nitro-spa/src/routes/__root.tsxe2e/react-start/basic-nitro-spa/src/routes/index.tsxe2e/react-start/basic-nitro-spa/src/routes/static.tsxe2e/react-start/basic-nitro-spa/src/styles/app.csse2e/react-start/basic-nitro-spa/src/utils/seo.tse2e/react-start/basic-nitro-spa/tests/app.spec.tse2e/react-start/basic-nitro-spa/tsconfig.jsone2e/react-start/basic-nitro-spa/vite.config.v2.tse2e/react-start/basic-nitro-spa/vite.config.v3.tse2e/react-start/basic-nitro/.gitignoree2e/react-start/basic-nitro/.prettierignoree2e/react-start/basic-nitro/package.jsone2e/react-start/basic-nitro/playwright.config.tse2e/react-start/basic-nitro/postcss.config.mjse2e/react-start/basic-nitro/public/site.webmanifeste2e/react-start/basic-nitro/src/components/DefaultCatchBoundary.tsxe2e/react-start/basic-nitro/src/components/NotFound.tsxe2e/react-start/basic-nitro/src/routeTree.gen.tse2e/react-start/basic-nitro/src/router.tsxe2e/react-start/basic-nitro/src/routes/__root.tsxe2e/react-start/basic-nitro/src/routes/index.tsxe2e/react-start/basic-nitro/src/routes/static.tsxe2e/react-start/basic-nitro/src/styles/app.csse2e/react-start/basic-nitro/src/utils/seo.tse2e/react-start/basic-nitro/tests/app.spec.tse2e/react-start/basic-nitro/tests/setup/global.setup.tse2e/react-start/basic-nitro/tests/setup/global.teardown.tse2e/react-start/basic-nitro/tsconfig.jsone2e/react-start/basic-nitro/vite.config.v2.tse2e/react-start/basic-nitro/vite.config.v3.tse2e/solid-start/basic-nitro-spa/.gitignoree2e/solid-start/basic-nitro-spa/package.jsone2e/solid-start/basic-nitro-spa/playwright.config.tse2e/solid-start/basic-nitro-spa/postcss.config.mjse2e/solid-start/basic-nitro-spa/public/site.webmanifeste2e/solid-start/basic-nitro-spa/src/components/DefaultCatchBoundary.tsxe2e/solid-start/basic-nitro-spa/src/components/NotFound.tsxe2e/solid-start/basic-nitro-spa/src/routeTree.gen.tse2e/solid-start/basic-nitro-spa/src/router.tsxe2e/solid-start/basic-nitro-spa/src/routes/__root.tsxe2e/solid-start/basic-nitro-spa/src/routes/index.tsxe2e/solid-start/basic-nitro-spa/src/routes/static.tsxe2e/solid-start/basic-nitro-spa/src/styles/app.csse2e/solid-start/basic-nitro-spa/src/utils/seo.tse2e/solid-start/basic-nitro-spa/tests/app.spec.tse2e/solid-start/basic-nitro-spa/tsconfig.jsone2e/solid-start/basic-nitro-spa/vite.config.v2.tse2e/solid-start/basic-nitro-spa/vite.config.v3.tse2e/solid-start/basic-nitro/.gitignoree2e/solid-start/basic-nitro/.prettierignoree2e/solid-start/basic-nitro/package.jsone2e/solid-start/basic-nitro/playwright.config.tse2e/solid-start/basic-nitro/postcss.config.mjse2e/solid-start/basic-nitro/public/site.webmanifeste2e/solid-start/basic-nitro/src/components/DefaultCatchBoundary.tsxe2e/solid-start/basic-nitro/src/components/NotFound.tsxe2e/solid-start/basic-nitro/src/routeTree.gen.tse2e/solid-start/basic-nitro/src/router.tsxe2e/solid-start/basic-nitro/src/routes/__root.tsxe2e/solid-start/basic-nitro/src/routes/index.tsxe2e/solid-start/basic-nitro/src/routes/static.tsxe2e/solid-start/basic-nitro/src/styles/app.csse2e/solid-start/basic-nitro/src/utils/seo.tse2e/solid-start/basic-nitro/tests/app.spec.tse2e/solid-start/basic-nitro/tsconfig.jsone2e/solid-start/basic-nitro/vite.config.v2.tse2e/solid-start/basic-nitro/vite.config.v3.ts
🧰 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/react-start/basic-nitro/tests/setup/global.teardown.tse2e/react-start/basic-nitro/tests/setup/global.setup.tse2e/solid-start/basic-nitro-spa/src/components/NotFound.tsxe2e/react-start/basic-nitro-spa/src/router.tsxe2e/react-start/basic-nitro/src/routes/index.tsxe2e/solid-start/basic-nitro-spa/src/utils/seo.tse2e/react-start/basic-nitro-spa/vite.config.v2.tse2e/solid-start/basic-nitro/src/components/DefaultCatchBoundary.tsxe2e/react-start/basic-nitro-spa/src/routes/static.tsxe2e/react-start/basic-nitro-spa/src/routes/index.tsxe2e/react-start/basic-nitro/src/utils/seo.tse2e/solid-start/basic-nitro/src/router.tsxe2e/solid-start/basic-nitro/src/utils/seo.tse2e/solid-start/basic-nitro/src/routes/__root.tsxe2e/react-start/basic-nitro/src/components/NotFound.tsxe2e/react-start/basic-nitro/src/components/DefaultCatchBoundary.tsxe2e/react-start/basic-nitro-spa/vite.config.v3.tse2e/react-start/basic-nitro/src/router.tsxe2e/solid-start/basic-nitro-spa/vite.config.v3.tse2e/solid-start/basic-nitro/playwright.config.tse2e/react-start/basic-nitro/src/routes/__root.tsxe2e/react-start/basic-nitro-spa/src/components/DefaultCatchBoundary.tsxe2e/react-start/basic-nitro-spa/src/routeTree.gen.tse2e/react-start/basic-nitro-spa/src/routes/__root.tsxe2e/solid-start/basic-nitro/tests/app.spec.tse2e/solid-start/basic-nitro-spa/src/routes/index.tsxe2e/react-start/basic-nitro/playwright.config.tse2e/solid-start/basic-nitro-spa/src/routeTree.gen.tse2e/solid-start/basic-nitro-spa/playwright.config.tse2e/solid-start/basic-nitro-spa/src/components/DefaultCatchBoundary.tsxe2e/solid-start/basic-nitro/vite.config.v2.tse2e/solid-start/basic-nitro-spa/src/routes/static.tsxe2e/react-start/basic-nitro-spa/src/components/NotFound.tsxe2e/react-start/basic-nitro-spa/playwright.config.tse2e/react-start/basic-nitro/vite.config.v3.tse2e/react-start/basic-nitro/tests/app.spec.tse2e/solid-start/basic-nitro-spa/src/router.tsxe2e/solid-start/basic-nitro/src/routes/index.tsxe2e/react-start/basic-nitro-spa/tests/app.spec.tse2e/react-start/basic-nitro-spa/src/utils/seo.tse2e/solid-start/basic-nitro/src/components/NotFound.tsxe2e/react-start/basic-nitro/src/routes/static.tsxe2e/solid-start/basic-nitro-spa/vite.config.v2.tse2e/solid-start/basic-nitro-spa/src/routes/__root.tsxe2e/solid-start/basic-nitro/src/routes/static.tsxe2e/solid-start/basic-nitro/src/routeTree.gen.tse2e/solid-start/basic-nitro/vite.config.v3.tse2e/react-start/basic-nitro/vite.config.v2.tse2e/react-start/basic-nitro/src/routeTree.gen.tse2e/solid-start/basic-nitro-spa/tests/app.spec.ts
**/*.{js,ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Implement ESLint rules for router best practices using the ESLint plugin router
Files:
e2e/react-start/basic-nitro/tests/setup/global.teardown.tse2e/react-start/basic-nitro/tests/setup/global.setup.tse2e/solid-start/basic-nitro-spa/src/components/NotFound.tsxe2e/react-start/basic-nitro-spa/src/router.tsxe2e/react-start/basic-nitro/src/routes/index.tsxe2e/solid-start/basic-nitro-spa/src/utils/seo.tse2e/react-start/basic-nitro-spa/vite.config.v2.tse2e/solid-start/basic-nitro/src/components/DefaultCatchBoundary.tsxe2e/react-start/basic-nitro-spa/src/routes/static.tsxe2e/react-start/basic-nitro-spa/src/routes/index.tsxe2e/react-start/basic-nitro/src/utils/seo.tse2e/solid-start/basic-nitro/src/router.tsxe2e/solid-start/basic-nitro/src/utils/seo.tse2e/solid-start/basic-nitro/src/routes/__root.tsxe2e/react-start/basic-nitro/src/components/NotFound.tsxe2e/react-start/basic-nitro/src/components/DefaultCatchBoundary.tsxe2e/react-start/basic-nitro-spa/vite.config.v3.tse2e/react-start/basic-nitro/src/router.tsxe2e/solid-start/basic-nitro-spa/vite.config.v3.tse2e/solid-start/basic-nitro/playwright.config.tse2e/react-start/basic-nitro/src/routes/__root.tsxe2e/react-start/basic-nitro-spa/src/components/DefaultCatchBoundary.tsxe2e/react-start/basic-nitro-spa/src/routeTree.gen.tse2e/react-start/basic-nitro-spa/src/routes/__root.tsxe2e/solid-start/basic-nitro/tests/app.spec.tse2e/solid-start/basic-nitro-spa/src/routes/index.tsxe2e/react-start/basic-nitro/playwright.config.tse2e/solid-start/basic-nitro-spa/src/routeTree.gen.tse2e/solid-start/basic-nitro-spa/playwright.config.tse2e/solid-start/basic-nitro-spa/src/components/DefaultCatchBoundary.tsxe2e/solid-start/basic-nitro/vite.config.v2.tse2e/solid-start/basic-nitro-spa/src/routes/static.tsxe2e/react-start/basic-nitro-spa/src/components/NotFound.tsxe2e/react-start/basic-nitro-spa/playwright.config.tse2e/react-start/basic-nitro/vite.config.v3.tse2e/react-start/basic-nitro/tests/app.spec.tse2e/solid-start/basic-nitro-spa/src/router.tsxe2e/solid-start/basic-nitro/src/routes/index.tsxe2e/react-start/basic-nitro-spa/tests/app.spec.tse2e/react-start/basic-nitro-spa/src/utils/seo.tse2e/solid-start/basic-nitro/src/components/NotFound.tsxe2e/react-start/basic-nitro/src/routes/static.tsxe2e/solid-start/basic-nitro-spa/vite.config.v2.tse2e/solid-start/basic-nitro-spa/src/routes/__root.tsxe2e/solid-start/basic-nitro/src/routes/static.tsxe2e/solid-start/basic-nitro/src/routeTree.gen.tse2e/solid-start/basic-nitro/vite.config.v3.tse2e/react-start/basic-nitro/vite.config.v2.tse2e/react-start/basic-nitro/src/routeTree.gen.tse2e/solid-start/basic-nitro-spa/tests/app.spec.ts
**/package.json
📄 CodeRabbit inference engine (AGENTS.md)
Use workspace protocol
workspace:*for internal dependencies in package.json files
Files:
e2e/react-start/basic-nitro-spa/package.jsone2e/solid-start/basic-nitro/package.jsone2e/solid-start/basic-nitro-spa/package.jsone2e/react-start/basic-nitro/package.json
🧠 Learnings (15)
📓 Common learnings
Learnt from: nlynzaad
Repo: TanStack/router PR: 6215
File: e2e/react-start/custom-basepath/package.json:13-17
Timestamp: 2025-12-25T13:04:55.492Z
Learning: In the TanStack Router repository, e2e test scripts are specifically designed to run in CI (which uses a Unix environment), so Unix-specific commands (like `rm -rf`, `&` for backgrounding, and direct environment variable assignments without `cross-env`) are acceptable in e2e test npm scripts.
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.
📚 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/solid-start/basic-nitro/.prettierignoree2e/react-start/basic-nitro/.prettierignoree2e/react-start/basic-nitro/src/routes/index.tsxe2e/solid-start/basic-nitro/src/router.tsxe2e/react-start/basic-nitro/src/routes/__root.tsxe2e/react-start/basic-nitro-spa/src/routeTree.gen.tse2e/solid-start/basic-nitro-spa/src/routeTree.gen.tse2e/solid-start/basic-nitro-spa/src/routes/static.tsxe2e/solid-start/basic-nitro/src/routeTree.gen.tse2e/react-start/basic-nitro/src/routeTree.gen.ts
📚 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/solid-start/basic-nitro/.prettierignoree2e/react-start/basic-nitro/.prettierignoree2e/react-start/basic-nitro-spa/src/router.tsxe2e/react-start/basic-nitro/src/routes/index.tsxe2e/react-start/basic-nitro-spa/src/routes/static.tsxe2e/solid-start/basic-nitro/src/router.tsxe2e/solid-start/basic-nitro/src/routes/__root.tsxe2e/react-start/basic-nitro-spa/src/routeTree.gen.tse2e/solid-start/basic-nitro/tests/app.spec.tse2e/solid-start/basic-nitro-spa/src/routes/index.tsxe2e/solid-start/basic-nitro-spa/src/routeTree.gen.tse2e/solid-start/basic-nitro-spa/src/routes/static.tsxe2e/react-start/basic-nitro/tests/app.spec.tse2e/solid-start/basic-nitro-spa/src/router.tsxe2e/react-start/basic-nitro-spa/tests/app.spec.tse2e/solid-start/basic-nitro-spa/src/routes/__root.tsxe2e/solid-start/basic-nitro/src/routeTree.gen.tse2e/react-start/basic-nitro/src/routeTree.gen.tse2e/solid-start/basic-nitro-spa/tests/app.spec.ts
📚 Learning: 2025-12-17T02:17:55.086Z
Learnt from: schiller-manuel
Repo: TanStack/router PR: 6120
File: packages/router-generator/src/generator.ts:654-657
Timestamp: 2025-12-17T02:17:55.086Z
Learning: In `packages/router-generator/src/generator.ts`, pathless_layout routes must receive a `path` property when they have a `cleanedPath`, even though they are non-path routes. This is necessary because child routes inherit the path from their parent, and without this property, child routes would not have the correct full path at runtime.
Applied to files:
e2e/solid-start/basic-nitro/.prettierignoree2e/react-start/basic-nitro/.prettierignoree2e/react-start/basic-nitro-spa/src/router.tsxe2e/react-start/basic-nitro/src/routes/index.tsxe2e/solid-start/basic-nitro/src/router.tsxe2e/solid-start/basic-nitro/src/routes/__root.tsxe2e/react-start/basic-nitro/src/routes/__root.tsxe2e/react-start/basic-nitro-spa/src/routeTree.gen.tse2e/react-start/basic-nitro-spa/src/routes/__root.tsxe2e/solid-start/basic-nitro-spa/src/routes/index.tsxe2e/solid-start/basic-nitro-spa/src/routeTree.gen.tse2e/solid-start/basic-nitro/src/routes/index.tsxe2e/solid-start/basic-nitro-spa/src/routes/__root.tsxe2e/solid-start/basic-nitro/src/routeTree.gen.tse2e/react-start/basic-nitro/src/routeTree.gen.ts
📚 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/react-start/basic-nitro/.prettierignoree2e/react-start/basic-nitro/src/routes/index.tsxe2e/react-start/basic-nitro-spa/package.jsone2e/solid-start/basic-nitro/src/router.tsxe2e/solid-start/basic-nitro/package.jsone2e/react-start/basic-nitro-spa/src/routeTree.gen.tse2e/solid-start/basic-nitro-spa/src/routeTree.gen.tse2e/solid-start/basic-nitro-spa/package.jsone2e/solid-start/basic-nitro-spa/tsconfig.jsone2e/react-start/basic-nitro/tsconfig.jsone2e/react-start/basic-nitro/package.jsone2e/solid-start/basic-nitro/tsconfig.jsone2e/solid-start/basic-nitro/src/routeTree.gen.tse2e/react-start/basic-nitro/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/react-start/basic-nitro/.prettierignoree2e/react-start/basic-nitro-spa/src/router.tsxe2e/react-start/basic-nitro/src/routes/index.tsxe2e/solid-start/basic-nitro/src/router.tsxe2e/solid-start/basic-nitro/src/routes/__root.tsxe2e/react-start/basic-nitro/src/router.tsxe2e/react-start/basic-nitro/src/routes/__root.tsxe2e/react-start/basic-nitro-spa/src/routeTree.gen.tse2e/react-start/basic-nitro-spa/src/routes/__root.tsxe2e/solid-start/basic-nitro-spa/src/routes/index.tsxe2e/solid-start/basic-nitro-spa/src/routeTree.gen.tse2e/react-start/basic-nitro/tsconfig.jsone2e/solid-start/basic-nitro-spa/src/router.tsxe2e/react-start/basic-nitro-spa/tsconfig.jsone2e/solid-start/basic-nitro-spa/src/routes/__root.tsxe2e/solid-start/basic-nitro/src/routeTree.gen.tse2e/react-start/basic-nitro/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/react-start/basic-nitro/src/routes/index.tsxe2e/react-start/basic-nitro-spa/src/routes/index.tsxe2e/react-start/basic-nitro-spa/src/routeTree.gen.tse2e/solid-start/basic-nitro-spa/src/routes/index.tsxe2e/solid-start/basic-nitro-spa/src/routeTree.gen.tse2e/solid-start/basic-nitro-spa/src/routes/static.tsxe2e/solid-start/basic-nitro/src/routes/index.tsxe2e/solid-start/basic-nitro/src/routes/static.tsxe2e/solid-start/basic-nitro/src/routeTree.gen.tse2e/react-start/basic-nitro/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 **/package.json : Use workspace protocol `workspace:*` for internal dependencies in package.json files
Applied to files:
e2e/react-start/basic-nitro-spa/package.jsone2e/solid-start/basic-nitro-spa/package.json
📚 Learning: 2025-12-25T13:04:55.492Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 6215
File: e2e/react-start/custom-basepath/package.json:13-17
Timestamp: 2025-12-25T13:04:55.492Z
Learning: In the TanStack Router repository, e2e test scripts are specifically designed to run in CI (which uses a Unix environment), so Unix-specific commands (like `rm -rf`, `&` for backgrounding, and direct environment variable assignments without `cross-env`) are acceptable in e2e test npm scripts.
Applied to files:
e2e/react-start/basic-nitro-spa/package.jsone2e/solid-start/basic-nitro/package.jsone2e/solid-start/basic-nitro/playwright.config.tse2e/solid-start/basic-nitro/tests/app.spec.tse2e/react-start/basic-nitro/playwright.config.tse2e/solid-start/basic-nitro-spa/playwright.config.tse2e/solid-start/basic-nitro-spa/package.jsone2e/react-start/basic-nitro/package.jsone2e/react-start/basic-nitro-spa/playwright.config.tse2e/react-start/basic-nitro/tests/app.spec.tse2e/react-start/basic-nitro-spa/tests/app.spec.tse2e/solid-start/basic-nitro-spa/tests/app.spec.ts
📚 Learning: 2025-12-21T12:52:35.231Z
Learnt from: Sheraff
Repo: TanStack/router PR: 6171
File: packages/router-core/src/new-process-route-tree.ts:898-898
Timestamp: 2025-12-21T12:52:35.231Z
Learning: In `packages/router-core/src/new-process-route-tree.ts`, the matching logic intentionally allows paths without trailing slashes to match index routes with trailing slashes (e.g., `/a` can match `/a/` route), but not vice-versa (e.g., `/a/` cannot match `/a` layout route). This is implemented via the condition `!pathIsIndex || node.kind === SEGMENT_TYPE_INDEX` and is a deliberate design decision to provide better UX by being permissive with missing trailing slashes.
Applied to files:
e2e/solid-start/basic-nitro/src/routes/__root.tsxe2e/react-start/basic-nitro-spa/src/routeTree.gen.tse2e/react-start/basic-nitro-spa/src/routes/__root.tsxe2e/solid-start/basic-nitro-spa/src/routes/index.tsxe2e/solid-start/basic-nitro-spa/src/routeTree.gen.tse2e/solid-start/basic-nitro/src/routeTree.gen.tse2e/react-start/basic-nitro/src/routeTree.gen.ts
📚 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/solid-start/basic-nitro/playwright.config.tse2e/react-start/basic-nitro/playwright.config.tse2e/solid-start/basic-nitro-spa/playwright.config.tse2e/react-start/basic-nitro-spa/playwright.config.tse2e/react-start/basic-nitro/tests/app.spec.tse2e/solid-start/basic-nitro/public/site.webmanifeste2e/react-start/basic-nitro-spa/tests/app.spec.tse2e/react-start/basic-nitro-spa/public/site.webmanifeste2e/react-start/basic-nitro/public/site.webmanifeste2e/solid-start/basic-nitro-spa/public/site.webmanifeste2e/solid-start/basic-nitro-spa/tests/app.spec.ts
📚 Learning: 2025-10-14T18:59:33.990Z
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.
Applied to files:
e2e/react-start/basic-nitro-spa/src/routes/__root.tsx
📚 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: Add or update tests for any code changes
Applied to files:
e2e/solid-start/basic-nitro/tests/app.spec.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/solid-start/basic-nitro/tests/app.spec.tse2e/react-start/basic-nitro/tests/app.spec.tse2e/solid-start/basic-nitro-spa/tests/app.spec.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 **/*.{ts,tsx} : Use TypeScript strict mode with extensive type safety for all code
Applied to files:
e2e/solid-start/basic-nitro-spa/tsconfig.jsone2e/react-start/basic-nitro/tsconfig.jsone2e/react-start/basic-nitro-spa/tsconfig.jsone2e/solid-start/basic-nitro/tsconfig.json
🧬 Code graph analysis (12)
e2e/solid-start/basic-nitro-spa/src/components/NotFound.tsx (1)
e2e/solid-start/server-routes/src/components/NotFound.tsx (1)
NotFound(3-25)
e2e/solid-start/basic-nitro-spa/src/utils/seo.ts (1)
scripts/llms-generate.mjs (1)
title(101-101)
e2e/react-start/basic-nitro-spa/vite.config.v2.ts (1)
packages/nitro-v2-vite-plugin/src/index.ts (1)
nitroV2Plugin(19-142)
e2e/solid-start/basic-nitro/src/router.tsx (1)
examples/solid/start-basic/src/router.tsx (1)
createRouter(6-16)
e2e/solid-start/basic-nitro/src/utils/seo.ts (2)
examples/solid/start-basic-netlify/src/utils/seo.ts (1)
title(1-33)examples/solid/start-basic-nitro/src/utils/seo.ts (1)
title(1-33)
e2e/react-start/basic-nitro-spa/src/components/DefaultCatchBoundary.tsx (5)
packages/router-core/src/router.ts (1)
state(1099-1101)e2e/react-start/server-routes/src/components/DefaultCatchBoundary.tsx (1)
DefaultCatchBoundary(10-53)e2e/vue-start/website/src/components/DefaultCatchBoundary.tsx (2)
DefaultCatchBoundary(10-53)e(42-45)e2e/vue-start/server-routes/src/components/DefaultCatchBoundary.tsx (1)
DefaultCatchBoundary(10-53)e2e/solid-start/server-routes/src/components/DefaultCatchBoundary.tsx (1)
DefaultCatchBoundary(10-53)
e2e/react-start/basic-nitro-spa/src/components/NotFound.tsx (1)
e2e/react-start/basic-cloudflare/src/components/NotFound.tsx (1)
NotFound(3-25)
e2e/solid-start/basic-nitro-spa/src/router.tsx (1)
examples/solid/start-basic/src/router.tsx (1)
createRouter(6-16)
e2e/solid-start/basic-nitro/src/routes/index.tsx (2)
examples/solid/kitchen-sink/src/useMutation.tsx (1)
data(47-49)packages/router-core/src/ssr/tsrScript.ts (1)
p(16-18)
e2e/react-start/basic-nitro-spa/src/utils/seo.ts (2)
examples/solid/start-basic-netlify/src/utils/seo.ts (1)
title(1-33)examples/solid/start-basic/src/utils/seo.ts (1)
title(1-33)
e2e/solid-start/basic-nitro-spa/vite.config.v2.ts (1)
packages/nitro-v2-vite-plugin/src/index.ts (1)
nitroV2Plugin(19-142)
e2e/react-start/basic-nitro/vite.config.v2.ts (1)
packages/nitro-v2-vite-plugin/src/index.ts (1)
nitroV2Plugin(19-142)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Test
- GitHub Check: Preview
| @@ -0,0 +1,25 @@ | |||
| import { Link } from '@tanstack/react-router' | |||
|
|
|||
| export function NotFound({ children }: { children?: any }) { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Replace any type with React.ReactNode for strict type safety.
The children parameter uses any, which violates TypeScript strict mode guidelines. Use React.ReactNode for proper type safety.
As per coding guidelines, TypeScript strict mode with extensive type safety should be used for all TypeScript files.
🔎 Proposed fix
-export function NotFound({ children }: { children?: any }) {
+export function NotFound({ children }: { children?: React.ReactNode }) {📝 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.
| export function NotFound({ children }: { children?: any }) { | |
| export function NotFound({ children }: { children?: React.ReactNode }) { |
🤖 Prompt for AI Agents
In e2e/react-start/basic-nitro-spa/src/components/NotFound.tsx around line 3,
the NotFound component types children as any; replace that with React.ReactNode
(or import type { ReactNode } from 'react' and use ReactNode) to satisfy
TypeScript strict mode. Update the function signature to use the React node type
and if there is no existing React import add a type-only import from 'react'
(import type { ReactNode } from 'react') or import React, so the type resolves.
| "@types/node": "^22.10.2", | ||
| "@types/react": "^19.0.8", | ||
| "@types/react-dom": "^19.0.3", | ||
| "nitro": "npm:nitro-nightly@latest", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# First, let's check the actual file and its contents
cat -n e2e/react-start/basic-nitro/package.jsonRepository: TanStack/router
Length of output: 1984
🏁 Script executed:
#!/bin/bash
# Check if nitro-nightly exists as a local package in the workspace
find . -type f -name "package.json" | xargs grep -l "nitro-nightly" | head -20Repository: TanStack/router
Length of output: 286
🏁 Script executed:
#!/bin/bash
# Understand the repository structure - look for workspace configuration
cat -n package.json 2>/dev/null | head -50 || echo "Root package.json not found or is large"Repository: TanStack/router
Length of output: 2574
🏁 Script executed:
#!/bin/bash
# Check how nitro-nightly is used in other package.json files
grep -r "nitro-nightly" --include="package.json" e2e/ examples/ | head -20Repository: TanStack/router
Length of output: 481
Pin nitro-nightly to a specific version to avoid flaky e2e tests.
Using @latest for nightly releases means builds break unexpectedly when releases introduce breaking changes. Nightly packages update frequently—pin to a specific version for stable e2e tests.
🤖 Prompt for AI Agents
In e2e/react-start/basic-nitro/package.json around line 35, the dependency
"nitro": "npm:nitro-nightly@latest" should be pinned to a specific nightly
version to avoid flaky e2e tests; replace the @latest tag with an exact version
string (for example "npm:nitro-nightly@<exact-version>") in package.json, then
regenerate the lockfile (npm install or npm ci) so the locked dependency is
recorded for reproducible CI runs.
| @@ -0,0 +1,25 @@ | |||
| import { Link } from '@tanstack/react-router' | |||
|
|
|||
| export function NotFound({ children }: { children?: any }) { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Use strict TypeScript typing for the children prop.
The children prop is typed as any, which violates TypeScript strict mode guidelines. Use React.ReactNode for proper type safety.
🔎 Proposed fix
-export function NotFound({ children }: { children?: any }) {
+export function NotFound({ children }: { children?: React.ReactNode }) {As per coding guidelines, TypeScript strict mode with extensive type safety should be used for all code.
📝 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.
| export function NotFound({ children }: { children?: any }) { | |
| export function NotFound({ children }: { children?: React.ReactNode }) { |
🤖 Prompt for AI Agents
In e2e/react-start/basic-nitro/src/components/NotFound.tsx around line 3, the
NotFound component types its children as any; replace that with the stricter
React.ReactNode type by importing React (if not already) and updating the prop
signature to children?: React.ReactNode to satisfy TypeScript strict mode and
proper React typing.
| sizes: '16x16', | ||
| href: '/favicon-16x16.png', | ||
| }, | ||
| { rel: 'manifest', href: '/site.webmanifest', color: '#fffff' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix invalid hex color value.
The color value '#fffff' is invalid (5 characters). Hex colors should be either 3 or 6 characters. This should likely be '#ffffff' (white).
🔎 Proposed fix
- { rel: 'manifest', href: '/site.webmanifest', color: '#fffff' },
+ { rel: 'manifest', href: '/site.webmanifest', color: '#ffffff' },📝 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.
| { rel: 'manifest', href: '/site.webmanifest', color: '#fffff' }, | |
| { rel: 'manifest', href: '/site.webmanifest', color: '#ffffff' }, |
🤖 Prompt for AI Agents
In e2e/react-start/basic-nitro/src/routes/__root.tsx around line 50, the
manifest link object uses an invalid 5-digit hex color '#fffff'; update it to a
valid hex color such as '#ffffff' (or the 3-digit '#fff') to correct the value.
| const tags = [ | ||
| { title }, | ||
| { name: 'description', content: description }, | ||
| { name: 'keywords', content: keywords }, | ||
| { name: 'twitter:title', content: title }, | ||
| { name: 'twitter:description', content: description }, | ||
| { name: 'twitter:creator', content: '@tannerlinsley' }, | ||
| { name: 'twitter:site', content: '@tannerlinsley' }, | ||
| { name: 'og:type', content: 'website' }, | ||
| { name: 'og:title', content: title }, | ||
| { name: 'og:description', content: description }, | ||
| ...(image | ||
| ? [ | ||
| { name: 'twitter:image', content: image }, | ||
| { name: 'twitter:card', content: 'summary_large_image' }, | ||
| { name: 'og:image', content: image }, | ||
| ] | ||
| : []), | ||
| ] | ||
|
|
||
| return tags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filter out meta tags with undefined content.
The function creates meta tags even when optional parameters (description, keywords) are undefined, resulting in invalid HTML like <meta name="description" content="undefined">. Filter out tags with undefined content before returning.
🔎 Proposed fix
export const seo = ({
title,
description,
keywords,
image,
}: {
title: string
description?: string
image?: string
keywords?: string
}) => {
const tags = [
{ title },
- { name: 'description', content: description },
- { name: 'keywords', content: keywords },
+ ...(description ? [{ name: 'description', content: description }] : []),
+ ...(keywords ? [{ name: 'keywords', content: keywords }] : []),
{ name: 'twitter:title', content: title },
- { name: 'twitter:description', content: description },
+ ...(description ? [{ name: 'twitter:description', content: description }] : []),
{ name: 'twitter:creator', content: '@tannerlinsley' },
{ name: 'twitter:site', content: '@tannerlinsley' },
{ name: 'og:type', content: 'website' },
{ name: 'og:title', content: title },
- { name: 'og:description', content: description },
+ ...(description ? [{ name: 'og:description', content: description }] : []),
...(image
? [
{ name: 'twitter:image', content: image },
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'og:image', content: image },
]
: []),
]
return tags
}🤖 Prompt for AI Agents
In e2e/react-start/basic-nitro/src/utils/seo.ts around lines 12 to 32, the tags
array includes objects whose content (e.g. description, keywords, image) may be
undefined, producing invalid meta tags; before returning, filter out any tag
objects with undefined or null values (for example, remove tags where
tag.content is null/undefined or where title is null/undefined) so only fully
populated meta tag entries are returned.
| const tags = [ | ||
| { title }, | ||
| { name: 'description', content: description }, | ||
| { name: 'keywords', content: keywords }, | ||
| { name: 'twitter:title', content: title }, | ||
| { name: 'twitter:description', content: description }, | ||
| { name: 'twitter:creator', content: '@tannerlinsley' }, | ||
| { name: 'twitter:site', content: '@tannerlinsley' }, | ||
| { name: 'og:type', content: 'website' }, | ||
| { name: 'og:title', content: title }, | ||
| { name: 'og:description', content: description }, | ||
| ...(image | ||
| ? [ | ||
| { name: 'twitter:image', content: image }, | ||
| { name: 'twitter:card', content: 'summary_large_image' }, | ||
| { name: 'og:image', content: image }, | ||
| ] | ||
| : []), | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditionally include meta tags when values are undefined.
The function unconditionally includes description and keywords in the meta tags array, even when they're undefined. This results in invalid HTML meta tags with content: undefined.
For example, calling seo({ title: 'Test' }) generates:
<meta name="description" content="undefined">
<meta name="keywords" content="undefined">Filter out tags with undefined content values or conditionally spread them similar to the image handling.
🔎 Proposed fix to filter undefined values
export const seo = ({
title,
description,
keywords,
image,
}: {
title: string
description?: string
image?: string
keywords?: string
}) => {
const tags = [
{ title },
- { name: 'description', content: description },
- { name: 'keywords', content: keywords },
+ ...(description ? [{ name: 'description', content: description }] : []),
+ ...(keywords ? [{ name: 'keywords', content: keywords }] : []),
{ name: 'twitter:title', content: title },
- { name: 'twitter:description', content: description },
+ ...(description ? [{ name: 'twitter:description', content: description }] : []),
{ name: 'twitter:creator', content: '@tannerlinsley' },
{ name: 'twitter:site', content: '@tannerlinsley' },
{ name: 'og:type', content: 'website' },
{ name: 'og:title', content: title },
- { name: 'og:description', content: description },
+ ...(description ? [{ name: 'og:description', content: description }] : []),
...(image
? [
{ name: 'twitter:image', content: image },
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'og:image', content: image },
]
: []),
]
return tags
}🤖 Prompt for AI Agents
In e2e/solid-start/basic-nitro-spa/src/utils/seo.ts around lines 12 to 30, the
tags array unconditionally includes description and keywords which can be
undefined, producing meta tags with content: undefined; change construction so
any tag whose content is undefined is omitted — either build the array by
conditionally spreading description and keywords like the image block, or filter
the final tags array to remove entries where content is undefined (and ensure
the title entry is always present); this will prevent generating meta tags with
undefined content.
| <Link | ||
| to="/" | ||
| class={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold`} | ||
| onClick={(e) => { | ||
| e.preventDefault() | ||
| window.history.back() | ||
| }} | ||
| > | ||
| Go Back | ||
| </Link> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misleading to prop on history navigation link.
The "Go Back" link has to="/" but the onClick handler prevents default navigation and uses window.history.back() instead. The to prop is never used and creates confusion about the link's actual behavior.
🔎 Suggested fix
Either remove the to prop entirely and use a button, or use a semantic placeholder:
- <Link
- to="/"
- class={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold`}
+ <button
onClick={(e) => {
e.preventDefault()
window.history.back()
}}
+ class={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold`}
- >
+ >
Go Back
- </Link>
+ </button>Alternatively, if you want to keep the Link component for styling consistency, use a more semantic approach:
<Link
- to="/"
+ to={window.location.pathname}
class={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold`}
onClick={(e) => {
e.preventDefault()
window.history.back()
}}
>
Go Back
</Link>📝 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.
| <Link | |
| to="/" | |
| class={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold`} | |
| onClick={(e) => { | |
| e.preventDefault() | |
| window.history.back() | |
| }} | |
| > | |
| Go Back | |
| </Link> | |
| <button | |
| onClick={(e) => { | |
| e.preventDefault() | |
| window.history.back() | |
| }} | |
| class={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold`} | |
| > | |
| Go Back | |
| </button> |
🤖 Prompt for AI Agents
In e2e/solid-start/basic-nitro/src/components/DefaultCatchBoundary.tsx around
lines 39 to 48, the Link has a misleading to="/" prop while the onClick prevents
default navigation and calls window.history.back(); replace the Link with a
semantic <button> (keep the same class string and the onClick that calls
window.history.back(), remove e.preventDefault()) so the element's semantics
match its behavior and the unused to prop is removed.
| sizes: '16x16', | ||
| href: '/favicon-16x16.png', | ||
| }, | ||
| { rel: 'manifest', href: '/site.webmanifest', color: '#fffff' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix hex color typo.
The hex color value has 5 digits instead of 6. Valid hex colors should be either 3 or 6 hex digits.
🔎 Proposed fix
- { rel: 'manifest', href: '/site.webmanifest', color: '#fffff' },
+ { rel: 'manifest', href: '/site.webmanifest', color: '#ffffff' },📝 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.
| { rel: 'manifest', href: '/site.webmanifest', color: '#fffff' }, | |
| { rel: 'manifest', href: '/site.webmanifest', color: '#ffffff' }, |
🤖 Prompt for AI Agents
In e2e/solid-start/basic-nitro/src/routes/__root.tsx around line 51, the
manifest link object uses an invalid 5-digit hex color '#fffff'; replace it with
a valid 6-digit or 3-digit hex (for example '#ffffff' or '#fff') so the color
value is valid CSS hex notation.
| const getData = createServerFn().handler(() => { | ||
| return { | ||
| message: `Running in ${typeof navigator !== 'undefined' ? navigator.userAgent : 'Unknown'}`, | ||
| runtime: 'Nitro', | ||
| } | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix server function to return correct runtime message.
The getData server function returns "Running in Unknown" when executed server-side (where navigator is undefined), but the test at e2e/solid-start/basic-nitro/tests/app.spec.ts:8 expects "Running in Node.js". This mismatch will cause the test to fail.
🔎 Proposed fix to detect Node.js runtime
const getData = createServerFn().handler(() => {
return {
- message: `Running in ${typeof navigator !== 'undefined' ? navigator.userAgent : 'Unknown'}`,
+ message: `Running in ${typeof process !== 'undefined' && process.versions?.node ? 'Node.js' : 'Unknown'}`,
runtime: 'Nitro',
}
})📝 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.
| const getData = createServerFn().handler(() => { | |
| return { | |
| message: `Running in ${typeof navigator !== 'undefined' ? navigator.userAgent : 'Unknown'}`, | |
| runtime: 'Nitro', | |
| } | |
| }) | |
| const getData = createServerFn().handler(() => { | |
| return { | |
| message: `Running in ${typeof process !== 'undefined' && process.versions?.node ? 'Node.js' : 'Unknown'}`, | |
| runtime: 'Nitro', | |
| } | |
| }) |
🤖 Prompt for AI Agents
In e2e/solid-start/basic-nitro/src/routes/index.tsx around lines 9 to 14, the
server function currently uses navigator presence to build the runtime message
and thus returns "Unknown" server-side; update the runtime detection to check
for Node.js (e.g. typeof process !== 'undefined' && process.versions &&
process.versions.node) and return "Node.js" when that check succeeds, otherwise
fall back to using navigator.userAgent for browsers or a default; adjust the
returned message to use "Node.js" on server so the test expecting "Running in
Node.js" passes.

the tests from
Add e2e tests for Nitro integration (each testing both nitro v2 and v3):
fails without the workaround in #5983
Summary by CodeRabbit
Release Notes
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.