test: restructure transition e2e tests #5800
main fromrefs/pull/5800/head·merged by birkskyum(GitHub profile, opens in a new tab) Summary by CodeRabbit#
New Features
- Added new transition resource routes with enhanced query and typing capabilities across multiple framework examples.
Refactor
- Reorganized transition route structure from root paths to nested paths for improved organization.
Tests
- Updated end-to-end tests to reflect new route paths and navigation targets.
- 1
View your CI Pipeline Execution ↗ for commit 98e28a43edfab982b99e9329f237194994c6c69a
Command Status Duration Result nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded 4m 36s View ↗ nx run-many --target=build --exclude=examples/*...✅ Succeeded 1s View ↗
☁️ Nx Cloud last updated this comment at
2025-11-09 18:25:59UTCMore templates
- tanstack-router-solid-example-basic
- tanstack-router-solid-example-basic-devtools-panel
- tanstack-router-solid-example-basic-file-based
- tanstack-router-solid-example-basic-non-nested-devtools
- tanstack-router-solid-example-basic-solid-query
- tanstack-router-solid-example-basic-solid-query-file-based
- tanstack-router-solid-example-basic-ssr-streaming-file-based
- tanstack-router-solid-example-kitchen-sink-file-based
- tanstack-router-solid-example-kitchen-sink-solid-query
- tanstack-router-solid-example-kitchen-sink-solid-query-file-based
- tanstack-router-solid-example-quickstart-file-based
- tanstack-solid-start-example-bare
- tanstack-solid-start-example-basic
- tanstack-solid-start-example-basic-auth
- tanstack-solid-start-example-basic-cloudflare
- tanstack-solid-start-example-basic-netlify
- tanstack-solid-start-example-basic-nitro
- tanstack-start-example-basic-solid-query
- tanstack-solid-start-example-basic-static
- tanstack-solid-start-example-basic-supabase
- tanstack-solid-start-example-convex-better-auth
- tanstack-router-react-example-authenticated-routes
- tanstack-router-react-example-authenticated-routes-firebase
- tanstack-router-react-example-basic
- tanstack-router-react-example-basic-default-search-params
- tanstack-router-react-example-basic-devtools-panel
- tanstack-router-react-example-basic-file-based
- tanstack-router-react-example-basic-non-nested-devtools
- tanstack-router-react-example-react-query
- tanstack-router-react-example-basic-react-query-file-based
- tanstack-router-react-example-basic-ssr-file-based
- tanstack-router-react-example-basic-ssr-streaming-file-based
- tanstack-router-react-example-basic-virtual-file-based
- tanstack-router-react-example-basic-virtual-inside-file-based
- tanstack-router-react-example-deferred-data
- tanstack-router-i18n-paraglide
- tanstack-router-react-example-kitchen-sink
- tanstack-router-react-example-kitchen-sink-file-based
- tanstack-router-react-example-kitchen-sink-react-query
- tanstack-router-react-example-kitchen-sink-react-query-file-based
- tanstack-router-react-example-large-file-based
- tanstack-router-react-example-location-masking
- tanstack-router-react-example-navigation-blocking
- tanstack-router-react-example-quickstart
- tanstack-router-react-example-quickstart-esbuild-file-based
- tanstack-router-react-example-quickstart-file-based
- tanstack-router-react-example-quickstart-rspack-file-based
- tanstack-router-react-example-quickstart-webpack-file-based
- router-monorepo-react-query
- router-mono-simple
- router-mono-simple-lazy
- tanstack-router-react-example-scroll-restoration
- tanstack-search-validator-adapters
- tanstack-start-example-bare
- tanstack-start-example-basic
- tanstack-start-example-basic-auth
- tanstack-start-example-basic-cloudflare
- tanstack-start-example-basic-react-query
- tanstack-start-example-basic-static
- tanstack-start-bun-hosting
- tanstack-start-example-clerk-basic
- tanstack-start-example-convex-trellaux
- tanstack-start-example-counter
- tanstack-start-i18n-paraglide
- tanstack-start-example-large
- tanstack-start-example-material-ui
- tanstack-start-streaming-data-from-server-functions
- tanstack-start-example-supabase-basic
- tanstack-start-tailwind-v4
- tanstack-start-example-trellaux
- tanstack-start-example-workos
- tanstack-router-react-example-view-transitions
- tanstack-router-react-example-with-framer-motion
- tanstack-router-react-example-with-trpc
- tanstack-router-react-example-with-trpc-react-query
@tanstack/arktype-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5800@tanstack/directive-functions-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5800@tanstack/eslint-plugin-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5800@tanstack/history
npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5800@tanstack/nitro-v2-vite-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5800@tanstack/react-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5800@tanstack/react-router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5800@tanstack/react-router-ssr-query
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5800@tanstack/react-start
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5800@tanstack/react-start-client
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5800@tanstack/react-start-server
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5800@tanstack/router-cli
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5800@tanstack/router-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5800@tanstack/router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5800@tanstack/router-devtools-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5800@tanstack/router-generator
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5800@tanstack/router-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5800@tanstack/router-ssr-query-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5800@tanstack/router-utils
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5800@tanstack/router-vite-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5800@tanstack/server-functions-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5800@tanstack/solid-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5800@tanstack/solid-router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5800@tanstack/solid-router-ssr-query
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-ssr-query@5800@tanstack/solid-start
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5800@tanstack/solid-start-client
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5800@tanstack/solid-start-server
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5800@tanstack/start-client-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5800@tanstack/start-plugin-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5800@tanstack/start-server-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5800@tanstack/start-static-server-functions
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5800@tanstack/start-storage-context
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5800@tanstack/valibot-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5800@tanstack/virtual-file-routes
npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5800@tanstack/zod-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5800commit:
98e28a4birkskyum(GitHub profile, opens in a new tab) closed this
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
e2e/solid-router/basic-file-based/tests/transition.spec.ts (1)
23-66: Await everyclick()so Playwright actually performs the actions in order.Calling
page.getByTestId(...).click()withoutawaitfires an async action and then the test barrels ahead. That makes the assertions race with an unfinished click, and any rejection (element not ready, navigation timeout, etc.) turns into an unhandled promise rather than a surfaced failure. Please restore theawaiton all of these clicks to keep the test deterministic.- page.getByTestId('increase-button').click() + await page.getByTestId('increase-button').click()(Repeat for the other clicks in this file.)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 302815623677ba7e986466d9ddbfbe10f5c90294 and 98e28a43edfab982b99e9329f237194994c6c69a.
📒 Files selected for processing (14)
e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts(8 hunks)e2e/react-router/basic-react-query-file-based/src/routes/transition/count/query.tsx(2 hunks)e2e/react-router/basic-react-query-file-based/tests/transition.spec.ts(1 hunks)e2e/solid-router/basic-file-based/src/routeTree.gen.ts(11 hunks)e2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsx(2 hunks)e2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsx(1 hunks)e2e/solid-router/basic-file-based/tests/transition.spec.ts(4 hunks)e2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.ts(8 hunks)e2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsx(3 hunks)e2e/solid-router/basic-solid-query-file-based/tests/transition.spec.ts(1 hunks)e2e/solid-start/basic/src/routeTree.gen.ts(11 hunks)e2e/solid-start/basic/src/routes/transition/count/create-resource.tsx(1 hunks)e2e/solid-start/basic/src/routes/transition/typing/create-resource.tsx(1 hunks)e2e/solid-start/basic/vite.config.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript in strict mode with extensive type safety across the codebase
Files:
e2e/solid-start/basic/src/routes/transition/count/create-resource.tsxe2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsxe2e/react-router/basic-react-query-file-based/src/routes/transition/count/query.tsxe2e/solid-router/basic-solid-query-file-based/tests/transition.spec.tse2e/solid-router/basic-file-based/tests/transition.spec.tse2e/solid-start/basic/src/routes/transition/typing/create-resource.tsxe2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsxe2e/solid-start/basic/src/routeTree.gen.tse2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsxe2e/solid-start/basic/vite.config.tse2e/react-router/basic-react-query-file-based/src/routeTree.gen.tse2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.tse2e/react-router/basic-react-query-file-based/tests/transition.spec.tse2e/solid-router/basic-file-based/src/routeTree.gen.ts
**/src/routes/**
📄 CodeRabbit inference engine (AGENTS.md)
Place file-based routes under src/routes/ directories
Files:
e2e/solid-start/basic/src/routes/transition/count/create-resource.tsxe2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsxe2e/react-router/basic-react-query-file-based/src/routes/transition/count/query.tsxe2e/solid-start/basic/src/routes/transition/typing/create-resource.tsxe2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsxe2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsx
e2e/**
📄 CodeRabbit inference engine (AGENTS.md)
Store end-to-end tests under the e2e/ directory
Files:
e2e/solid-start/basic/src/routes/transition/count/create-resource.tsxe2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsxe2e/react-router/basic-react-query-file-based/src/routes/transition/count/query.tsxe2e/solid-router/basic-solid-query-file-based/tests/transition.spec.tse2e/solid-router/basic-file-based/tests/transition.spec.tse2e/solid-start/basic/src/routes/transition/typing/create-resource.tsxe2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsxe2e/solid-start/basic/src/routeTree.gen.tse2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsxe2e/solid-start/basic/vite.config.tse2e/react-router/basic-react-query-file-based/src/routeTree.gen.tse2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.tse2e/react-router/basic-react-query-file-based/tests/transition.spec.tse2e/solid-router/basic-file-based/src/routeTree.gen.ts
🧠 Learnings (7)
📓 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-09-23T17:36:12.598Z Learning: Applies to e2e/** : Store end-to-end tests under the e2e/ directoryLearnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/Applied to files:
e2e/solid-start/basic/src/routes/transition/count/create-resource.tsxe2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsxe2e/solid-start/basic/src/routes/transition/typing/create-resource.tsxe2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsxe2e/solid-start/basic/src/routeTree.gen.tse2e/solid-start/basic/vite.config.tse2e/react-router/basic-react-query-file-based/src/routeTree.gen.tse2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.tse2e/solid-router/basic-file-based/src/routeTree.gen.ts
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad 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-router/basic-file-based/src/routes/transition/typing/create-resource.tsxe2e/solid-router/basic-solid-query-file-based/tests/transition.spec.tse2e/solid-router/basic-file-based/tests/transition.spec.tse2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsxe2e/solid-start/basic/src/routeTree.gen.tse2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsxe2e/solid-start/basic/vite.config.tse2e/react-router/basic-react-query-file-based/src/routeTree.gen.tse2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.tse2e/react-router/basic-react-query-file-based/tests/transition.spec.tse2e/solid-router/basic-file-based/src/routeTree.gen.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/solid-start/basic/src/routeTree.gen.tse2e/solid-start/basic/vite.config.tse2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.tse2e/solid-router/basic-file-based/src/routeTree.gen.ts
📚 Learning: 2025-10-01T18:30:26.591Z
Learnt from: schiller-manuel Repo: TanStack/router PR: 5330 File: packages/router-core/src/router.ts:2231-2245 Timestamp: 2025-10-01T18:30:26.591Z Learning: In `packages/router-core/src/router.ts`, the `resolveRedirect` method intentionally strips the router's origin from redirect URLs when they match (e.g., `https://foo.com/bar` → `/bar` for same-origin redirects) while preserving the full URL for cross-origin redirects. This logic should not be removed or simplified to use `location.publicHref` directly.Applied to files:
e2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsxe2e/solid-start/basic/vite.config.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to **/src/routes/** : Place file-based routes under src/routes/ directoriesApplied to files:
e2e/react-router/basic-react-query-file-based/src/routeTree.gen.tse2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.ts
📚 Learning: 2025-09-28T21:41:45.233Z
Learnt from: nlynzaad Repo: TanStack/router PR: 5284 File: e2e/react-start/basic/server.js:50-0 Timestamp: 2025-09-28T21:41:45.233Z Learning: In Express v5, catch-all routes must use named wildcards. Use `/*splat` to match everything except root path, or `/{*splat}` (with braces) to match including root path. The old `*` syntax is not allowed and will cause "Missing parameter name" errors. This breaking change requires explicit naming of wildcard parameters.Applied to files:
e2e/solid-router/basic-file-based/src/routeTree.gen.ts
🧬 Code graph analysis (7)
e2e/solid-start/basic/src/routes/transition/count/create-resource.tsx (1)
e2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsx (1)
Route(5-10)
e2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsx (2)
e2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsx (1)
Route(5-10)
e2e/solid-start/basic/src/routes/transition/count/create-resource.tsx (1)
Route(5-10)
e2e/solid-start/basic/src/routes/transition/typing/create-resource.tsx (2)
e2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsx (1)
Route(4-10)
e2e/solid-start/basic/src/routes/transition/count/create-resource.tsx (1)
Route(5-10)
e2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsx (1)
e2e/react-router/basic-react-query-file-based/src/routes/transition/count/query.tsx (1)
Route(20-27)
e2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsx (1)
e2e/solid-start/basic/src/routes/transition/count/create-resource.tsx (1)
Route(5-10)
e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts (1)
e2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.ts (3)
FileRoutesByTo(75-82)FileRoutesById(83-94)RootRouteChildren(126-131)
e2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.ts (1)
e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts (3)
FileRoutesByTo(75-82)FileRoutesById(83-94)RootRouteChildren(126-131)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test
🔇 Additional comments (9)
e2e/solid-start/basic/src/routes/transition/count/create-resource.tsx (3)
1-3: LGTM!The imports are appropriate for a Solid Router route with async resource handling and search param validation.
5-10: LGTM!The route definition correctly validates the search parameter and provides a sensible default. The nested path structure aligns with the PR's restructuring objectives.
12-48: LGTM!The component implementation correctly follows Solid.js reactivity patterns:
Route.useSearch()returns a signal accessor properly tracked increateResource- The resource dependency
() => searchQuery().nensures refetching when the search param changes - Suspense boundary appropriately handles the async loading state
- Test IDs enable e2e test automation
The intentional 1-second delay effectively demonstrates transition behavior for testing purposes.
e2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsx (1)
20-27: LGTM! Route path restructuring is consistent.The route path and Link navigation have been correctly updated from
/transition/to/transition/count/query, maintaining consistency between the route definition and component navigation.Also applies to: 40-44
e2e/solid-start/basic/vite.config.ts (1)
25-25: LGTM! Prerender exclusion appropriately updated.Adding
/transitionto the exclusion filter is appropriate given the new nested transition routes that likely require dynamic rendering.e2e/react-router/basic-react-query-file-based/tests/transition.spec.ts (1)
6-6: LGTM! Test correctly updated for new route structure.The test navigation path has been properly updated to match the restructured route at
/transition/count/query.e2e/solid-router/basic-solid-query-file-based/tests/transition.spec.ts (1)
6-6: LGTM! Test correctly updated for new route structure.The test navigation path has been properly updated to match the restructured route at
/transition/count/query.e2e/react-router/basic-react-query-file-based/src/routes/transition/count/query.tsx (1)
20-27: LGTM! Route path restructuring is consistent.The route path and Link navigation have been correctly updated from
/transition/to/transition/count/query, maintaining consistency between the route definition and component navigation.Also applies to: 40-44
e2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsx (1)
5-10: LGTM! Route path restructuring is consistent.The route path and Link navigation have been correctly updated from
/transition/to/transition/count/create-resource, maintaining consistency between the route definition and component navigation.Also applies to: 18-22
@@ -0,0 +14,21 @@14+ const navigate = Route.useNavigate()15+16+ const [asyncResult] = createResource(17+ () => searchQuery().query,18+ async (query) => {19+ await new Promise((r) => setTimeout(r, 1000))20+ return query21+ },22+ )23+24+ return (25+ <div class="p-2">26+ <div class="mt-2">27+ <input28+ class="border bg-gray-50 text-black px-3 py-1"29+ value={''}30+ placeholder="Type to search..."31+ onInput={(e) => {32+ navigate({ search: { query: e.currentTarget.value } })33+ }}34+ />⚠️ Potential issue | 🟠 Major
Fix the input value binding.
Same issue as in the solid-start variant: the input has
value={''}which prevents the typed text from being visible in the input field.Apply this diff:
<input class="border bg-gray-50 text-black px-3 py-1" - value={''} + value={searchQuery().query} placeholder="Type to search..." onInput={(e) => { navigate({ search: { query: e.currentTarget.value } }) }} />Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In e2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsx around lines 27 to 34, the input is hard-coded with value={''} which prevents typed text from appearing; replace the static empty value with the current query state so the input is controlled correctly (for example bind value to the search/query signal coming from useSearchParams or your component state, e.g. value={search()?.query ?? ''} or value={query() ?? ''}), and ensure the signal/function used is imported/defined so the onInput navigate call continues to update the URL.@@ -0,0 +14,21 @@14+ const navigate = Route.useNavigate()15+16+ const [asyncResult] = createResource(17+ () => searchQuery().query,18+ async (query) => {19+ await new Promise((r) => setTimeout(r, 1000))20+ return query21+ },22+ )23+24+ return (25+ <div class="p-2">26+ <div class="mt-2">27+ <input28+ class="border bg-gray-50 text-black px-3 py-1"29+ value={''}30+ placeholder="Type to search..."31+ onInput={(e) => {32+ navigate({ search: { query: e.currentTarget.value } })33+ }}34+ />⚠️ Potential issue | 🟠 Major
Fix the input value binding.
The input has
value={''}which means it will always display as empty, even as the user types. This creates a broken UX where the typed text is invisible in the input field, though it's reflected in the search state below.Apply this diff to fix the controlled input:
<input class="border bg-gray-50 text-black px-3 py-1" - value={''} + value={searchQuery().query} placeholder="Type to search..." onInput={(e) => { navigate({ search: { query: e.currentTarget.value } }) }} />Alternatively, remove the
valueprop entirely for an uncontrolled input (though controlled is preferred for this use case).📝 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.
<input class="border bg-gray-50 text-black px-3 py-1" value={searchQuery().query} placeholder="Type to search..." onInput={(e) => { navigate({ search: { query: e.currentTarget.value } }) }} />🤖 Prompt for AI Agents
In e2e/solid-start/basic/src/routes/transition/typing/create-resource.tsx around lines 27 to 34, the input currently has a hard-coded value of '' which prevents user input from appearing; change the input to be a controlled input by binding its value to the current search query state (the same state you update in onInput) and ensure onInput updates that state (or derive the value from the router search params you navigate to). If you prefer uncontrolled, remove the value prop entirely, but preferred fix is to replace value={''} with the query state variable so the input shows typed text.
Sign in to join this conversation.
Walkthrough#
Restructures transition routes across multiple e2e test applications. Replaces the flat
/transition/route with nested routes (/transition/count/query,/transition/count/create-resource,/transition/typing/create-resource) demonstrating query handling and resource creation. Updates corresponding generated route tree files, test files, and vite configuration.Changes#
e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts/transition/to/transition/count/queryacross all FileRoutes mappings and module augmentationse2e/react-router/basic-react-query-file-based/src/routes/transition/count/query.tsx/transition/to/transition/count/queryand adjusts Link's from attribute accordinglye2e/react-router/basic-react-query-file-based/tests/transition.spec.ts/transitionto/transition/count/querywhile preserving subsequent assertionse2e/solid-router/basic-file-based/src/routeTree.gen.tse2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsx,e2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsxe2e/solid-router/basic-file-based/tests/transition.spec.ts/transition/count/create-resource; converts several awaited clicks to fire-and-forget operationse2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.ts/transition/to/transition/count/querye2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsx/transition/to/transition/count/query; removes unused Suspense importe2e/solid-router/basic-solid-query-file-based/tests/transition.spec.ts/transitionto/transition/count/querye2e/solid-start/basic/src/routeTree.gen.tse2e/solid-start/basic/src/routes/transition/count/create-resource.tsx,e2e/solid-start/basic/src/routes/transition/typing/create-resource.tsxe2e/solid-start/basic/vite.config.ts/transitionfrom prerender filter listEstimated code review effort#
🎯 3 (Moderate) | ⏱️ ~25 minutes
e2e/solid-router/basic-file-based/tests/transition.spec.ts— conversion of awaited interactions to fire-and-forget clicks may impact test reliability and synchronization with assertions; verify this intentional and doesn't introduce flakinessrouteTree.gen.tsfiles — ensure generated route mappings are complete and correctly wired across all FileRoutes interfaces, module augmentations, and RootRouteChildrenPossibly related PRs#
e2e/solid-router/basic-file-based/tests/transition.spec.ts, overlapping with test navigation and interaction changes in this PRSuggested labels#
package: react-router,package: solid-router,package: solid-startSuggested reviewers#
Poem#
Pre-merge checks and finishing touches#
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share