Skip to content

chore: sync main branch with store refactor#7001

Merged
birkskyum merged 32 commits intosolid-router-v2-prefrom
solid-router-main-merge
Mar 23, 2026
Merged

chore: sync main branch with store refactor#7001
birkskyum merged 32 commits intosolid-router-v2-prefrom
solid-router-main-merge

Conversation

@brenelz
Copy link
Contributor

@brenelz brenelz commented Mar 21, 2026

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 21, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1a69f110-e015-4228-954d-4693bae73613

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch solid-router-main-merge

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 Mar 21, 2026

View your CI Pipeline Execution ↗ for commit 9b63607

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

☁️ Nx Cloud last updated this comment at 2026-03-23 07:18:35 UTC

@github-actions
Copy link
Contributor

github-actions bot commented Mar 21, 2026

🚀 Changeset Version Preview

6 package(s) bumped directly, 0 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/solid-router 2.0.0-alpha.6 → 2.0.0-alpha.7 Changeset
@tanstack/solid-router-devtools 2.0.0-alpha.4 → 2.0.0-alpha.5 Changeset
@tanstack/solid-router-ssr-query 2.0.0-alpha.6 → 2.0.0-alpha.7 Changeset
@tanstack/solid-start 2.0.0-alpha.7 → 2.0.0-alpha.8 Changeset
@tanstack/solid-start-client 2.0.0-alpha.6 → 2.0.0-alpha.7 Changeset
@tanstack/solid-start-server 2.0.0-alpha.6 → 2.0.0-alpha.7 Changeset

@github-actions
Copy link
Contributor

github-actions bot commented Mar 21, 2026

Bundle Size Benchmarks

  • Commit: 616481641456
  • Measured at: 2026-03-23T07:18:41.891Z
  • Baseline source: history:616481641456
  • Dashboard: bundle-size history
Scenario Current (gzip) Delta vs baseline Raw Brotli Trend
react-router.minimal 88.54 KiB +401 B (+0.44%) 279.23 KiB 76.90 KiB ▁▁██████▅▅▅█
react-router.full 91.71 KiB +338 B (+0.36%) 289.96 KiB 79.52 KiB ▁▁██████▅▅▆█
solid-router.minimal 40.12 KiB +4.32 KiB (+12.08%) 118.47 KiB 36.09 KiB ▃▃▂▂▂▂▂▂▁▁▁█
solid-router.full 44.42 KiB +4.20 KiB (+10.45%) 131.77 KiB 40.00 KiB ▃▃▂▂▂▂▂▂▁▁▁█
vue-router.minimal 54.11 KiB +343 B (+0.62%) 155.27 KiB 48.48 KiB ▁▁██████▆▆▆█
vue-router.full 58.89 KiB +250 B (+0.42%) 170.42 KiB 52.63 KiB ▁▁██████▆▆▇█
react-start.minimal 102.98 KiB +434 B (+0.41%) 327.29 KiB 88.95 KiB ▁▁██████▄▄▅█
react-start.full 106.35 KiB +409 B (+0.38%) 337.60 KiB 91.91 KiB ▁▁██████▅▅▅█
solid-start.minimal 60.18 KiB +10.31 KiB (+20.67%) 183.73 KiB 53.10 KiB ▂▂▁▁▁▁▁▁▁▁▁█
solid-start.full 64.08 KiB +8.73 KiB (+15.77%) 195.27 KiB 56.49 KiB ▂▂▁▁▁▁▁▁▁▁▁█

Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 21, 2026

More templates

@tanstack/arktype-adapter

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

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-fn-stubs

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/vue-router

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

@tanstack/vue-router-devtools

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

@tanstack/vue-router-ssr-query

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

@tanstack/vue-start

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

@tanstack/vue-start-client

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

@tanstack/vue-start-server

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

@tanstack/zod-adapter

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

commit: 9b63607

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 21, 2026

Merging this PR will improve performance by 55.79%

⚠️ 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

⚡ 5 improved benchmarks
✅ 1 untouched benchmark

Performance Changes

Benchmark BASE HEAD Efficiency
ssr request loop (vue) 514 ms 417.3 ms +23.18%
ssr request loop (solid) 226 ms 179.1 ms +26.2%
client-side navigation loop (solid) 64.2 ms 42.6 ms +50.68%
client-side navigation loop (react) 69.8 ms 44.8 ms +55.79%
client-side navigation loop (vue) 75.1 ms 58.6 ms +28.08%

Comparing solid-router-main-merge (9b63607) with solid-router-v2-pre (cde6e61)1

Open in CodSpeed

Footnotes

  1. No successful run was found on solid-router-v2-pre (8f9a755) during the generation of this report, so 0b74c9f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Comment on lines +104 to +121
batch: (fn) => {
fn()
// In Solid v2, signal updates are batched by default and only
// committed when the reactive system flushes. When batch() is
// called from outside a reactive context (e.g. from router.load()
// invoked directly in test code or before render), we must flush
// manually so that derived stores (memos) see the new values
// synchronously. Inside a reactive scheduling context (effects,
// onSettled, createTrackedEffect), flush() is not reentrant and
// will throw, so we catch and ignore that case since Solid will
// flush automatically when the effect completes.
try {
Solid.flush()
} catch {
// flush() throws when called from inside onSettled or
// createTrackedEffect — Solid will flush automatically there.
}
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we track depth to avoid flushing too much?

let depth = 0
batch: (fn) => {
  depth++
  fn()
  depth--
  if (depth === 0) {
    try {
      Solid.flush()
    } catch {}
  }
}

Also, just so I understand: memos keep carrying the old value until we flush?

Like if we do this:

const [foo, setFoo] = createSignal(1)
const double = createMemo(() => foo() * 2)
setFoo(2)
console.log(double())

This logs 2 and not 4?

If this is the case, then we might have other issues in router-core. I've tried using batch() every time we are setting multiple stores in the same tick, but I've never used it for a single setter. There might be places in router-core where we try to read a derived value just after setting it synchronously.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah that is my understanding

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok added the depth check now

@Sheraff
Copy link
Contributor

Sheraff commented Mar 21, 2026

Should we worry about the bundle size increase (router +3.93 KiB, start +9.53 KiB)? Or is it expected moving to solid v2?

(BTW, bundle-size deltas are always compared against main, whereas performance benchmarks are compared against the base branch of the PR, in this case solid-router-v2-pre, so it's a little confusing!)

@brenelz
Copy link
Contributor Author

brenelz commented Mar 21, 2026

Im a little concerned about bundle size. I expect a little bump from solid 2 but this is a decent amount

@brenelz brenelz marked this pull request as ready for review March 21, 2026 20:31
@birkskyum birkskyum changed the title Solid router main merge chore: sync main branch with store refactor Mar 22, 2026
@birkskyum birkskyum merged commit 7232349 into solid-router-v2-pre Mar 23, 2026
18 checks passed
@birkskyum birkskyum deleted the solid-router-main-merge branch March 23, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment