feat(db): add vector-clock time travel queries#2
Open
anweshabhattacharyya wants to merge 352 commits into
Open
feat(db): add vector-clock time travel queries#2anweshabhattacharyya wants to merge 352 commits into
anweshabhattacharyya wants to merge 352 commits into
Conversation
* feat(devtools): add memory usage visualizer for IndexedDB and WebRTC Introduces zerithdb-devtools collector package and Chrome DevTools extension with live charts, peak tracking, and per-peer buffer breakdown. Opt in via debug.devtools when calling createApp. Closes #270. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ci): resolve formatting issues and update ci workflows * fix: format --------- Co-authored-by: Atul Upadhyay <atul-upadhyay192@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Gemini CLI <gemini-cli@example.com>
* feat(graphql): auto-generate mutations for ZerithDB collections Adds zerithdb-graphql package that builds GraphQL SDL and mutation resolvers from CollectionSchema definitions, mapping insert/update/delete to app.db() calls. Closes #280. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(ci): resolve formatting issues and update ci workflows --------- Co-authored-by: Atul Upadhyay <atul-upadhyay192@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Gemini CLI <gemini-cli@example.com>
* Add Auth0 integration package and guide * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix(auth0): resolve typecheck errors and remove emojis in ci.yml --------- Co-authored-by: Atul Upadhyay <atul-upadhyay192@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Gemini CLI <gemini-cli@example.com>
…ckages (#469)
Critical fixes:
- sync-engine: bytesToBase64 crashes on large CRDT payloads (>64KB) due to
spread operator exceeding call stack — now processes in 8KB chunks
- sync-engine: encodeMessage/decodeMessage use single-byte name length header,
silently corrupting payloads for collection names >255 bytes — now uses
2-byte big-endian header
- network-manager: ICE candidates sent with wrong signaling type ('offer'/'answer')
instead of 'ice-candidate', breaking WebRTC connections in ~30% of network
conditions — now inspects data.type from simple-peer
High-severity fixes:
- react/index.tsx: useQuery called non-existent subscribe() and collection()
APIs, and passed raw id to delete() instead of QueryFilter — complete rewrite
using actual ZerithDB API with polling
- react/index.tsx: ZerithProvider never called dispose() on unmount, leaking
WebRTC connections, IndexedDB handles, and Yjs documents — added cleanup
- sdk/create-app.ts: redundant collection cache created inconsistent type
references — removed in favor of DbClient's internal cache
Medium-severity fixes:
- db-client: matchesFilter treated all non-null objects as operator specs,
breaking queries on nested object fields — now detects operators by $ prefix
- network-manager: autoReconnect config was ignored, reconnection always ran —
now checks config before scheduling
- cli/init.ts: chat and notes templates fell through to blank template — added
dedicated template generators
Co-authored-by: arpittkhandelwal <arpitkhandelwal810@gmail.com>
Embed a live code editor on the landing page where visitors can run insert/find queries and watch simulated P2P CRDT sync between two clients. Closes #240 Co-authored-by: Cursor <cursoragent@cursor.com>
refactor(playground): optimize client components and fix message over…
docs(infra): add bug report and feature request templates
feat(web): add dark mode theme toggle
chore(cli): improve init command success message with next steps
test(core): add unit tests for EventEmitter
docs: add Why ZerithDB section to README
refactor(db): add clear() alias to CollectionClient
* feat: add Electron offline-first starter template example * feat: add Electron offline-first starter template example * fix: update pnpm lockfile for Electron starter template * update pnpm lockfile
…(#900) * feat: add custom 404 page for routing errors * style: format custom 404 page with prettier * fix(sdk): replace @ts-ignore with @ts-expect-error in create-app.test.ts
…904) Refactor CollectionClient.find to use Dexie cursors instead of loading full collections into memory. This significantly reduces memory overhead and improves latency for large datasets by terminating scans early when a limit is reached. Tasks: - Refactor find() to use cursor-based iteration with .until() - Add QueryOptions with limit and offset support - Add pagination unit tests - Add query benchmark script
…() (#921) Co-authored-by: Laxmikanth <laxxmikanthyaga@gmail.com>
* feat(web): add visual schema builder MVP * fix(schema-builder): address review feedback * chore(lint): replace ts-ignore in sdk test * perf(web): throttle schema builder dragging
* feat: add Firebase/Supabase to ZerithDB migrator (#803) * Implement feature X to enhance user experience and optimize performance * fix: address Copilot review comments * chore: update uuid and vitest dependencies in package.json and pnpm-lock.yaml * feat: enhance migration CLI with structured commands for Firebase and Supabase * fix migrate lint and test issues * fix: use query filter value type
… #785 (#926) * feat(security): implement biometric-bound session keys #785 * chore(ci): trigger checks
Co-authored-by: Laxmikanth <laxxmikanthyaga@gmail.com>
Author
|
@arpittkhandelwal pls add the #761 issue back (adding time traveled queries back to db) which was originally assigned to me along with a workflow enabled on base repo so i can run the cl checks on my pr.Would be glad if u do the same. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces vector-clock based time travel capabilities to ZerithDB, enabling causal version tracking and historical query support. It also adds improvements to peer identity handling and extends core networking types.
Key Changes
🧠 Vector Clock Support
VectorClocktype to core networking layervector-clockmodule in core types🕒 Time Travel Queries (DB Layer)
time-travel.test.ts🌐 Network + Core Updates
NetworkMessageand peer-related structures🧪 Testing
📦 Build & Infra
Breaking Changes
None
Notes
coreanddbpackages.Checklist
pnpm build)tsc --noEmit)