Conversation
Build with @solidjs/babel-plugin (the Solid 2.0 compiler; rc.9 moved delegated handlers to the `_$$` key, so the compiled output must match the runtime), test under vite 8 for the Solid packages, examples and the vite integration (scoped overrides; @solidjs/vite-plugin next.32+ needs vite ^8), and raise the solid-js / @solidjs/web peer floor to rc.9. useQuery: setup-time snapshots (meta projection seed, mount counts) read the cache through lookupQuery() instead of query(), which reads the version signal. Under hydration, priming writes that signal during setup and Solid holds a write made during the pass: a computation in the pass that reads it is served the pre-write value and replays at release. For the hook's derived nodes that is the takeover; for the computation instantiating the component (a <Loading> boundary's children) it was a remount that re-created the hydrated component as a client render, so cache writes reached the DOM while the stream was open. Tests: four assertions adapted to rc.9's committed-frame model (a write becomes visible at flush, to every channel): status/isPending read the held frame mid-hold, isFetching is the pending probe; the mutation settle commits fresh data and the lifted overlay in one frame. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit 24d8bfe
☁️ Nx Cloud last updated this comment at |
Lockstep update for
solid-js/@solidjs/web2.0.0-rc.9 and@solidjs/vite-plugin3.0.0-next.44. Surfaced by Solid's solid-query release gate once it compiled the adapter with a matching compiler (solidjs/solid#3534): five tests, one adapter fix, four assertion updates.Toolchain
_$$<type>key; the fixture'sbabel-preset-solidstill emitted$$<type>, so every click in the suite was dead. The three packages' tsup configs now compile JSX with@solidjs/babel-plugin(the Solid 2.0 compiler), and the peer floor issolid-js/@solidjs/web>=2.0.0-rc.9since compiled output and runtime moved together.@solidjs/vite-pluginnext.32+ requiresvite ^8(defaultExternalConditions). The repo stays on vite 6;pnpm-workspace.yamloverridesviteto^8.3.0for the three Solid packages, the five vite-based Solid examples andintegrations/solid-vite. The examples needed it anyway: their^2.0.0-rc.0runtime already resolves to rc.9 while their compiler pin emitted$$.viteststays at the root's single version — vite is a peer of vitest, so pnpm gives the Solid packages a vite-8 instance of the same 4.1.2 (a per-package vitest version bump was tried first; twovitestversions break@testing-library/jest-dom's module augmentation, which TypeScript resolves per package version). Sherif ignores onlyvite.Adapter fix — hydration
hydration.test.tsx › cache writes during the open stream commit when hydration completesfailed:#headershowedupdated-clientmid-stream instead of holdingheader-serveruntil the feed boundary landed.Cause:
useQuery's two setup-time snapshots (the meta projection's seed,mountedAt) read the cache throughquery(), which reads the hook'sversionsignal — after priming had already bumped it in the same setup. Solid holds a write made during the hydration pass: a computation in the pass that reads the written signal, tracked or not, is served the pre-write snapshot and replays at release. For the hook's own projections that replay is the takeover. Here the ambient computation was the<Loading>boundary's children computed, so the replay re-evaluatedprops.children, re-createdHeaderQueryoutsidehydrating(no wrappers, live compute) and disposed the hydrated instance. rc.8 passed by accident — the boundary computed predated the lazily marked snapshot scope; solidjs/solid#3504 marks the scope at the root first, which is correct.Fix:
lookupQuery()— client sync + cache get/build, noversion()— for the setup snapshots;query()=version(); lookupQuery()for the derived nodes. Ruled by-design on the Solid side: solidjs/solid#3542.Test adaptations — rc.9's committed frame
"A write becomes visible at flush — to every channel" (solidjs/solid#3473). The meta projection's status flip is held in the same batch as the pending data node, so the committed faces read one frame mid-hold; the pending probe (
isFetching) is the channel for "a new answer is outstanding". rc.8 leaked the staged meta write, and these tests pinned the torn frame.useQuery › should not fetch when switching to a disabled query:status: 'success',fetchStatus: 'idle',isFetching: true, DOM holdsdata: 0.useQuery › resetQueries×2:isPending: falsemid-hold with the previous frame up; the disabled reset keepsfetchStatus: 'idle'as the "nothing in flight" face.useMutation › settles atomically with invalidation-triggered refetches: the optimistic frame releases once nothing authoritative is left to wait on — fresh data and the lifted overlay commit in one frame,['0:false', '0:true', '1:false'].Verification
solid-query366 passed / 1 skipped (pre-existing),solid-query-devtools33,solid-query-persist-client7 — exit 0, no unhandled rejections (the 670CancelledErrors and the OOM in the gate run were downstream of the five).test:sherif,test:knip,test:eslint,test:types(TS 5.4–6.0),test:build,buildgreen for the three packages;examples/solid/basicandintegrations/solid-vitevite buildon vite 8.Made with Cursor