Skip to content

fix(router-core): load-client can cache settled abandoned loader work without preload authority - #8039

Merged
Sheraff merged 3 commits into
mainfrom
fix-router-core-load-client-cache-settled-abandonned-work
Aug 11, 2026
Merged

fix(router-core): load-client can cache settled abandoned loader work without preload authority#8039
Sheraff merged 3 commits into
mainfrom
fix-router-core-load-client-cache-settled-abandonned-work

Conversation

@Sheraff

@Sheraff Sheraff commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Preserved completed route data when a newer, nested navigation is interrupted.
    • Returning to a previously settled route now reuses its cached loader result instead of loading the data again.
    • Prevented redundant data requests after aborted transitions.
    • Improved navigation continuity by retaining successfully loaded content during superseded or abandoned navigations.
    • Maintained expected refresh behavior while improving reuse of completed navigation results.

@nx-cloud

nx-cloud Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit 618417b

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

☁️ Nx Cloud last updated this comment at 2026-08-11 10:10:57 UTC

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

1 package(s) bumped directly, 22 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/router-core 1.171.21 → 1.171.22 Changeset
@tanstack/react-router 1.170.25 → 1.170.26 Dependent
@tanstack/react-start 1.168.42 → 1.168.43 Dependent
@tanstack/react-start-client 1.168.23 → 1.168.24 Dependent
@tanstack/react-start-rsc 0.1.41 → 0.1.42 Dependent
@tanstack/react-start-server 1.167.30 → 1.167.31 Dependent
@tanstack/router-cli 1.167.27 → 1.167.28 Dependent
@tanstack/router-generator 1.167.27 → 1.167.28 Dependent
@tanstack/router-plugin 1.168.29 → 1.168.30 Dependent
@tanstack/router-vite-plugin 1.167.29 → 1.167.30 Dependent
@tanstack/solid-router 1.170.24 → 1.170.25 Dependent
@tanstack/solid-start 1.168.41 → 1.168.42 Dependent
@tanstack/solid-start-client 1.168.23 → 1.168.24 Dependent
@tanstack/solid-start-server 1.167.30 → 1.167.31 Dependent
@tanstack/start-client-core 1.170.21 → 1.170.22 Dependent
@tanstack/start-plugin-core 1.171.33 → 1.171.34 Dependent
@tanstack/start-server-core 1.169.25 → 1.169.26 Dependent
@tanstack/start-static-server-functions 1.167.26 → 1.167.27 Dependent
@tanstack/start-storage-context 1.167.23 → 1.167.24 Dependent
@tanstack/vue-router 1.170.23 → 1.170.24 Dependent
@tanstack/vue-start 1.168.40 → 1.168.41 Dependent
@tanstack/vue-start-client 1.167.26 → 1.167.27 Dependent
@tanstack/vue-start-server 1.167.30 → 1.167.31 Dependent

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The loader now checks and populates its cache for active regular navigations. Settled loader results can remain available after a superseded child navigation aborts. Documentation and release metadata describe the cache admission rules.

Changes

Loader cache preservation

Layer / File(s) Summary
Cache settled blocking loaders and verify superseded navigation behavior
packages/router-core/src/load-client.ts, packages/router-core/tests/navigation-settled-cache.test.ts
The loader checks the planned match cache for all lane executions. Active regular navigations cache successful blocking results when the lane is not aborted. Development refresh loads remain excluded. The test verifies parent result reuse after a child loader aborts.
Document cache admission and reuse rules
packages/router-core/INTERNALS.md
The internal documentation describes settlement-time cache admission, ownership checks, reusable private-lane generations, cache-first planning, and development refresh handling.
Record patch release
.changeset/cool-ideas-deny.md
A Changeset records the router-core patch release and the updated loader caching behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: documentation

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: caching settled abandoned loader work without preload authority.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-router-core-load-client-cache-settled-abandonned-work

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.

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Benchmarks

  • Commit: 101bfb5fe7a2
  • Measured at: 2026-08-11T10:03:30.715Z
  • Baseline source: history:af8dcb859a2e
  • Dashboard: bundle-size history

The following scenarios have bundle-size changes compared with the baseline:

Scenario Current (gzip) Delta vs baseline Initial gzip Raw Brotli Trend
react-router.minimal 83.92 KiB -4 B (-0.00%) 83.78 KiB 262.67 KiB 73.05 KiB ███▁▁▁▁▁▁▁▁▁
react-router.full 87.42 KiB -7 B (-0.01%) 87.29 KiB 274.39 KiB 76.08 KiB ███▁▁▁▁▁▁▁▁▁
solid-router.minimal 33.24 KiB -4 B (-0.01%) 33.11 KiB 96.50 KiB 30.04 KiB ███▁▁▁▁▁▁▁▁▁
solid-router.full 38.06 KiB -4 B (-0.01%) 37.94 KiB 111.14 KiB 34.26 KiB ███▁▁▁▁▁▁▁▁▁
vue-router.minimal 49.52 KiB -5 B (-0.01%) 49.40 KiB 138.25 KiB 44.65 KiB ███▁▁▁▁▁▁▁▁▁
vue-router.full 55.10 KiB -4 B (-0.01%) 54.98 KiB 156.42 KiB 49.60 KiB ███▁▁▁▁▁▁▁▁▁
react-start.minimal 96.75 KiB -8 B (-0.01%) 96.61 KiB 304.89 KiB 83.89 KiB ███▁▁▁▁▁▁▁▁▁
react-start.deferred-hydration 97.47 KiB -8 B (-0.01%) 96.64 KiB 306.24 KiB 84.48 KiB ███▁▁▁▁▁▁▁▁▁
react-start.full 99.92 KiB -6 B (-0.01%) 99.78 KiB 314.60 KiB 86.53 KiB ███▁▁▁▁▁▁▁▁▁
react-start.rsbuild.minimal 100.06 KiB -4 B (-0.00%) 99.89 KiB 315.43 KiB 86.34 KiB ▁▂▂▂▂▆██████
react-start.rsbuild.minimal-iife 100.47 KiB -4 B (-0.00%) 100.30 KiB 316.37 KiB 86.72 KiB ▁▂▂▂▂▆██████
react-start.rsbuild.full 103.39 KiB -4 B (-0.00%) 103.22 KiB 325.53 KiB 89.09 KiB ▁▃▃▃▃▆██████
solid-start.minimal 46.01 KiB -1 B (-0.00%) 45.88 KiB 137.56 KiB 40.97 KiB ███▁▁▁▁▁▁▁▁▁
solid-start.deferred-hydration 49.08 KiB -10 B (-0.02%) 45.95 KiB 145.02 KiB 43.70 KiB ███▁▁▁▁▁▁▁▁▁
solid-start.full 51.09 KiB -4 B (-0.01%) 50.96 KiB 152.95 KiB 45.32 KiB ███▁▁▁▁▁▁▁▁▁
vue-start.minimal 65.54 KiB -7 B (-0.01%) 65.42 KiB 189.07 KiB 58.35 KiB ███▁▁▁▁▁▁▁▁▁
vue-start.full 69.36 KiB -12 B (-0.02%) 69.24 KiB 201.35 KiB 61.70 KiB ███▁▁▁▁▁▁▁▁▁

Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better.

@pkg-pr-new

pkg-pr-new Bot commented Aug 11, 2026

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@8039

@tanstack/eslint-plugin-router

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

@tanstack/eslint-plugin-start

npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@8039

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@8039

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

npm i https://pkg.pr.new/@tanstack/react-start@8039

@tanstack/react-start-client

npm i https://pkg.pr.new/@tanstack/react-start-client@8039

@tanstack/react-start-rsc

npm i https://pkg.pr.new/@tanstack/react-start-rsc@8039

@tanstack/react-start-server

npm i https://pkg.pr.new/@tanstack/react-start-server@8039

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

npm i https://pkg.pr.new/@tanstack/solid-start@8039

@tanstack/solid-start-client

npm i https://pkg.pr.new/@tanstack/solid-start-client@8039

@tanstack/solid-start-server

npm i https://pkg.pr.new/@tanstack/solid-start-server@8039

@tanstack/start-client-core

npm i https://pkg.pr.new/@tanstack/start-client-core@8039

@tanstack/start-fn-stubs

npm i https://pkg.pr.new/@tanstack/start-fn-stubs@8039

@tanstack/start-plugin-core

npm i https://pkg.pr.new/@tanstack/start-plugin-core@8039

@tanstack/start-server-core

npm i https://pkg.pr.new/@tanstack/start-server-core@8039

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

npm i https://pkg.pr.new/@tanstack/start-storage-context@8039

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@8039

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@8039

@tanstack/vue-router

npm i https://pkg.pr.new/@tanstack/vue-router@8039

@tanstack/vue-router-devtools

npm i https://pkg.pr.new/@tanstack/vue-router-devtools@8039

@tanstack/vue-router-ssr-query

npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@8039

@tanstack/vue-start

npm i https://pkg.pr.new/@tanstack/vue-start@8039

@tanstack/vue-start-client

npm i https://pkg.pr.new/@tanstack/vue-start-client@8039

@tanstack/vue-start-server

npm i https://pkg.pr.new/@tanstack/vue-start-server@8039

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@8039

commit: 618417b

@codspeed-hq

codspeed-hq Bot commented Aug 11, 2026

Copy link
Copy Markdown

Merging this PR will regress 0 benchmarks

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 14 improved benchmarks
❌ 6 (👁 6) regressed benchmarks
✅ 160 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory mem server request-churn (vue) 2,905.2 KB 852.1 KB ×3.4
Memory mem server serialization-payload (solid) 5.9 MB 4.6 MB +28.58%
Memory mem server error-paths not-found (vue) 573.3 KB 486.8 KB +17.77%
Simulation client-loaders navigation loop (react) 153.7 ms 136 ms +12.99%
Memory mem server error-paths not-found (react) 417.3 KB 379.8 KB +9.86%
Memory mem client navigation-churn (vue) 1.7 MB 1.6 MB +9.8%
Simulation client-loaders navigation loop (vue) 206.1 ms 189.3 ms +8.89%
Memory mem server aborted-requests (vue) 1,103 KB 1,013.5 KB +8.83%
Simulation client-loaders navigation loop (solid) 248 ms 229.7 ms +7.99%
Simulation client-async-pipeline navigation loop (vue) 148.8 ms 141 ms +5.53%
Memory mem server server-fn-churn (solid) 351.6 KB 337.7 KB +4.12%
Simulation client-async-pipeline navigation loop (solid) 207.6 ms 200.6 ms +3.51%
Memory mem server error-paths redirect (react) 312.7 KB 302.5 KB +3.37%
Memory mem server peak-large-page (solid) 1.2 MB 1.1 MB +3.16%
👁 Memory mem server error-paths redirect (vue) 439.7 KB 487.5 KB -9.81%
👁 Memory mem server server-fn-churn (vue) 327.8 KB 359.7 KB -8.87%
👁 Memory mem server error-paths redirect (solid) 366.3 KB 392.8 KB -6.74%
👁 Memory mem server server-fn-churn (react) 354.4 KB 367.6 KB -3.59%
👁 Memory mem client interrupted-navigations (vue) 512.8 KB 541.9 KB -5.36%
👁 Memory mem client unique-location-churn (solid) 384.9 KB 478.2 KB -19.52%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix-router-core-load-client-cache-settled-abandonned-work (618417b) with main (783f883)

Open in CodSpeed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.changeset/cool-ideas-deny.md:
- Line 5: Update the release-note text in cool-ideas-deny.md by replacing
“settles” with “settled” and correcting “abandonned” to “abandoned,” preserving
the rest of the sentence exactly.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a0da9453-c4b1-40c2-9024-02d495f3a39f

📥 Commits

Reviewing files that changed from the base of the PR and between 28bbdbe and 618417b.

📒 Files selected for processing (2)
  • .changeset/cool-ideas-deny.md
  • packages/router-core/INTERNALS.md

'@tanstack/router-core': patch
---

load-client can cache settles abandonned loader work without preload authority

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Correct the release-note wording.

Replace settles with settled and abandonned with abandoned. The corrected text is:

load-client can cache settled abandoned loader work without preload authority.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.changeset/cool-ideas-deny.md at line 5, Update the release-note text in
cool-ideas-deny.md by replacing “settles” with “settled” and correcting
“abandonned” to “abandoned,” preserving the rest of the sentence exactly.

@Sheraff Sheraff changed the title fix(router-core): load-client can cache settles abandonned loader work without preload authority fix(router-core): load-client can cache settled abandoned loader work without preload authority Aug 11, 2026
@Sheraff
Sheraff merged commit 7e93431 into main Aug 11, 2026
26 checks passed
@Sheraff
Sheraff deleted the fix-router-core-load-client-cache-settled-abandonned-work branch August 11, 2026 10:17
@github-actions github-actions Bot mentioned this pull request Aug 11, 2026
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.

1 participant