Skip to content

Conversation

@Sheraff
Copy link
Contributor

@Sheraff Sheraff commented Nov 10, 2025

As far as I can tell, the matchId don't need to make an expensive call to interpolatePath, and instead we can simply concatenate the strings that cover all the values we need to index on:

  • route.id for exhaustive route disambiguation
  • interpolatedPath (already needed for something else) to include all the params
  • loaderDepsHash for explicit loader dependencies

This removes 1 call to interpolatePath per route in a "branch" (/foo/bar/baz => 3 calls) for every time we call preloadRoute (hover on any link), beforeLoad (navigate to any route), buildLocation (rendering any link).

interpolatePath is not cheap (parse pathname, encode every param, build a string).

Bonus change: with this change, we don't need the leaveWildcards option on interpolatePath anymore, which is a good step towards making this function more performant.

Summary by CodeRabbit

  • Refactor

    • Standardized wildcard handling during path interpolation (wildcard-preserve option removed).
    • Removed experimental non-nested routes flag — non-nested behavior is now stable.
    • Made route identifiers and root-route detection more consistent (affects SSR/root rendering).
    • Error/warning messages now reference routes more precisely.
  • Tests

    • Simplified test assertions by removing feature-flag branches.
    • Added a navigation wait to improve test reliability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Walkthrough

Removed the leaveWildcards option and its branching from path interpolation; interpolatePath now always substitutes wildcard/splat values. Call sites were updated to the new signature and several tests and root/match id checks were adjusted to use route id or updated interpolated values.

Changes

Cohort / File(s) Change Summary
Path interpolation core
packages/router-core/src/path.ts
Removed leaveWildcards?: boolean from InterpolatePathOptions and eliminated branches that preserved wildcards; interpolatePath now always encodes/inserts wildcard/splat values.
Router core usage
packages/router-core/src/router.ts
Removed leaveWildcards: false from interpolatePath calls; matchId now composed as route.id + interpolatedPath + loaderDepsHash using the explicit interpolation result.
Devtools
packages/router-devtools-core/src/BaseTanStackRouterDevtoolsPanel.tsx
Removed explicit leaveWildcards: false argument from interpolatePath call in RouteComp.
SSR / load matches
packages/router-core/src/load-matches.ts
Root detection in SPA shell changed from comparing matchId to comparing route.id when assigning SSR/root flags.
Renderer Match components
packages/react-router/src/Match.tsx, packages/solid-router/src/Match.tsx
Root-route detection and error/catch messages switched to use routeId (internal route id) instead of matchId in specific checks/handlers.
Core tests
packages/router-core/tests/callbacks.test.ts, packages/router-core/tests/load.test.ts
Updated assertions to reference fully-qualified child route ids (e.g., /foo/foo) where ids are now asserted differently.
E2E tests — React & Solid
e2e/react-router/.../non-nested-paths.spec.ts, e2e/react-router/.../params.spec.ts, e2e/solid-router/.../non-nested-paths.spec.ts, e2e/solid-router/.../params.spec.ts
Removed useExperimentalNonNestedRoutes imports/branches and replaced conditional expectations with unconditional assertions (fixed param values).
E2E navigation wait
e2e/react-start/basic/tests/navigation.spec.ts
Added await page.waitForURL('/') immediately after navigating to /.

Sequence Diagram(s)

sequenceDiagram
    participant Caller as Caller (router / devtools / matcher)
    participant Path as interpolatePath
    participant Matcher as matchRoutesInternal

    rect rgb(240,248,255)
    Caller->>Path: interpolatePath(pathTemplate, params, options?)
    Note right of Path `#dfefff`: Wildcards/splats are always\nsubstituted & URL-encoded (no leaveWildcards)
    Path-->>Caller: interpolatedPath
    end

    rect rgb(245,255,240)
    Caller->>Matcher: request match / build matchId
    Matcher->>Path: interpolatePath(route.id, params)
    Path-->>Matcher: interpolatedPath
    Matcher-->>Caller: matchId = route.id + interpolatedPath + loaderDepsHash
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Areas needing extra attention:
    • packages/router-core/src/path.ts — verify wildcard encoding, missing-splat handling, and optional param interpolation behavior.
    • packages/router-core/src/router.ts & packages/router-core/src/load-matches.ts — confirm matchId composition and root/SSR checks with route.id.
    • Tests/E2E — ensure updated assertions reflect runtime behavior and no experimental flag remnants remain.

Possibly related PRs

Suggested reviewers

  • schiller-manuel
  • nlynzaad

Poem

🐇
I nibble paths where wild things play,
One branch trimmed neat to clear the way.
Wildcards hop in — no pauses or stays,
Parameters tucked and safely encoded,
Routes march onward, every path loaded. ✨

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 accurately reflects the main refactoring objective: simplifying matchId construction by removing redundant interpolatePath calls and eliminating the leaveWildcards option.
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 refactor-router-core-simplify-matchid

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a8c5ce and b9fcdfa.

📒 Files selected for processing (1)
  • packages/solid-router/src/Match.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • packages/solid-router/src/Match.tsx
packages/{react-router,solid-router}/**

📄 CodeRabbit inference engine (AGENTS.md)

Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

Files:

  • packages/solid-router/src/Match.tsx
🧠 Learnings (4)
📓 Common learnings
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.
📚 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:

  • packages/solid-router/src/Match.tsx
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5402
File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
Timestamp: 2025-10-08T08:11:47.088Z
Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.

Applied to files:

  • packages/solid-router/src/Match.tsx
📚 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:

  • packages/solid-router/src/Match.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Preview
  • GitHub Check: Test
🔇 Additional comments (2)
packages/solid-router/src/Match.tsx (2)

108-108: LGTM: Clearer error messages using routeId.

Using routeId instead of matchId in the warning message improves readability for developers debugging errors, as it shows the semantic route path rather than an implementation-specific identifier with hashes.


414-414: LGTM: More robust root route detection.

The new comparison using routeId() === rootRouteId is clearer and more direct than the previous matchId-based check. It explicitly verifies whether the parent route is the root route, eliminating dependency on matchId construction details.


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

@nx-cloud
Copy link

nx-cloud bot commented Nov 10, 2025

View your CI Pipeline Execution ↗ for commit b9fcdfa

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

☁️ Nx Cloud last updated this comment at 2025-11-10 23:48:22 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 10, 2025

More templates

@tanstack/arktype-adapter

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

@tanstack/directive-functions-plugin

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

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/zod-adapter

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

commit: b9fcdfa

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: 0

🧹 Nitpick comments (3)
e2e/react-router/basic-file-based/tests/params.spec.ts (1)

2-2: Consider removing the unused import.

The useExperimentalNonNestedRoutes import appears to be unused after removing the conditional logic based on the experimental flag. Cleaning up unused imports improves code clarity.

Apply this diff to remove the unused import:

-import { useExperimentalNonNestedRoutes } from './utils/useExperimentalNonNestedRoutes'
e2e/solid-router/basic-file-based/tests/params.spec.ts (1)

2-2: Consider removing the unused import.

The useExperimentalNonNestedRoutes import appears to be unused after removing the conditional logic based on the experimental flag. Cleaning up unused imports improves code clarity.

Apply this diff to remove the unused import:

-import { useExperimentalNonNestedRoutes } from './utils/useExperimentalNonNestedRoutes'
packages/router-core/tests/callbacks.test.ts (1)

67-67: Consider standardizing navigate() paths for clarity.

The navigate calls mix two forms:

  • Full ID form: navigate({ to: '/foo/foo' }) (lines 67, 70, 89, 99)
  • Short path form: navigate({ to: '/foo' }) (lines 77, 92)

While both forms appear to work, standardizing on one form would improve test clarity and reduce confusion about which format to use.

Consider applying this pattern consistently - using the short path form throughout:

-await router.navigate({ to: '/foo/foo' })
+await router.navigate({ to: '/foo' })

-await router.navigate({ to: '/bar/bar' })
+await router.navigate({ to: '/bar' })

-await router.navigate({ to: '/foo/foo', search: { foo: 'quux' } })
+await router.navigate({ to: '/foo', search: { foo: 'quux' } })

Also applies to: 70-70, 77-77, 89-89, 92-92, 99-99

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df5d194 and ef280ba.

📒 Files selected for processing (7)
  • e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts (2 hunks)
  • e2e/react-router/basic-file-based/tests/params.spec.ts (1 hunks)
  • e2e/react-start/basic/tests/navigation.spec.ts (1 hunks)
  • e2e/solid-router/basic-file-based/tests/non-nested-paths.spec.ts (2 hunks)
  • e2e/solid-router/basic-file-based/tests/params.spec.ts (1 hunks)
  • packages/router-core/tests/callbacks.test.ts (3 hunks)
  • packages/router-core/tests/load.test.ts (9 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-router/basic-file-based/tests/non-nested-paths.spec.ts
  • e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts
  • e2e/react-start/basic/tests/navigation.spec.ts
  • e2e/solid-router/basic-file-based/tests/params.spec.ts
  • packages/router-core/tests/load.test.ts
  • e2e/react-router/basic-file-based/tests/params.spec.ts
  • packages/router-core/tests/callbacks.test.ts
e2e/**

📄 CodeRabbit inference engine (AGENTS.md)

Store end-to-end tests under the e2e/ directory

Files:

  • e2e/solid-router/basic-file-based/tests/non-nested-paths.spec.ts
  • e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts
  • e2e/react-start/basic/tests/navigation.spec.ts
  • e2e/solid-router/basic-file-based/tests/params.spec.ts
  • e2e/react-router/basic-file-based/tests/params.spec.ts
packages/router-core/**

📄 CodeRabbit inference engine (AGENTS.md)

Keep framework-agnostic core router logic in packages/router-core/

Files:

  • packages/router-core/tests/load.test.ts
  • packages/router-core/tests/callbacks.test.ts
🧠 Learnings (8)
📓 Common learnings
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.
Learnt from: nlynzaad
Repo: TanStack/router PR: 5182
File: e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx:3-5
Timestamp: 2025-09-22T00:56:49.237Z
Learning: In TanStack Router, underscores are intentionally stripped from route segments (e.g., `$baz_` becomes `baz` in generated types) but should be preserved in base path segments. This is the correct behavior as of the fix in PR #5182.
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.
📚 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/tests/non-nested-paths.spec.ts
  • e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts
  • e2e/solid-router/basic-file-based/tests/params.spec.ts
  • packages/router-core/tests/load.test.ts
  • e2e/react-router/basic-file-based/tests/params.spec.ts
  • packages/router-core/tests/callbacks.test.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/solid-router/basic-file-based/tests/non-nested-paths.spec.ts
  • e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts
  • e2e/solid-router/basic-file-based/tests/params.spec.ts
  • packages/router-core/tests/load.test.ts
  • e2e/react-router/basic-file-based/tests/params.spec.ts
  • packages/router-core/tests/callbacks.test.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-router/basic-file-based/tests/non-nested-paths.spec.ts
  • e2e/react-router/basic-file-based/tests/non-nested-paths.spec.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 packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

Applied to files:

  • e2e/react-router/basic-file-based/tests/non-nested-paths.spec.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/react-router/basic-file-based/tests/non-nested-paths.spec.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 packages/router-core/** : Keep framework-agnostic core router logic in packages/router-core/

Applied to files:

  • packages/router-core/tests/load.test.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:

  • packages/router-core/tests/load.test.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Preview
  • GitHub Check: Test
🔇 Additional comments (10)
e2e/react-start/basic/tests/navigation.spec.ts (1)

12-12: LGTM! Improved test reliability and consistency.

Adding await page.waitForURL('/') ensures the navigation is fully complete before proceeding with test interactions. This brings the first test in line with all other tests in the file, which already follow this pattern.

e2e/react-router/basic-file-based/tests/params.spec.ts (1)

103-108: LGTM! Test simplification aligns with router core refactor.

The unconditional expectations correctly reflect the simplified matchId construction and removal of experimental flag branches. This makes the test suite cleaner and more maintainable.

e2e/solid-router/basic-file-based/tests/params.spec.ts (1)

102-107: LGTM! Test simplification aligns with router core refactor.

The unconditional expectations correctly reflect the simplified matchId construction and removal of experimental flag branches. This makes the test suite cleaner and more maintainable.

e2e/solid-router/basic-file-based/tests/non-nested-paths.spec.ts (2)

187-187: LGTM! Simplified non-nested path expectation.

The unconditional expectation of paramValue2 removes experimental flag branching and aligns with the router core simplification in this PR.


346-348: LGTM! Consistent expectation for deeply nested paths.

The unconditional expectation standardizes the deeply nested non-nested path behavior, removing conditional logic and making the test suite cleaner.

e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts (2)

187-187: LGTM! Simplified non-nested path expectation.

The unconditional expectation of paramValue2 removes experimental flag branching and aligns with the router core simplification in this PR.


346-348: LGTM! Consistent expectation for deeply nested paths.

The unconditional expectation standardizes the deeply nested non-nested path behavior, removing conditional logic and making the test suite cleaner.

packages/router-core/tests/load.test.ts (2)

54-54: LGTM! Route ID expectations correctly updated.

All test assertions consistently updated from id: '/foo' to id: '/foo/foo' to reflect the new matchId construction that concatenates route.id + interpolatedPath + loaderDepsHash.

Also applies to: 61-61, 76-76, 90-90, 236-236, 243-243, 258-258, 271-271, 285-285


497-497: LGTM! getMatch calls correctly updated.

The router.getMatch() calls properly updated to use the new fully-qualified route ID format.

Also applies to: 508-508

packages/router-core/tests/callbacks.test.ts (1)

51-51: LGTM! Test expectations correctly updated.

All callback test assertions consistently updated to expect fully-qualified route IDs (/foo/foo, /bar/bar) aligning with the new matchId construction.

Also applies to: 58-58, 73-73, 80-80, 95-95, 102-102

@Sheraff Sheraff merged commit 043e576 into main Nov 10, 2025
6 checks passed
@Sheraff Sheraff deleted the refactor-router-core-simplify-matchid branch November 10, 2025 23:55
roduyemi pushed a commit to roduyemi/oss-router that referenced this pull request Nov 19, 2025
* refactor(router-core): simplify matchId

* ci: apply automated fixes

* update tests

* matchId !== routeId

* nitpicks

* missed in solid router Match

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Nico Lynzaad <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants