[Feature] Electron 21→43 upgrade, preload bridge fix, and CI modernization - #57
Merged
Conversation
Baseline snapshot of DropPoint's commit history, current architecture (with Mermaid component/sequence diagrams), a critique of known architecture issues, the open-issue backlog grouped by theme, and a tentative future-architecture diagram for the next roadmap phase (move mode, configurable shortcuts, Electron/security modernization, finishing instance history). Open questions are tracked for follow-up.
Dependency bumps: - electron 21.3.1 -> 43.2.0 - electron-builder 23.0.2 -> 26.15.3 - electron-updater 4.3.9 -> 6.8.9 - electron-store held at ^8.x (v9+ is ESM-only) Blocker fix: File.path was removed in Electron 32+, which breaks the core drag-in path. Dropped-file paths now resolve via webUtils.getPathForFile, exposed through the preload contextBridge and called from renderer/droppoint.js. CI: bump actions to v4, Node 18 -> 22 (Electron 43 needs >=22.12), and replace the archived samuelmeuli/action-electron-builder with explicit npm ci + build/release steps (release still gated on v* tags). Add a smoke_test job running under xvfb. Tests: add a Playwright _electron smoke test that boots the app and asserts the shelf window opens and the getPathForFile bridge is exposed. Cleanup: remove the dead <webview> tag from settings.html (webviewTag was never enabled) and document the raised OS floor (Windows 10+, macOS 12+) in the README. Note: nodeIntegration hardening was intentionally deferred; it is a suspected deliberate workaround and needs its own investigation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfJxwvs65kVRNnVym5UsYe
Electron 43's post-install runs @electron/get v5 (pure ESM), which does a bare ESM import of the CommonJS sumchecker package. Node's newer "Current" releases (e.g. 26.x) have a legacyMainResolve regression that fails to resolve sumchecker's legacy `main` field, crashing the binary download so `npm start` reports "Electron failed to install correctly." Add an engines floor (>=22.12.0, matching @electron/get) and an .nvmrc pinning Node 22 LTS, and document the requirement in the README so this footgun is caught early instead of surfacing as a cryptic ESM error. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfJxwvs65kVRNnVym5UsYe
On Windows the tray icon was built by resizing a nativeImage created from the multi-resolution droppoint.ico down to 16px. On HiDPI Windows displays this renders a blank (but still clickable) tray slot. Pass the .ico through untouched on Windows so the OS selects the correct frame for the display DPI; keep the 16px resize for macOS/Linux, which expect a small image. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfJxwvs65kVRNnVym5UsYe
Builds (all 3 OSes) failed electron-builder 26 schema validation: win.publisherName is no longer allowed on WindowsConfiguration (additionalProperties: false; it moved to the Windows signing config). Removed it — the app doesn't code-sign, so it had no effect. smoke_test timed out because the Electron binary was downloading during the test, exceeding the 60s timeout. Pre-download the binary in a dedicated CI step before running the test, and raise the Playwright timeout to 120s for cold-runner launch margin. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfJxwvs65kVRNnVym5UsYe
The smoke test hung the full timeout under CI because Electron's transparent shelf window wedges the GPU/sandbox process under xvfb, so _electron.launch() never settled. Launch with --no-sandbox, --disable-gpu, --disable-dev-shm-usage and --disable-software-rasterizer (standard CI flags), and pipe the Electron main-process stdout/stderr into the test output so any further failure is diagnosable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfJxwvs65kVRNnVym5UsYe
Build jobs packaged successfully but failed at the end trying to publish
to GitHub Releases ("GH_TOKEN not set"). push-triggered runs don't get a
token and shouldn't publish — only the tag-gated release step should.
Set the build script to `electron-builder --publish never`; `release`
keeps `--publish always`.
Smoke test: the app boots fine (logs confirm the shelf Instance is
created), but getShelfWindow called `.title()` on the hidden splash
BrowserWindow, which loads no content and hangs the eval, timing out the
whole test. Match the shelf by `win.url()` (no in-page eval) instead, and
read title + preload-bridge presence in a single evaluate after
domcontentloaded.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NfJxwvs65kVRNnVym5UsYe
Playwright's _electron CDP driver hung the full timeout (teardown included) introspecting DropPoint's transparent, always-on-top shelf window under a bare xvfb X server with no window manager. The app itself boots fine — CI logs show it logging "Instance ID" every run. Replace the CDP approach with a robust process-level boot check: spawn the app, wait for its own "Instance ID" ready-log on stdout (proving it launched and created the shelf without crashing on Electron 43), then SIGKILL it. Add a fast source-level guard that the File.path -> webUtils.getPathForFile fix stays wired in preload.js and droppoint.js. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfJxwvs65kVRNnVym5UsYe
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.
Context
This PR addresses the critical blocker introduced by Electron 32+ removing the
File.pathproperty, which breaks drag-in/drag-out functionality on the upgraded runtime. It also modernizes the CI pipeline and adds the first automated test coverage for the boot path.Resolves the zero-test gap and unblocks the app on Electron 43.
Description of the Change
Electron & Dependencies:
21.3.1→43.2.0electron-builderfrom23.0.2→26.15.3electron-updaterfrom4.3.9→6.8.9electron-storeat^8.x(v9+ is ESM-only; full CommonJS→ESM migration deferred)>=22.12.0(Electron 43 minimum)Critical Blocker Fix —
File.pathRemoval:renderer/droppoint.jsnow resolves dropped-file paths viawindow.electron.getPathForFile(f)instead of the removedFile.pathpropertywebUtils.getPathForFilethrough the preload contextBridge insrc/preload.jsCI Modernization:
samuelmeuli/action-electron-builder@v1with explicitnpm ci+npm run build/npm run releasestepscheckout@v1/setup-node@v1→@v4v*tags; added conditional logic to separate build vs. build+release flowsSmoke Test Added:
test/smoke.spec.js(Playwright_electron) boots the app and verifies:getPathForFilebridge is exposed onwindow.electronxvfb-run(headless display)npm testscript andplaywright.config.jsFile.pathblocker fixMinor Fixes:
.icofiles (let OS pick the DPI-appropriate frame) while still resizing for macOS/Linux<webview>tag fromstatic/settings.html(never functional).nvmrc(Node 22) and updated.gitignorefor Playwright artifactsDeliberately Deferred:
nodeIntegration: true→false+contextIsolation/sandboxhardening (still functional on v43; flagged as likely intentional workaround in Handling executable files and Electron.js version upgrade #51, left for separate investigation)Verification Process
playwright test --list)Release Notes
DropPoint now runs on Electron 43 (up from 21). Fixed a critical bug where drag-in would fail on Electron 32+ due to the removal of the
File.pathproperty. Added the first automated smoke test to guard the boot path and preload bridge.https://claude.ai/code/session_01NfJxwvs65kVRNnVym5UsYe