Which project does this relate to?
Router
Describe the bug
On @tanstack/react-router 1.170.36 with @tanstack/router-core 1.171.30, router.navigate() does nothing at all on a router created programmatically. history.location, latestLocation and state.location all stay on the previous entry, the promise resolves undefined, and state.status is back to idle — so there is no pending navigation to await.
It is not path matching or location building. router.buildLocation({ to: ".", search: (p) => ({ ...p, list: "sexes" }) }) returns the correct /operations?tab=lookup-data&list=sexes on both versions. Passing that straight to router.commitLocation({ ...built, replace: true }) moves history on 1.170.35 and does not on 1.170.36. The regression is on the commit side.
Every navigation shape I tried is affected:
| probe |
1.170.35 |
1.170.36 |
to: "." + functional search updater |
applied |
no-op |
to: "." + object search |
applied |
no-op |
to: "/operations" + functional updater |
applied |
no-op |
no to + functional updater |
applied |
no-op |
to: "/horses/$id" + params (path change) |
applied |
no-op |
Caveat, stated up front: the router in this reproducer is created programmatically and never rendered through RouterProvider. I have not established whether a mounted router is affected. I am reporting it because this shape is how a lot of test suites drive the router, and because the pair of patch releases changes it.
Complete minimal reproducer
https://gist.github.com/NickyTope/bcf0b4e05e194dc3b39406cc45c6783c
Steps to Reproduce the Bug
mkdir tsr-repro && cd tsr-repro
# take package.json and repro.mjs from the gist
npm i @tanstack/react-router@1.170.36 @tanstack/router-core@1.171.30
node repro.mjs # every probe prints NO-OP; history never moves
npm i @tanstack/react-router@1.170.35 @tanstack/router-core@1.171.29
node repro.mjs # every probe prints "applied"
The last two lines of the script isolate it:
buildLocation -> /operations?tab=lookup-data&list=sexes
after commit -> /operations?tab=lookup-data <- 1.170.36
after commit -> /operations?tab=lookup-data&list=sexes <- 1.170.35
Expected behavior
await router.navigate({ ... }) moves the router, as it does on 1.170.35 — history, latestLocation and state.location all reflect the new location. Equivalently, commitLocation applies a location that buildLocation built correctly.
Platform
- OS: Linux (NixOS), x86-64
- Node: 24.20.0
@tanstack/react-router: 1.170.36 (broken) vs 1.170.35 (working)
@tanstack/router-core: 1.171.30 (broken) vs 1.171.29 (working)
- No bundler or framework involved — plain
node repro.mjs
Additional context
Found because a Renovate patch bump turned a suite red that exists specifically to catch router behaviour changes. Holding at 1.170.35 for now.
Which project does this relate to?
Router
Describe the bug
On
@tanstack/react-router1.170.36 with@tanstack/router-core1.171.30,router.navigate()does nothing at all on a router created programmatically.history.location,latestLocationandstate.locationall stay on the previous entry, the promise resolvesundefined, andstate.statusis back toidle— so there is no pending navigation to await.It is not path matching or location building.
router.buildLocation({ to: ".", search: (p) => ({ ...p, list: "sexes" }) })returns the correct/operations?tab=lookup-data&list=sexeson both versions. Passing that straight torouter.commitLocation({ ...built, replace: true })moves history on 1.170.35 and does not on 1.170.36. The regression is on the commit side.Every navigation shape I tried is affected:
to: "."+ functionalsearchupdaterto: "."+ objectsearchto: "/operations"+ functional updaterto+ functional updaterto: "/horses/$id"+params(path change)Caveat, stated up front: the router in this reproducer is created programmatically and never rendered through
RouterProvider. I have not established whether a mounted router is affected. I am reporting it because this shape is how a lot of test suites drive the router, and because the pair of patch releases changes it.Complete minimal reproducer
https://gist.github.com/NickyTope/bcf0b4e05e194dc3b39406cc45c6783c
Steps to Reproduce the Bug
The last two lines of the script isolate it:
Expected behavior
await router.navigate({ ... })moves the router, as it does on 1.170.35 — history,latestLocationandstate.locationall reflect the new location. Equivalently,commitLocationapplies a location thatbuildLocationbuilt correctly.Platform
@tanstack/react-router: 1.170.36 (broken) vs 1.170.35 (working)@tanstack/router-core: 1.171.30 (broken) vs 1.171.29 (working)node repro.mjsAdditional context
Found because a Renovate patch bump turned a suite red that exists specifically to catch router behaviour changes. Holding at 1.170.35 for now.