Use the ORM React signal adapter instead of serializing table rows #58

Merged
michielbdejong merged 1 commit from codex/deep-signal-react-bridge into main 2026-10-19 14:33:20 +02:00

A single row edit currently triggers full-collection JSON serialization so the table projection can detect a change in its effect dependencies. The manual React render counter also duplicates the signal adapter already used by the ORM's own useShape hook.

useRuntimeShape now binds the existing subscription through useDeepSignal, and Projection depends on the adapter's changing data identity. This removes the row-collection snapshot and manual watcher/render counter. The graph/schema-aware subscription lifecycle, unpooled runtime-shape handling, error reporting, loading state and late-completion cleanup remain in place. The direct signal dependency is pinned to the exact version already used by the ORM; no SDK version is upgraded.

Related to #52. This removes its collection-serialization bottleneck; pagination, bounded rendering, relationship option construction and whole-collection Atomic ingestion remain outstanding. It complements #57's draft reconciliation and is based independently on current main.

Validation: frozen-lockfile installation, all 332 unit tests, six typechecks, all 12 production builds, and 28 browser tests across the Native, Atomic, Joep and template table apps passed. New coverage writes through distinct real ORM subscriptions against the browser test engine and checks incoming scalar edits, nested set additions/removals, and row creation/deletion. Existing coverage verifies local edits and runtime schema replacement. Broker-backed synchronization tests and large-collection benchmarks were not run.

A single row edit currently triggers full-collection JSON serialization so the table projection can detect a change in its effect dependencies. The manual React render counter also duplicates the signal adapter already used by the ORM's own `useShape` hook. `useRuntimeShape` now binds the existing subscription through `useDeepSignal`, and `Projection` depends on the adapter's changing data identity. This removes the row-collection snapshot and manual watcher/render counter. The graph/schema-aware subscription lifecycle, unpooled runtime-shape handling, error reporting, loading state and late-completion cleanup remain in place. The direct signal dependency is pinned to the exact version already used by the ORM; no SDK version is upgraded. Related to #52. This removes its collection-serialization bottleneck; pagination, bounded rendering, relationship option construction and whole-collection Atomic ingestion remain outstanding. It complements #57's draft reconciliation and is based independently on current main. Validation: frozen-lockfile installation, all 332 unit tests, six typechecks, all 12 production builds, and 28 browser tests across the Native, Atomic, Joep and template table apps passed. New coverage writes through distinct real ORM subscriptions against the browser test engine and checks incoming scalar edits, nested set additions/removals, and row creation/deletion. Existing coverage verifies local edits and runtime schema replacement. Broker-backed synchronization tests and large-collection benchmarks were not run.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ELFA/database-apps!58
No description provided.