fix: hydrate worker DB in server mode + fix LadybugDB getAll API mismatch#404
Conversation
…atch (abhigyanpatwari#398) Fix server/bridge mode leaving the web UI with 0 nodes and broken Query/Processes/embeddings by hydrating the worker-side LadybugDB and BM25 indexes after loading graph data from the backend. Also fix LadybugDB QueryResult API mismatch where result.getAll() does not exist in some @ladybugdb/wasm-core versions — falls back to getAllObjects() or getAllRows().
|
@fabianhug is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
|
lmk if anything needs to be changed for it to be approved, it's breaking and you can't connect your local repos, so a quick fix would be great |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude review this |
|
Claude finished @abhigyanpatwari's task in 2m 1s —— View job Code Review
Summary: The fix correctly identifies and addresses a real bug — the worker-side DB was never hydrated in server mode. The implementation is generally clean with good error handling. A few issues worth addressing:
|
CI Report✅ All checks passed Pipeline
Tests
✅ All 3439 tests passed across 998 files 20 test(s) skipped
Coverage
📋 Full run · Coverage from Ubuntu · Generated by CI |
|
Thanks for reporting and quick fix. Merging it |
|
always, keep up the good work @abhigyanpatwari |
* main: (67 commits) fix(server): allow private/LAN network origins in CORS (abhigyanpatwari#390) fix(ingestion): calculate confidence per resolution tier for heritage/MRO edges (abhigyanpatwari#412) fix(lbug): retry on DB lock with session-safe cleanup (abhigyanpatwari#325) fix(analyze): address review — rename --no-git to --skip-git, fix stale cache fix(analyze): address Copilot review — ESM import, CLI option, .gitignore guard docs(schema): add Community and Process node properties to cypher tool description (abhigyanpatwari#411) fix(analyze): allow indexing folders without a .git directory (abhigyanpatwari#384) token trunking updated mahalanobis threshold to be multi-dim aware fix: clarify that ORT CUDA binaries are linux/x64 only updating workflow verbage fixed prop cutoff issue for pr/issue filtering fix: update symbol and relationship counts in documentation fix: address PR abhigyanpatwari#409 review findings (P0-P3) and simplify import resolution API refactor: unify language dispatch with compile-time exhaustive tables feat: implement cross-file binding propagation for multiple languages fix: hydrate worker DB in server mode + fix LadybugDB getAll API mismatch (abhigyanpatwari#398) (abhigyanpatwari#404) docs: add gitnexus-stable-ops to community integrations fix: register Section in NODE_TABLES and NODE_SCHEMA_QUERIES (abhigyanpatwari#401) feat: add markdown file indexing (headings + cross-links) (abhigyanpatwari#399) ...
…atch (abhigyanpatwari#398) (abhigyanpatwari#404) Fix server/bridge mode leaving the web UI with 0 nodes and broken Query/Processes/embeddings by hydrating the worker-side LadybugDB and BM25 indexes after loading graph data from the backend. Also fix LadybugDB QueryResult API mismatch where result.getAll() does not exist in some @ladybugdb/wasm-core versions — falls back to getAllObjects() or getAllRows().
Summary
Fixes #398 — server/bridge mode leaves the web UI with 0 nodes, broken Query/Processes tabs, and
Database not readyerrors.Root cause: When connecting via
gitnexus serve, the main thread builds the React-side graph but never hydrates the worker's LadybugDB or BM25 indexes. All features that depend on the worker-side DB (Query, Processes, Nexus AI, embeddings) fail.Secondary bug:
result.getAll()does not exist in some@ladybugdb/wasm-coreversions, causingTypeError: result.getAll is not a functionon every Cypher query.Changes
1. Worker hydration for server mode (
ingestion.worker.ts)hydrateFromServerData()method that takes server-loaded nodes, relationships, and file contents and:KnowledgeGraphin the workercurrentGraphResultfor the agent context builder2. Call hydration after server connect (
App.tsx,useAppState.tsx)handleServerConnectandswitchReponow callhydrateWorkerFromServer()after setting the React graphprogressis cleared after successful server connection (fixes status bar stuck on "Processing...")3. LadybugDB
getAllAPI compatibility (lbug-adapter.ts)result.getAll()calls now fall back togetAllObjects()→getAllRows()→[]@ladybugdb/wasm-coreversionsRepro (before fix)
gitnexus analyzea repositorygitnexus serveAfter fix
getAll is not a functionerrors