Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d7b6a77
Solid js renderer rework
fezproof Jun 22, 2026
1b08472
Changeset
fezproof Jun 22, 2026
9b003c3
Fix inconsistent deep reconcile
fezproof Jun 22, 2026
0a3de98
feat(solid-db): migrate to Solid v2 RC
MAST1999 Aug 13, 2026
befc412
feat(solid-db): wholesale observer mode + external-source bridge
MAST1999 Aug 13, 2026
353219a
docs(solid-db): add v1 vs v2 benchmark comparison to changeset
MAST1999 Aug 13, 2026
353eb67
fix(solid-db): address CodeRabbit review findings
MAST1999 Aug 13, 2026
8ef8223
test(solid-db): distinguish stale vs fresh data in latest() revalidat…
MAST1999 Aug 13, 2026
26db56f
docs(solid-db): update Solid docs to V2 patterns
MAST1999 Aug 13, 2026
b3202f1
feat(solid-db): remove status flags and data property from accessor
MAST1999 Aug 13, 2026
134f6a7
fix(solid-example): update todo routes for v2 API
MAST1999 Aug 13, 2026
66e6ca4
chore(solid-db): update Solid v2 deps to latest rc
MAST1999 Oct 1, 2026
409d306
refactor(solid-db): align useLiveQuery with Solid v2 rc.13 reactivity…
MAST1999 Oct 1, 2026
aab4e97
docs(solid-db): align docs and changeset with the v2 rc.13 architecture
MAST1999 Oct 1, 2026
2441c85
fix(solid-db): drop late errors from superseded collections
MAST1999 Oct 2, 2026
76ea4c8
refactor(solid-db): extract detachObserversOf in external-source bridge
MAST1999 Oct 2, 2026
791b469
docs(solid-db): fix review findings in docs, changeset, and tests
MAST1999 Oct 2, 2026
a24f9b2
refactor(solid-db): non-suspensing data reads, opt-in readiness, #182…
MAST1999 Oct 2, 2026
33df973
fix(solid-db): code-review round 2 findings
MAST1999 Oct 2, 2026
23d4299
feat(solid-db): readiness returns the gated data
MAST1999 Oct 2, 2026
0edad35
feat(solid-db): rename readiness accessor to whenReady
MAST1999 Oct 2, 2026
64ff4a0
feat(solid-db): rename whenReady accessor to suspense
MAST1999 Oct 3, 2026
1ee9a0d
Revert "feat(solid-db): rename whenReady accessor to suspense"
MAST1999 Oct 3, 2026
3f6f6b7
feat(solid-db): rename whenReady accessor to loaded
MAST1999 Oct 3, 2026
520008b
docs(solid-db): teach loaded() as the <Loading> gate in docs and skill
MAST1999 Oct 3, 2026
68954df
feat(solid-db): adopt main's pooled eq-filter live queries
MAST1999 Oct 3, 2026
411af93
docs(solid-db): full docs and skill review pass
MAST1999 Oct 3, 2026
1ac3f94
chore(solid-db): update to Solid 2.0 stable
MAST1999 Nov 23, 2026
11e8255
refactor(solid-db): integrate main's core API into the Solid 2 adapte…
MAST1999 Nov 23, 2026
d7a3a1d
refactor(solid-db): materialize rows with a native Solid 2 row store
MAST1999 Nov 23, 2026
5af34db
test(solid-db): port the conformance driver and witnesses to Solid 2
MAST1999 Nov 23, 2026
46ce40f
fix(solid-example): make the todo app reactive on Solid 2, and pin a …
MAST1999 Nov 23, 2026
022a694
refactor(solid-db): serve rows as views of the Collection's own row
MAST1999 Nov 24, 2026
f6bae35
test(solid-db): cover a replaced Collection and a move that keeps the…
MAST1999 Nov 24, 2026
df6658a
docs(solid-db): describe the row view and record its receiving evidence
MAST1999 Nov 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .changeset/solid-v2-wholesale-refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
'@tanstack/solid-db': major
---

# Solid v2 migration

Migrates `@tanstack/solid-db` from Solid v1 to **Solid v2** (built and tested
against `[email protected]`). This is a **breaking** release: the peer
dependencies are now `solid-js: ^2.0.0` and `@solidjs/web: ^2.0.0`.

## Breaking changes

### Solid v2

Code consuming `@tanstack/solid-db` runs on Solid v2 and follows its rules:

- `Suspense` → `Loading`, `ErrorBoundary` → `Errored`
- Store APIs import from `solid-js` (not `solid-js/store`)
- Read props and rows where they are used (JSX, a memo, an effect, a
handler), never once in a component body

### Data reads no longer suspend

On Solid v1, reading the accessor suspended to the nearest `Suspense`
boundary until the query was ready. Now `query()` always returns the current
rows synchronously, including rows that synced before the collection is
ready (progressive sync, on-demand loading):

```tsx
const todosQuery = useLiveQuery((q) => q.from({ todos: todosCollection }))

// Rows render as they sync — no boundary required:
<For each={todosQuery()}>{(todo) => <li>{todo.text}</li>}</For>
```

Wrapping that read in a boundary no longer shows a fallback.

### New: `loaded`, the opt-in first-data gate

To wait for the first load, read `query.loaded()` inside a `<Loading>`
boundary. It throws `NotReadyError` until the query's first load has settled,
then returns the rows exactly like `query()`, so it feeds `<For>` directly:

```tsx
<Loading fallback={<div>Loading…</div>}>
<For each={todosQuery.loaded()}>{(todo) => <li>{todo.text}</li>}</For>
</Loading>
```

While `query.loaded()` waits on a changed input's new collection, Solid 2
holds the rest of that update: `query()` in the same component keeps
returning the rows from before the change, and `isPending(() =>
query.loaded())` reports the wait.

### Errors reach `<Errored>` as an `Error`

Reading the accessor throws when the query cannot serve data: its first load
failed, or its collection crashed. The cause is thrown as is when it is an
`Error`, and otherwise wrapped in an `Error` whose `cause` is the reported
value. A failure that reports no cause at all is thrown as an `Error` that
names the Collection: `Collection "<id>" failed to load`. A sync problem after
the first load does not throw: the rows stay and the problem shows in
`query.health` and `query.isSyncError`.

## Unchanged API

`status`, `state`, `collection`, `isLoading`, `isReady`, `isIdle`,
`isLoadingError`, `isCrashed`, `isCleanedUp`, `isSyncError`, and `health`
remain on the accessor, as on Solid v1. Each flag is its own reactive value.

## Behavior notes

- Identical eq-filtered queries share one pooled live-query Collection and
subscription; `collection` exposes its public view.
- A row keeps its identity by the live query's result key, never by its
public `$key`: derived results such as `unionAll` can publish different rows
that share one `$key` (#1825).
- A row is the Collection's own row behind a stable, read-only view: a nested
getter stays live, a function field stays a function, and an own `__proto__`
data field or a signed zero survives. A nested object is the Collection's
object itself, as it is in the React, Vue and Svelte adapters, so update
through the Collection. Writing to a row, freezing it or changing its
prototype throws a `TypeError` in strict mode.
- Reactivity is per field, and it is created as fields are read in tracking
scopes: a reader of one field is not re-run by a change to another, and a
publication costs an unchanged row one comparison.
- The array `query()` returns is one object for the life of the query. A
reader of the array, or of one of its slots, follows membership and order:
it re-runs when rows join, leave or move, and not when a value changes.
25 changes: 25 additions & 0 deletions docs/contributing/oracle-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -7472,6 +7472,31 @@ original 32-per-distinct-container work budget and preceding limits remain.
The [compatibility record](oracle-reviews/2026-11-09-dependency-compatibility.md)
separates original-code RED, repaired GREEN, hostile controls, and host limits.

The Solid 2.0 migration (2026-11-24) moves this owner off the store. A result
row is the Collection's own row behind one stable view, as the React, Vue and
Svelte adapters serve their rows: nothing is copied, and a signal is made for
a field by the first read of it in a tracking scope. The nine properties keep
their laws, statements, histories and budgets; only the driver's host calls
changed. Core evaluates a row's own accessors before it admits it, so an own
accessor is refused where a signal would hold its value and is served live to
every other read. Under the same oracle build, the fixed-seed reach reports
of the five `framework.solid.*` properties are identical to `main`'s. The
[Solid 2 record](oracle-reviews/2026-11-24-solid-2-row-view.md) holds source
fingerprints, RED, GREEN, mutants, the gap report, size and cost. Three items
stay open for a maintainer decision. First, the gap report cannot baseline
`solid.shared-graphs` on this host: the capture of `oracle-gaps` renders each
asserted value, which enumerates it, and the graph nodes the law asserts on
are its own counting proxies, served by reference, so the capture's
enumerations count against the law's budget (508 of a budget of 288 at shared
depth 8, where a plain Vitest run passes). That property is set aside for the
scan, and its mutants are unclassified by the tool. Second, no law of this
owner tells a nested copy from a nested reference: both designs pass every
law. A law is needed for one of the two designs, or an allowance for the
other. Third, the gap report credits a kill to a law only, and three sites
are reached by ordinary examples alone: an Array as the row itself, `in` on a
root row view, and the read-only view. Those examples reject the mutants
aimed there; laws for the sites, or an allowance, are a maintainer decision.

**Core source-field and destination preservation:** the maintainer authorized
fixing the sibling Core boundary in this PR. The existing context-transport
owner now imports its public-field model/grammar from
Expand Down
Loading