Skip to content

fix(deps): upgrade Electron to 43.6 for startup performance and crash fixes - #19369

Merged
OrcaWin merged 2 commits into
mainfrom
OrcaWin/neil-electron-runtime-update
Sep 8, 2026
Merged

OrcaWin merged 2 commits into
mainfrom
OrcaWin/neil-electron-runtime-update

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 0 0 0 0
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​12 $\color{#cf222e}{\Huge{\mathbf{−}}}$​12 0

Ready for review, with baseline E2E failures disclosed. Final evidence and old/new controls: all three full-suite failures reproduce at the same assertions on unchanged Electron 43.4.1. 75,654 unit tests, packaging, 610 full-suite E2E tests, 47 SSH checks, 57 three-platform golden tests, 9 real WSL tests and 6 packaged mixed-version checks passed. The three baseline failures and 102 full-suite skips remain disclosed.

ELI5

Upgrade Electron 43.4.1 to 43.6.0 for faster child-process startup and fixes to IPC, native-addon, Linux startup and Windows shutdown crashes. Pin the reviewed version exactly. This PR is independent of the desktop parser and cloud dependency PRs and changes only package.json and Electron's lockfile entries/peer references.

Electron 44 was investigated and is not a safe version-only update for Orca: its clipboard migration causes 11 type errors in current Orca code and it drops macOS 12. Staying on 43 obtains many of the relevant fixes while preserving the existing clipboard API and operating-system floor.

What Changed

  • electron: ^43.4.1 → 43.6.0; the lockfile changes exactly one resolved package version.
  • Retain all other package versions, native patches, installer/rebuild policies and protocol definitions.
  • Use an exact version so later Electron updates receive a separate review.

Why

Benefit Upstream evidence Relevance to Orca
Faster Node-enabled child startup 43.5.0 notes, #53135 Orca launches Node-mode/utility processes. Local controlled measurement below confirms a gain in Node-mode child startup.
Lower IPC/contextBridge overhead and faster ASAR access #53018 Orca passes frequent renderer/main-process messages and ships packaged assets. Upstream improvement; no whole-app latency claim is made here.
Linux startup and tray repairs 43.5.0, 43.5.1 Fixes a tray regression specifically introduced in 43.4.1 and repairs Pango/fontconfig startup races after the startup optimization. Includes portal shortcut, D-Bus disconnect and initial window stall fixes.
Long-running IPC stability 43.6.0, #53420 Fixes crashes after large numbers of renderer IPC messages, relevant to long-running IDE sessions.
Native-addon GC safety #53393 Repairs node::ObjectWrap aborts with Node >=24.19. This is a reason to select 43.6 instead of stopping at 43.5, which introduced Node 24.19. Actual runtime is Node 24.20.0.
Window, bridge and child lifetime fixes 43.5.0, 43.5.1, 43.6.0 Fixes utility-process exit crashes on Windows, throwing getter crashes across contextBridge, oversized second-instance payloads and destroyed-window lifetime issues.
Security maintenance 43.6.0 Includes upstream Chromium/ANGLE/V8/Skia/Dawn backports and Node 24.20.0. The release notes do not enumerate all CVEs; this PR does not invent a vulnerability count or claim equivalence to Chromium 152.

Measured performance

macOS arm64, installed official Electron binaries, ORCA_BACKGROUND_LAUNCH=1 ELECTRON_RUN_AS_NODE=1. Each process executes only process.stdout.write(process.versions.electron) and exits. Two warmup iterations per version, then 15 measured runs per version, interleaved with alternating order. Measurements include process launch and exit, using a monotonic clock.

Runtime Median Min–max
43.4.1 64.60 ms 63.05–73.74 ms
43.6.0 43.19 ms 41.60–47.10 ms

About 33% lower median child-startup time on this machine. This is a small warm-cache process benchmark, not an app-startup, UI, GPU, Windows or Linux benchmark. Raw samples are retained locally in .context/electron-review/child-startup-benchmark.json.

Why Electron 44 is deferred

Checked the 44.2.0-tagged breaking-change document, not just unreleased main-branch documentation.

  1. clipboard.readText() becomes asynchronous; image/buffer helpers disappear; Linux selection clipboard moves to a namespace. Compiled Orca's node project against the published 44.2.0 electron.d.ts in a temporary tsconfig: 11 errors in clipboard-ipc-handlers.ts and clipboard-text-write-verify.ts. This affects image paste, Windows file references, Linux selection paste and synchronous write verification. It requires an implementation migration and real clipboard tests across platforms.
  2. Electron 44 requires macOS 13. The installed 43.6.0 app's LSMinimumSystemVersion remains 12.0. Dropping Monterey needs an explicit support-policy decision and updater/package validation.
  3. ANGLE is statically linked in 44, changing the GPU distribution/loading behavior. Orca's WebGL terminal needs renderer/GPU checks across platforms. A bounded upstream issue search found an open Linux/X11 resize regression discussion (#52866); that is a validation lead, not proof every 44 build is broken.
  4. 44 changes client-certificate handling for net/utility requests and validates navigation fetch headers more strictly. Browser/proxy/remote auth behavior needs review alongside the clipboard migration.
  5. 44.2 brings Chromium 152 and a protocol.handle → net.fetch throughput optimization, but these benefits do not make the above compatibility breaks safe. Many crash/startup fixes are explicitly backported to 43.

A bounded search for open issues explicitly mentioning 43.6.0 found none on September 7; absence of reports is not proof of no regressions.

Linked Issue

User-requested isolated Electron dependency investigation; no existing issue linked.

Visual Proof

N/A — no UI implementation change. Rendered CI checks and failure screenshots are linked in the evidence above; all browser compatibility controls are complete and linked above.

Testing

All automated tests/builds/launches used ORCA_BACKGROUND_LAUNCH=1.

  • Frozen-lockfile install and native rebuild policy completed on macOS arm64.
  • pnpm ensure:electron-runtime: the real installed Electron 43.6.0 loads the patched native PTY module.
  • Actual Electron ELECTRON_RUN_AS_NODE smoke: SQLite table write/read, native PTY shell output and clean exit, native @parcel/watcher filesystem event. No window created; no clipboard contents read or modified.
  • pnpm tc: passed.
  • pnpm run build:electron-vite: passed, including renderer boot-graph verification. Existing large-chunk warnings remain.
  • 13 targeted Vitest files: 189 passed, 1 skipped. Runtime packaging/install/cache/rebuild contracts, clipboard IPC/text/file/remote-file copy, foreground-activation policy and document-preview protocol. Clipboard tests are mocks/contracts, not real OS clipboard interaction tests.
  • Package formatting, changed-code quality gate and git diff --check: passed.
  • Reviewed lockfile: one package version change; no native patch, glibc shim or dependency churn.
  • Rendered Orca tests ran on isolated CI displays: three-platform golden passed; full-suite results and failures are linked above. The local $electron skill was unavailable, so no local foreground workaround was used.
  • Linux/Windows packaging, native runtime/lifecycle checks and the glibc-floor gate passed; real WSL paste and three-platform golden passed. No exhaustive GPU/IME/OS clipboard claim.
  • Live SSH lanes and packaged mixed-version browser compatibility passed. Both paired-browser full-suite failures reproduce on the unchanged base; see controls above.

Host tools ran under Node 26.6.0; the installed Electron embeds Node 24.20.0 / Chromium 150.0.7871.250. The supported-platform/runtime checks and baseline comparisons are complete; see qualified readiness evidence above. A successful local build and semver-compatible update are evidence, not a zero-regression guarantee.

Review

  • Independent of other dependency PRs; self-reviewed source/release notes and resolved package delta.
  • Cross-platform, folder/worktree and SSH ownership considerations assessed; no new host assumptions or wire changes.
  • Agent skill upstream boundary not applicable; no upstream skill code copied.
  • Existing contract tests used; no implementation-mirroring test added solely for a manifest change.

@OrcaWin

OrcaWin commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

Validation update for 8a9476a (supersedes the initial pending platform checklist):

Check Result / evidence
PR CI Passed: 75,654 tests, 423 skipped, eight Node 24 shards; typecheck/static checks; Git compatibility; cross-version wire contracts; Linux and Windows packaging. Linux glibc-floor gate verified 18 bundled native binaries.
Golden E2E, three platforms 57 passed: Linux 21, macOS 21, Windows 15. Actual app workflows cover onboarding, workspace/terminal interaction and file editing on isolated CI displays.
Real Windows + WSL 9 passed: agent launch and paste across shell changes, three repetitions.
Packaged mixed-version browser 6 passed: current/1.4.188 in both client/host directions, three repetitions.
Local macOS native/runtime Actual Electron 43.6 SQLite read/write, patched PTY spawn/output/exit and parcel watcher event passed; typecheck/build passed; 189 targeted tests passed, 1 skipped.
Full E2E + SSH Running. SSH browser-network route and localhost SSH terminal/hooks already passed. Remaining full-suite and Docker SSH results still need review.

The measured ~33% improvement is specifically a warm-cache Node-mode child-process startup benchmark, not whole-app performance. Electron 44 remains deferred for the documented clipboard API and macOS support breaks. This remains draft while the broad E2E run is assessed. No claim is made about exhaustive GPU/IME/OS testing.

@OrcaWin

OrcaWin commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

Additional combined-candidate validation (local, macOS arm64): merged #19361, #19369, #19377, #19378, #19362, #19380 and #19382 into local commit a610eca2303d94ad02199240c0d3afc11bc1757f. Blocked Tiptap #19376 is excluded. This supplements each PR's own exact-commit tests; it does not replace pending CI.

  • Combined frozen-lockfile install, full pnpm tc and pnpm run build:electron-vite: passed.
  • Existing editor + renderer i18n suites: 1,581 passed, 2 skipped; 227 files passed, 1 skipped.
  • 11 parser/query/URI/selector/plist/XML/browser-target/ID assertions: passed.
  • 5 real React Trans rendering/interpolation/language-switch assertions: passed.
  • 6 real headless Chrome sanitizer assertions on the combined installed DOMPurify: passed.
  • Actual combined Electron 43.6.0 / Node 24.20.0: native SQLite read/write, patched PTY spawn/output/exit and filesystem watcher event all passed.

All commands used ORCA_BACKGROUND_LAUNCH=1; no visible app window was opened. The only merge conflict was adjacent package.json entries: resolve by retaining both "dompurify": "3.4.14" and "electron": "43.6.0". Lockfiles merged automatically and the combined frozen install verified consistency. Leaf PR branches remain independent and unchanged; nothing has been merged into main.

@OrcaWin

OrcaWin commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

Full E2E log review: keep draft. This supersedes the earlier in-progress update for 8a9476afb8f5412377ed6a9c4bcbe7ef07ca57cd.

Full 14-shard E2E + SSH run: raw Playwright summaries show 610 passed, 3 failed, 102 skipped in the sharded suite. Separate SSH lanes passed 47 checks: browser network routing 3, Docker watcher/parking/remote journeys 43, localhost terminal/hooks 1.

Do not use the shard badges alone: GitHub reported shard 6 as successful, but its log contains two failed tests followed by The operation was canceled around its 30-minute limit. Those failures are counted here.

Failure Evidence / investigation
browser-tab.spec.ts:638, background link gesture New tab exists in the failure screenshot but retains URL-derived title instead of Linked destination within 10 seconds. Trace/screenshots. Unchanged-base browser suite and candidate browser suite running.
paired-cmd-j-host-qualified-tabs.spec.ts:15 Paired client did not mirror the host-qualified browser tab within 60 seconds.
paired-remote-browser-link-open-routing.spec.ts:224 Expected two remote browser panes after link opening, observed one.

Both paired failures are being exercised together on unchanged base and the candidate. No source/test assertions were modified. Passing 75,654 unit tests, packaging, three-platform golden, WSL and mixed-version runs remains useful evidence, but does not erase these failures. Readiness waits for the controls.

@OrcaWin

OrcaWin commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

Ready for review with baseline E2E failures disclosed, unchanged candidate 8a9476afb8f5412377ed6a9c4bcbe7ef07ca57cd. All three broad-suite failures now reproduce on the original base d0506bf5de0da490025d94c6507378be75194a60 / Electron 43.4.1.

Exact existing test / assertion Unchanged base Electron 43.6.0
browser-tab.spec.ts:638: background tab never reaches expected exact title (line 668) 10 passed, same 1 failed 10 passed, same 1 failed
paired-cmd-j-host-qualified-tabs.spec.ts:15: host-qualified browser tab not mirrored after 60 s Same null host ID Same null host ID
paired-remote-browser-link-open-routing.spec.ts:224: expected two remote panes after opening link Same expected-2 / received-1 Same expected-2 / received-1

The two paired-suite controls each failed the same two tests, at the same assertions. No tests or source were changed and these failures remain visible. This supports classifying them as existing baseline failures, not demonstrated new regressions from the dependency bump. It does not establish that those workflows work correctly on either version.

Completed validation at this candidate:

  • PR CI: 75,654 tests passed / 423 skipped, types/static checks, Git/wire contracts, Linux and Windows packaging; glibc-floor verification of 18 bundled native binaries.
  • Full sharded E2E: 610 passed / 3 baseline failures / 102 skipped. Raw logs are authoritative; shard 6's misleading successful badge was not treated as a pass.
  • Same run's dedicated SSH lanes: 47 passed, including Docker watcher/parking/remote journeys, network ownership and localhost terminal/hooks.
  • Three-platform golden: 57 passed (Linux 21, macOS 21, Windows 15).
  • Real WSL: 9 passed, three repetitions.
  • Packaged old/current browser interoperability: 6 passed, both directions, three repetitions.
  • Local actual Electron SQLite/PTY/watcher checks, types/build and 189 targeted tests passed. Combined with the other six merge candidates: 1,581 editor/i18n tests passed, parser/React/real-browser sanitizer assertions and native runtime smoke passed.

The isolated exact 43.6.0 pin obtains the documented crash/security fixes and measured ~33% Node-mode child-startup improvement while preserving macOS 12 and existing clipboard APIs. Electron 44 remains deferred for its concrete API/support breaks. This is a qualified merge recommendation based on the tested scope; the three pre-existing browser failures and unexercised exhaustive GPU/IME permutations are not erased by the passing checks. Nothing has been merged into main.

@OrcaWin
OrcaWin marked this pull request as ready for review September 7, 2026 23:23
@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 991be746-c874-4bf0-8575-f40a7f15af03

📥 Commits

Reviewing files that changed from the base of the PR and between 8a9476a and b8feb14.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The electron development dependency in package.json changed from ^43.4.1 to the exact version 43.6.0.

Merge Risk: ⚪ Minimal · up to b8feb

This pins Electron to 43.6.0. No unresolved current-change risk remains that blocks merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed and covers the change, rationale, compatibility assessment, visual proof, testing, and review evidence. However, it does not provide the mandatory linked issue and omits th… Add a valid linked issue under Linked Issue, such as Fixes #<issue-number>. Add the required Notes and Checklist sections, or explicitly document each applicable item and its validation status.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: upgrading Electron to version 43.6 for startup and crash fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is detailed and covers the change, rationale, compatibility assessment, visual proof, testing, and review evidence. However, it does not provide the mandatory linked issue and omits the template's Notes and Checklist sections.

  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Reviewed the single-commit Electron upgrade from ^43.4.1 to a pinned 43.6.0, touching only package.json and pnpm-lock.yaml.

  • electron ^43.4.1 → 43.6.0 — one resolved package bump; the caret is dropped deliberately so future Electron updates get a separate review.
  • Lockfile regeneration — the electron integrity hash changes; the two @electron-toolkit/preload/@electron-toolkit/utils entries are peer-qualifier-only renames (same 3.0.2/4.0.0 versions), so no dependency churn beyond Electron itself.

Verified the lockfile integrity hash (sha512-DqVKYV+FXheMSLTxcMQ+NCo78BDgpnToSyIzXctlUtbP3lRGEuoo1P+C2n/90rJ7TvHgzP0bpP9fbbXxp4noIg==) matches the published [email protected] tarball on the npm registry exactly, and the engines.node floor (>= 22.12.0) is unchanged. The @electron-toolkit/* peer references are updated consistently. No other version-pinning mechanism (ratchet, overrides, builder config) references the Electron version, and the scattered 43.4.1 literals in crash-reproduction comments and test fixtures remain accurate as historical context or arbitrary keying examples — none need to move with this bump.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@OrcaWin

OrcaWin commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

Merge preparation update: refreshed this PR against main after merging #19361, #19362, #19377, #19378, #19380 and #19382. New head: b8feb1464c8baffc6e9d79a447b5571b1bdd9d50.

Resolved the adjacent manifest conflict by retaining both reviewed pins, DOMPurify 3.4.14 and Electron 43.6.0. The complete dependency files match the previously tested combined candidate exactly. The final PR diff against current main is still only Electron's one manifest line and 22 lockfile lines; no application/test changes were introduced by the conflict resolution.

Fresh local validation at the new head passed:

  • Frozen install and full pnpm tc.
  • Production Electron build and renderer boot-graph check.
  • 1,581 tests passed / 2 skipped; 227 files passed / 1 skipped (existing editor + renderer i18n suites).
  • Actual Electron 43.6 SQLite read/write, patched native PTY output/exit and filesystem watcher events.
  • git diff --check and dependency-delta review.

Fresh full PR CI is running. Merge will wait for its checks. The original supported-platform and baseline-control evidence remains in the previous comments; no tests were weakened or skipped to clear the merge.

@OrcaWin

OrcaWin commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

Refreshed head b8feb1464c8baffc6e9d79a447b5571b1bdd9d50 now passes all PR CI checks, including both packaging lanes and all eight Node 24 shards.

Attempt 1 had a single CPU timing failure in browser-history-match.performance.test.ts: 3.576 ms versus the 2 ms cold-corpus budget. This test runs under the unchanged Node 24 host, not Electron, and the measured implementation and corpus are unchanged by this PR. A single repeat of the failed shard on the identical commit passed. The initial timing failure remains visible in attempt 1; no code, threshold or test expectation was changed.

Fresh local types/build, 1,581 editor/i18n tests and actual Electron native-module checks also passed, as posted above. Merging under the user's explicit authorization, retaining the previously documented baseline browser E2E qualifications.

@OrcaWin
OrcaWin merged commit de0a91b into main Sep 8, 2026
52 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant