fix(electron): resolve preload bridge, sqlite native binding, and mount ingest modal - #55
Merged
Merged
Conversation
…and mount IngestModal - electron/main.ts: resolve preload whether building to .mjs or .js - electron.vite.config.ts: output CommonJS index.cjs for main and externalize dependencies cleanly - core/store/db.ts: resolve Electron-specific native addon when running in Electron runtime, maintaining compatibility with Node test runtime - src/app/App.tsx: mount IngestModal on Sidebar 'Create' action and auto-open paper upon ingest - tests: full vitest suite passing (153/153) and verified with Playwright live Electron harness Closes #51 Closes #52 Closes #53
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.
User outcome
Users can launch the Electron app in development (
npm run dev) or production build, initialize and query the local SQLite database without crashes, and click "Create" in the sidebar to open the paper ingest modal and import research papers.Acceptance criteria
preload.mjs/index.js).window.vellumbridge and renderer can communicate over IPC without errors.better-sqlite3native addon loads without ABI or Node-API version errors on both Electron and Node test environments.IngestModal, allowing users to enter a DOI/URL/arXiv identifier and ingest papers directly into the active workspace.Automated verification
Ran the complete test suite:
Ran production build:
Live Electron verification
Launched Electron in headless display environment with Playwright and verified:
window.vellum.listPapers()over IPC bridge[]papers table query without any segfault or IPC failureVisual and console evidence
Limitations and follow-ups
Independent review
All changes respect the strict storage split (SQLite for state, filesystem for paper bytes) and maintain context isolation in Electron.
Closes #51
Related: #52, #53