Skip to content

test(router-core): assert sequential asset projection - #8152

Open
Sheraff wants to merge 1 commit into
mainfrom
test/sequential-head-scripts
Open

test(router-core): assert sequential asset projection#8152
Sheraff wants to merge 1 commit into
mainfrom
test/sequential-head-scripts

Conversation

@Sheraff

@Sheraff Sheraff commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • verify client head and scripts projection runs parent-to-child
  • verify server head and scripts projection runs parent-to-child
  • cover child assets deriving values from the parent match through matches and match

Tests

  • focused Vitest regression test
  • TypeScript tsc6 --noEmit
  • ESLint on the new test file

Summary by CodeRabbit

  • Tests
    • Added coverage ensuring parent-to-child asset projection occurs in the correct order on both client and server.
    • Verified route context, metadata, scripts, handler invocation order, and successful server responses.

@nx-cloud

nx-cloud Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit f21963d

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

☁️ Nx Cloud last updated this comment at 2026-08-22 11:26:04 UTC

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 236dd5b8-2083-4417-944b-5346e96283c6

📥 Commits

Reviewing files that changed from the base of the PR and between aab01de and f21963d.

📒 Files selected for processing (1)
  • packages/router-core/tests/asset-projection-order.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The pull request adds client-side and server-side tests for sequential parent-to-child projection of route metadata and scripts. The tests verify handler order, route context, projected assets, router state, and the server response.

Changes

Asset projection order

Layer / File(s) Summary
Parent-to-child projection tests
packages/router-core/tests/asset-projection-order.test.ts
Adds shared setup and assertions for sequential metadata and script projection. Client and server tests verify handler calls, route context, projected assets, final router state, and a successful server response.

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

Merge Risk: ⚪ Minimal · up to f2196

This change adds focused coverage for sequential asset projection behavior without changing production code. No actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the added router-core tests for sequential asset projection.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/sequential-head-scripts

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

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

5 package(s) bumped directly, 18 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/react-router 1.170.31 → 1.170.32 Changeset
@tanstack/router-core 1.171.26 → 1.171.27 Changeset
@tanstack/solid-router 1.170.29 → 1.170.30 Changeset
@tanstack/start-plugin-core 1.171.38 → 1.171.39 Changeset
@tanstack/vue-router 1.170.28 → 1.170.29 Changeset
@tanstack/react-start 1.168.48 → 1.168.49 Dependent
@tanstack/react-start-client 1.168.29 → 1.168.30 Dependent
@tanstack/react-start-rsc 0.1.47 → 0.1.48 Dependent
@tanstack/react-start-server 1.167.36 → 1.167.37 Dependent
@tanstack/router-cli 1.167.32 → 1.167.33 Dependent
@tanstack/router-generator 1.167.32 → 1.167.33 Dependent
@tanstack/router-plugin 1.168.34 → 1.168.35 Dependent
@tanstack/router-vite-plugin 1.167.34 → 1.167.35 Dependent
@tanstack/solid-start 1.168.46 → 1.168.47 Dependent
@tanstack/solid-start-client 1.168.28 → 1.168.29 Dependent
@tanstack/solid-start-server 1.167.35 → 1.167.36 Dependent
@tanstack/start-client-core 1.170.26 → 1.170.27 Dependent
@tanstack/start-server-core 1.169.30 → 1.169.31 Dependent
@tanstack/start-static-server-functions 1.167.31 → 1.167.32 Dependent
@tanstack/start-storage-context 1.167.28 → 1.167.29 Dependent
@tanstack/vue-start 1.168.45 → 1.168.46 Dependent
@tanstack/vue-start-client 1.167.31 → 1.167.32 Dependent
@tanstack/vue-start-server 1.167.35 → 1.167.36 Dependent

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Benchmarks

This pull request does not affect bundle size in any measured scenario.

@pkg-pr-new

pkg-pr-new Bot commented Aug 22, 2026

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

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

@tanstack/eslint-plugin-router

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

@tanstack/eslint-plugin-start

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-rsc

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-fn-stubs

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/vue-router

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

@tanstack/vue-router-devtools

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

@tanstack/vue-router-ssr-query

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

@tanstack/vue-start

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

@tanstack/vue-start-client

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

@tanstack/vue-start-server

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

@tanstack/zod-adapter

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

commit: f21963d

@codspeed-hq

codspeed-hq Bot commented Aug 22, 2026

Copy link
Copy Markdown

Merging this PR will regress 8 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

⚡ 9 improved benchmarks
❌ 8 regressed benchmarks
✅ 163 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory mem server error-paths redirect (vue) 422.9 KB 472.5 KB -10.51%
Simulation client-nested-params navigation loop (react) 210.8 ms 227.3 ms -7.27%
Memory mem server peak-large-page (solid) 1.1 MB 1.2 MB -7.25%
Memory mem server error-paths unmatched (vue) 562.4 KB 604.4 KB -6.95%
Memory mem server error-paths not-found (react) 398.8 KB 424.5 KB -6.04%
Memory mem server error-paths not-found (vue) 481.7 KB 508.6 KB -5.3%
Memory mem server request-churn (react) 657 KB 687.4 KB -4.42%
Memory mem server server-fn-churn (solid) 337.3 KB 348.3 KB -3.14%
Memory mem server peak-large-page (react) 2.2 MB 1.2 MB +85.29%
Memory mem server aborted-requests (vue) 1.1 MB 1 MB +9.71%
Memory mem server server-fn-churn (vue) 363.9 KB 339.1 KB +7.3%
Memory mem server peak-large-page (vue) 1.2 MB 1.1 MB +6.68%
Memory mem client unique-location-churn (solid) 284.3 KB 266.6 KB +6.64%
Memory mem server error-paths redirect (react) 307.9 KB 292.6 KB +5.23%
Memory mem client navigation-churn (vue) 1.7 MB 1.6 MB +4.53%
Memory mem server serialization-payload (solid) 4.7 MB 4.5 MB +4.32%
Memory mem server error-paths redirect (solid) 382.5 KB 369.2 KB +3.6%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing test/sequential-head-scripts (f21963d) with main (aab01de)

Open in CodSpeed

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