Skip to content

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Nov 9, 2025

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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

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

Cohort / File(s) Summary
React Router route tree generation
e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts
Replaces TransitionIndexRoute with TransitionCountQueryRoute; updates route paths from /transition/ to /transition/count/query across all FileRoutes mappings and module augmentations
React Router route component
e2e/react-router/basic-react-query-file-based/src/routes/transition/count/query.tsx
Updates Route initialization path from /transition/ to /transition/count/query and adjusts Link's from attribute accordingly
React Router test
e2e/react-router/basic-react-query-file-based/tests/transition.spec.ts
Changes initial navigation from /transition to /transition/count/query while preserving subsequent assertions
Solid Router route tree generation
e2e/solid-router/basic-file-based/src/routeTree.gen.ts
Removes TransitionIndexRoute and introduces two new routes: TransitionTypingCreateResourceRoute and TransitionCountCreateResourceRoute; updates FileRoutes mappings and RootRouteChildren
Solid Router route components (new)
e2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsx, e2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsx
Adds two new route files with resources demonstrating count creation and typed query handling with Suspense boundaries
Solid Router test
e2e/solid-router/basic-file-based/tests/transition.spec.ts
Updates test name and navigation to /transition/count/create-resource; converts several awaited clicks to fire-and-forget operations
Solid Router (query) route tree generation
e2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.ts
Replaces TransitionIndexRoute with TransitionCountQueryRoute; updates FileRoutes mappings and module augmentations from /transition/ to /transition/count/query
Solid Router (query) route component
e2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsx
Updates route path from /transition/ to /transition/count/query; removes unused Suspense import
Solid Router (query) test
e2e/solid-router/basic-solid-query-file-based/tests/transition.spec.ts
Changes navigation target from /transition to /transition/count/query
Solid Start route tree generation
e2e/solid-start/basic/src/routeTree.gen.ts
Adds two new routes (TransitionTypingCreateResourceRoute and TransitionCountCreateResourceRoute); updates FileRoutes interfaces and module augmentations
Solid Start route components (new)
e2e/solid-start/basic/src/routes/transition/count/create-resource.tsx, e2e/solid-start/basic/src/routes/transition/typing/create-resource.tsx
Adds two new route files with resources for count creation and typed query handling, including search parameter validation and async resource fetching
Solid Start vite configuration
e2e/solid-start/basic/vite.config.ts
Excludes /transition from prerender filter list

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Key areas requiring attention:
    • 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 flakiness
    • Multiple routeTree.gen.ts files — ensure generated route mappings are complete and correctly wired across all FileRoutes interfaces, module augmentations, and RootRouteChildren
    • New route files in Solid Router and Solid Start — verify resource creation logic, search parameter handling, and Suspense boundaries function as intended

Possibly related PRs

Suggested labels

package: react-router, package: solid-router, package: solid-start

Suggested reviewers

  • schiller-manuel
  • brenelz

Poem

🐰 Routes once flat, now nest so deep,
Transitions spring where queries creep,
From /transition/ to paths refined,
New resources bloom, with types aligned,
E2E tales of resource and quest,
Hopping through routes, we've done our best! 🌱

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test: restructure transition e2e tests' accurately reflects the main changes in the PR, which involve updating transition-related routes and test files across multiple e2e test applications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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--restructure-transition-tests

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 Nov 9, 2025

View your CI Pipeline Execution ↗ for commit 98e28a4

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:59 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 9, 2025

More templates

@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@5800

commit: 98e28a4

@birkskyum birkskyum merged commit fcf1a82 into main Nov 9, 2025
5 of 6 checks passed
@birkskyum birkskyum deleted the test--restructure-transition-tests branch November 9, 2025 18:26
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

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 every click() so Playwright actually performs the actions in order.

Calling page.getByTestId(...).click() without await fires 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 the await on 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 3028156 and 98e28a4.

📒 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.tsx
  • e2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsx
  • e2e/react-router/basic-react-query-file-based/src/routes/transition/count/query.tsx
  • e2e/solid-router/basic-solid-query-file-based/tests/transition.spec.ts
  • e2e/solid-router/basic-file-based/tests/transition.spec.ts
  • e2e/solid-start/basic/src/routes/transition/typing/create-resource.tsx
  • e2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsx
  • e2e/solid-start/basic/src/routeTree.gen.ts
  • e2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsx
  • e2e/solid-start/basic/vite.config.ts
  • e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts
  • e2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.ts
  • e2e/react-router/basic-react-query-file-based/tests/transition.spec.ts
  • e2e/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.tsx
  • e2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsx
  • e2e/react-router/basic-react-query-file-based/src/routes/transition/count/query.tsx
  • e2e/solid-start/basic/src/routes/transition/typing/create-resource.tsx
  • e2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsx
  • e2e/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.tsx
  • e2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsx
  • e2e/react-router/basic-react-query-file-based/src/routes/transition/count/query.tsx
  • e2e/solid-router/basic-solid-query-file-based/tests/transition.spec.ts
  • e2e/solid-router/basic-file-based/tests/transition.spec.ts
  • e2e/solid-start/basic/src/routes/transition/typing/create-resource.tsx
  • e2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsx
  • e2e/solid-start/basic/src/routeTree.gen.ts
  • e2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsx
  • e2e/solid-start/basic/vite.config.ts
  • e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts
  • e2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.ts
  • e2e/react-router/basic-react-query-file-based/tests/transition.spec.ts
  • e2e/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/ directory
Learnt 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.tsx
  • e2e/solid-router/basic-file-based/src/routes/transition/typing/create-resource.tsx
  • e2e/solid-start/basic/src/routes/transition/typing/create-resource.tsx
  • e2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsx
  • e2e/solid-start/basic/src/routeTree.gen.ts
  • e2e/solid-start/basic/vite.config.ts
  • e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts
  • e2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.ts
  • e2e/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.tsx
  • e2e/solid-router/basic-solid-query-file-based/tests/transition.spec.ts
  • e2e/solid-router/basic-file-based/tests/transition.spec.ts
  • e2e/solid-router/basic-solid-query-file-based/src/routes/transition/count/query.tsx
  • e2e/solid-start/basic/src/routeTree.gen.ts
  • e2e/solid-router/basic-file-based/src/routes/transition/count/create-resource.tsx
  • e2e/solid-start/basic/vite.config.ts
  • e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts
  • e2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.ts
  • e2e/react-router/basic-react-query-file-based/tests/transition.spec.ts
  • e2e/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.ts
  • e2e/solid-start/basic/vite.config.ts
  • e2e/solid-router/basic-solid-query-file-based/src/routeTree.gen.ts
  • e2e/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.tsx
  • e2e/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/ directories

Applied to files:

  • e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts
  • e2e/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 in createResource
  • The resource dependency () => searchQuery().n ensures 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 /transition to 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

Comment on lines +27 to +34
<input
class="border bg-gray-50 text-black px-3 py-1"
value={''}
placeholder="Type to search..."
onInput={(e) => {
navigate({ search: { query: e.currentTarget.value } })
}}
/>
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

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.

Comment on lines +27 to +34
<input
class="border bg-gray-50 text-black px-3 py-1"
value={''}
placeholder="Type to search..."
onInput={(e) => {
navigate({ search: { query: e.currentTarget.value } })
}}
/>
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

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 value prop 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.

Suggested change
<input
class="border bg-gray-50 text-black px-3 py-1"
value={''}
placeholder="Type to search..."
onInput={(e) => {
navigate({ search: { query: e.currentTarget.value } })
}}
/>
<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 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