Skip to content

feat: add framework-agnostic store engine - #63

Open
Akryum wants to merge 20 commits into
mainfrom
feat/core-data-store
Open

Akryum wants to merge 20 commits into
mainfrom
feat/core-data-store

Conversation

@Akryum

@Akryum Akryum commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator
  • Move cache storage and merge logic into core store-engine modules
  • Bridge Vue cache through fine-grained signals for item, list, and relation updates
  • Add store-engine tests for writes, layers, observers, tombstones, serialization, and CRDT behavior
  • Add Vue cache granularity coverage and legacy benchmarks

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new framework-agnostic storage engine under packages/core/src/store-engine and refactors the Vue package to act as a thin reactivity bridge over it. This architecture provides fine-grained reactivity, ensuring that single-item writes do not trigger full collection list re-runs. The review feedback highlights several critical issues, including memory leaks in the Vue cache bridge (due to signals not being dropped on item eviction or cache reset), a bug in index mapping where explicit null updates are ignored, a bug in replaceModuleContents when handling arrays, a performance bottleneck in clearCollection due to multiple synchronous flushes, and dangling timers in the staggering controller upon engine disposal.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/vue/src/cache.ts Outdated
Comment thread packages/vue/src/cache.ts Outdated
Comment thread packages/core/src/store-engine/resolve.ts Outdated
Comment thread packages/core/src/store-engine/serialize.ts Outdated
Comment thread packages/core/src/store-engine/engine.ts
Comment thread packages/core/src/store-engine/queue.ts Outdated
Comment thread packages/core/src/store-engine/engine.ts
@pkg-pr-new

pkg-pr-new Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@rstore/connector-toolkit

npm i https://pkg.pr.new/directus/rstore/@rstore/connector-toolkit@63

@rstore/core

npm i https://pkg.pr.new/directus/rstore/@rstore/core@63

@rstore/devtools

npm i https://pkg.pr.new/directus/rstore/@rstore/devtools@63

@rstore/directus

npm i https://pkg.pr.new/directus/rstore/@rstore/directus@63

@rstore/monospace

npm i https://pkg.pr.new/directus/rstore/@rstore/monospace@63

@rstore/nuxt

npm i https://pkg.pr.new/directus/rstore/@rstore/nuxt@63

@rstore/nuxt-directus

npm i https://pkg.pr.new/directus/rstore/@rstore/nuxt-directus@63

@rstore/nuxt-drizzle

npm i https://pkg.pr.new/directus/rstore/@rstore/nuxt-drizzle@63

@rstore/nuxt-monospace

npm i https://pkg.pr.new/directus/rstore/@rstore/nuxt-monospace@63

@rstore/nuxt-multiplayer

npm i https://pkg.pr.new/directus/rstore/@rstore/nuxt-multiplayer@63

@rstore/nuxt-multiplayer-server

npm i https://pkg.pr.new/directus/rstore/@rstore/nuxt-multiplayer-server@63

@rstore/offline

npm i https://pkg.pr.new/directus/rstore/@rstore/offline@63

@rstore/shared

npm i https://pkg.pr.new/directus/rstore/@rstore/shared@63

@rstore/vite-directus

npm i https://pkg.pr.new/directus/rstore/@rstore/vite-directus@63

@rstore/vite-monospace

npm i https://pkg.pr.new/directus/rstore/@rstore/vite-monospace@63

@rstore/vue

npm i https://pkg.pr.new/directus/rstore/@rstore/vue@63

commit: ebff023

@Akryum
Akryum force-pushed the feat/core-data-store branch 2 times, most recently from 8cbc12c to a746816 Compare June 26, 2026 08:56
@Akryum
Akryum force-pushed the main branch 2 times, most recently from fe9642d to 79c6168 Compare July 3, 2026 22:40
@Akryum
Akryum force-pushed the feat/core-data-store branch 2 times, most recently from 851370b to a39ad93 Compare August 29, 2026 09:39
@Akryum
Akryum force-pushed the feat/core-data-store branch from a39ad93 to 451bd8c Compare September 11, 2026 13:32
Akryum and others added 17 commits September 15, 2026 12:15
- Move cache storage and merge logic into core store-engine modules
- Bridge Vue cache through fine-grained signals for item, list, and relation updates
- Add store-engine tests for writes, layers, observers, tombstones, serialization, and CRDT behavior
- Add Vue cache granularity coverage and legacy benchmarks
…e cases

- Release item signals + engine observers on delete/GC/reset to stop
  unbounded subscription growth; add SignalRegistry.size() introspection
- Drop an item from its index bucket when an indexed field is cleared to
  null, while preserving partial-update inheritance for untouched fields
- Truncate array module state in place on setState/clear to avoid stale
  slots and holes
- Batch clearCollection deletes behind a single flush (was O(N) observer
  dispatches)
- Cancel the staggering budget-reset timer on engine dispose so it can't
  re-drive a torn-down engine

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Akryum
Akryum force-pushed the feat/core-data-store branch from 451bd8c to 60bcbd0 Compare September 15, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant