Skip to content

fix(deps): take Electron 43.7.5 so detached webviews stop blanking browser tabs - #23586

Merged
Jinwoo-H merged 1 commit into
mainfrom
bump-electron
Sep 28, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
bump-electron

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​10 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​9 $\color{#cf222e}{\Huge{\mathbf{−}}}$​10 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1

ELI5

Orca's browser tabs are Electron <webview> elements. The Electron version we ship (43.7.0) has a bug: if a loaded webview is taken off the page and put back, it comes back blank and can't be refreshed. This PR moves to Electron 43.7.5, which fixes it.

What Changed

  • electron 43.7.0 → 43.7.5 in package.json. The lockfile changes only the Electron entries.
  • Removed the minimumReleaseAgeExclude entry for electron@43.7.0. 43.7.5 was published 2026-09-23, so it already clears the 3-day release-age gate.
  • Raised the floor in electron-runtime-floor.test.ts from 43.7.0 to 43.7.4, so a downgrade can't bring the bug back.

What users see now: a browser tab that was showing a page goes blank, the refresh button does nothing, and only switching worktrees and back brings it back. This happens when React moves a webview in the page (moving a tab between groups, rebuilding the layout).

After: the tab keeps working when it's moved, refresh works, and Orca's in-place recovery for dead pages runs again.

Mechanism: in 43.7.0, removing a loaded webview from the page destroys its guest first. The element's disconnectedCallback then asks the main process to detach that guest, and the main process throws Invalid guestInstanceId (electron/electron#53989). The throw happens before the element resets its state, so it keeps the dead guest id and still believes it is attached. When it's put back, it creates no new guest. reload() fails on the dead id. The event listeners, including the destroyed listener Orca recovers from, have already been removed. The upstream fix (electron/electron#54097, released in 43.7.4) returns early when the guest is already gone.

Why

The bug is in Electron itself, so the correct fix is the upstream patch release. Working around it in Orca (catching the throw, forcing a remount) would put a second recovery path next to the one we already have, and it would still leave a dead guest behind. The other changes in 43.7.1–43.7.5 are crash, memory and security fixes, and none of them changes an API. The one timing change is that ready-to-show now fires for some hidden windows on Windows and Linux. Where Orca listens for it, it already has a fallback for when it never fires.

Linked Issue

Linear: STA-8757

Visual Proof

N/A: the change is a dependency version. The effect is shown by the before/after run of the upstream repro below.

Testing

Tested on macOS (arm64).

  • Upstream repro, before/after. A standalone Electron script loads a <webview> in a hidden window, removes it, puts it back, then calls reload():

    • 43.7.0: {"removeError":"Uncaught Error: Invalid guestInstanceId: 2","timedOut":true,"pass":false}. Removing it throws and the re-inserted webview never loads.
    • 43.7.5: {"firstId":2,"secondId":3,"reloadOk":true,"pass":true}. Putting it back creates a fresh guest, and reload() works.
  • pnpm install --frozen-lockfile passes with the minimal lockfile.

  • electron-runtime-floor.test.ts: 9/9. src/renderer/src/components/browser-pane: 115 files, 918 tests pass.

  • Browser end-to-end specs (tests/e2e/browser-*.spec.ts, electron-headless, on 43.7.5): 36 passed, 1 skipped, 1 failed. The failure is browser-pointer-input-dispatch "fast enough for real gestures". It fails the same way on 43.7.0: 5 of 5 runs on each version, about 8.3 ms per move and 16.6 ms per click. So it's a problem on this machine that already exists, not something the bump causes.

  • Windows and Linux: covered by CI packaging. A patch release doesn't change the ABI native modules are built against.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Security: 43.7.2, 43.7.3 and 43.7.5 bring Chromium, V8, Skia and PDFium security backports. Cross-platform: patch bump on all platforms, and the fix is in platform-independent JS. SSH, mobile and remote: no wire or protocol change. Backwards compatibility: same Electron major and Node version.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…owser tabs

Electron 43.7.0 threw 'Invalid guestInstanceId' from <webview>'s
disconnectedCallback for a loaded guest (electron/electron#53989), so a
webview React removed and re-inserted kept a dead guest id: the tab went
blank, reload did nothing, and the destroyed listener never fired.
43.7.4 (electron/electron#54097) returns early when the guest is gone.

Raises the runtime floor test to 43.7.4 so a downgrade cannot re-ship it.

Fixes STA-8757

@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 critical issues — one minor doc inconsistency.

Reviewed changes

  • Electron 43.7.0 → 43.7.5 (package.json, pnpm-lock.yaml) — exact pin; lockfile changes only the Electron entries, and the new electron@43.7.5 integrity matches npm's published dist.integrity.
  • Release-age exemption dropped (pnpm-workspace.yaml) — electron@43.7.0 removed from minimumReleaseAgeExclude; 43.7.5 (published 2026-09-23) clears the 3-day gate.
  • Runtime floor raised to 43.7.4 (config/scripts/electron-runtime-floor.test.ts) — constant, doc comment, and it.each rows updated so a downgrade can no longer ship the webview bug.

Verified against upstream: electron/electron#53989/#54097 and the 43.7.4 release notes match the described bug and fix, and the 43.7.5 notes are security backports only. The ready-to-show timing change (#54119) is handled — hidden Orca windows that could now emit it don't listen, and the revealed windows already have the fallback path.

ℹ️ Stated Electron floor in the glibc reference doc is below the enforced floor

docs/reference/linux-glibc-compatibility.md still says the floor is Electron ≥ 43.7.0 and that electron-runtime-floor.test.ts "fails the suite if the pin drops below the floor." The test floor is now 43.7.4, so a reader following that doc could pin 43.7.2 and expect it to pass. The doc is scoped to the glibc race, so the webview floor may belong elsewhere, but the pointer to the test is now inconsistent for 43.7.0–43.7.3.

Technical details
# Stale floor reference in linux-glibc-compatibility.md

## Affected sites
- `docs/reference/linux-glibc-compatibility.md:135` — section heading "Runtime floor: the `environ` race below glibc 2.41 (Electron ≥ 43.7.0)"
- `docs/reference/linux-glibc-compatibility.md:158` — "Do not downgrade Electron below 43.7.0 … `config/scripts/electron-runtime-floor.test.ts` fails the suite if the pin drops below the floor."
- `config/scripts/electron-runtime-floor.test.ts:15` — `MINIMUM_ELECTRON_VERSION = '43.7.4'` (the real floor; glibc 43.7.0 + webview 43.7.4)

## Required outcome
- The doc no longer implies 43.7.0–43.7.3 satisfy the enforced floor. Either note the second (webview `Invalid guestInstanceId`, fixed in 43.7.4) constraint and the combined floor, or soften the test-file sentence so it does not name a value below the constant.

## Open questions for the human
- Whether the platform-independent webview floor belongs in this glibc-specific doc or in a separate Electron-version reference.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: ec578144-bee3-4c42-b0e1-4ff5e0b9999e

📥 Commits

Reviewing files that changed from the base of the PR and between 3dd7d29 and bbf085f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • config/scripts/electron-runtime-floor.test.ts
  • package.json
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (1)
  • pnpm-workspace.yaml

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


📝 Walkthrough

Walkthrough

The minimum Electron runtime floor changes from 43.7.0 to 43.7.4. The tests reject versions below 43.7.4 and accept 43.7.4 and 43.7.5. The Electron devDependency changes to 43.7.5. The release-age exclusion for 43.7.0 is removed.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to bbf08

The Electron update includes the detached-webview fix, and the tested minimum and locked package version are consistent. No concrete merge-blocking risk is established.

Security Architecture Review

Security architecture risk: 🔵 Low · up to bbf08

The upgrade is intended to restore browser tabs after webviews are detached, and no introduced security issue was identified. The fix depends on Electron behavior that the changed version check does not itself verify.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The dependency update can affect desktop browser tabs that use Electron webviews. The changed test does not create a new attacker-controlled entrypoint.

Trust Boundaries and Controls

  • observed — Retained-page mounting parses renderer page identity, checks capacity, and rejects an existing attached page whose guest ID no longer matches. These are existing renderer controls, not controls added by the version bump.

Resilience and Maintainability Implications

  • observed — Visible-attachment detach is idempotent and only clears the attachment when it still owns the retained page. This supports ordinary pane moves but does not verify recovery after physical removal of a loaded guest.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Electron 43.7.5 dependency update and its purpose: preventing detached webviews from becoming blank.
Description check ✅ Passed The description follows the required template and explains the user impact, mechanism, rationale, linked issue, testing, platform considerations, and checklist status. The final validation command che…
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: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

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.

@Jinwoo-H
Jinwoo-H merged commit e8d8f2f into main Sep 28, 2026
43 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