Status
Deferred. PR #103 attempted Electron 33.2.1 → 39.8.x and was closed because better-sqlite3@11.10.0 ships no prebuilt for Electron 39's Node ABI on darwin-arm64.
What this fixes when done
17 dependabot Electron alerts (4 high, 12 medium, 1 low):
- 4 high: use-after-free in PowerMonitor / WebContents permission callbacks / offscreen child window paint / renderer command-line switch injection
- Others: AppleScript injection, IPC spoofing, origin permission scoping, etc.
Plus brings Chromium from 130 → 142, unlocking newer CSS (@scope, @container, anchor positioning, text-wrap: balance mature) — relevant for our generated artifacts.
Three solutions, pick one when picking back up
A. Wait for better-sqlite3 upstream
Watch https://github.com/WiseLibs/better-sqlite3/releases for an Electron-39 prebuild. Zero work when it ships. Cost: indefinite delay.
B. Source-compile via @electron/rebuild postinstall
Replace prebuild-install path in apps/desktop/scripts/install-sqlite-bindings.cjs with a compile step. Cost: every dev install now needs Python + node-gyp + Xcode CLT; first install slow (~60s); brittle on user machines.
C. Switch to node:sqlite (Node 22.5+ built-in)
Rewrite apps/desktop/src/main/snapshots-db.ts to use Node's built-in sqlite module. Cost: ~50 LOC change; some sqlite behavior microdiffs to verify; no native binding ABI problem ever again.
Recommendation: C when revisiting. Pre-1.0 (pre-release), the cleanup pays off forever. Persistence is core; we want it to stop being a versioning hot zone.
Trigger to revisit
- Targeting v0.2 release publicly OR
- A specific high CVE becomes exploitable in our threat model OR
- We want a Chromium 142+ CSS feature for generated artifacts (e.g. anchor positioning for popovers/tooltips)
Hard constraint
Whichever option ships, must NOT use Electron 41.x — CLAUDE.md ban (cross-origin isolation regression).
Related
Status
Deferred. PR #103 attempted Electron 33.2.1 → 39.8.x and was closed because
better-sqlite3@11.10.0ships no prebuilt for Electron 39's Node ABI on darwin-arm64.What this fixes when done
17 dependabot Electron alerts (4 high, 12 medium, 1 low):
Plus brings Chromium from 130 → 142, unlocking newer CSS (
@scope,@container, anchor positioning,text-wrap: balancemature) — relevant for our generated artifacts.Three solutions, pick one when picking back up
A. Wait for
better-sqlite3upstreamWatch https://github.com/WiseLibs/better-sqlite3/releases for an Electron-39 prebuild. Zero work when it ships. Cost: indefinite delay.
B. Source-compile via
@electron/rebuildpostinstallReplace
prebuild-installpath inapps/desktop/scripts/install-sqlite-bindings.cjswith a compile step. Cost: every dev install now needs Python + node-gyp + Xcode CLT; first install slow (~60s); brittle on user machines.C. Switch to
node:sqlite(Node 22.5+ built-in)Rewrite
apps/desktop/src/main/snapshots-db.tsto use Node's built-in sqlite module. Cost: ~50 LOC change; some sqlite behavior microdiffs to verify; no native binding ABI problem ever again.Recommendation: C when revisiting. Pre-1.0 (pre-release), the cleanup pays off forever. Persistence is core; we want it to stop being a versioning hot zone.
Trigger to revisit
Hard constraint
Whichever option ships, must NOT use Electron 41.x — CLAUDE.md ban (cross-origin isolation regression).
Related