Skip to content

feat(desktop): upgrade to Electron 41 and enable macOS Touch ID passkeys - #3460

Merged
benjaminshafii merged 2 commits into
fix/browser-passkeys-context-menufrom
chore/electron-41-passkeys
Aug 3, 2026
Merged

feat(desktop): upgrade to Electron 41 and enable macOS Touch ID passkeys#3460
benjaminshafii merged 2 commits into
fix/browser-passkeys-context-menufrom
chore/electron-41-passkeys

Conversation

@benjaminshafii

Copy link
Copy Markdown
Member

Stacked on #3459 — review/merge that first.

Why an upgrade is required

Electron gained a working WebAuthn platform authenticator only in 41.5.0, via app.configureWebAuthn. Verified by diffing docs/api/app.md across tags: absent in 40.x and 41.0.0, present from 41.5.0. OpenWork was on 35.7.5, which has no authenticator at all — its ElectronWebAuthenticationDelegate implements only SupportsResidentKeys(). No Chromium feature flag changes this.

35.7.5 → 41.10.3 (Chromium 146, Node 24, native ABI 141 → 145). Picked ≥ 41.6.0 because 41.6.0 fixed a Touch ID prompt crash.

Read this before promising users anything

Touch ID credentials are device-bound, stored in the macOS keychain and not synced via iCloud. So:

  • ❌ existing iCloud Keychain passkeys — still unusable
  • ❌ 1Password / third-party passkeys — still unusable
  • ❌ "use your phone" / QR hybrid — still unusable
  • ❌ USB security keys — still unusable
  • ❌ Windows / Linux — unsupported by the API
  • ✅ a new passkey registered per-site inside OpenWork, on a Secure Enclave Mac

The fast-fail fallback from #3459 therefore stays, and covers every case above.

Changes

  • forced native rebuilds so better-sqlite3 and node-pty match ABI 145
  • keychain-access-groups entitlement, kept in sync with the signing Team ID from a single source of truth in package.json
  • separate inherit entitlements so the keychain group stays off child binaries
  • configureWebAuthn called first inside whenReady() — calling it earlier trips a native SIGTRAP
  • guarded on darwin + API existence + try/catch, so non-Secure-Enclave Macs and Windows/Linux degrade silently

Breaking changes that actually bit

  1. Native ABI 141 → 145 — fixed with forced Electron rebuild.
  2. configureWebAuthn before app-ready → native SIGTRAP — fixed by calling it first in whenReady().
  3. Chromium 146 enforces focused-document clipboard writes — exposed that hiding the context-menu overlay never returned focus to the page, so page-menu Copy silently failed. Fixed and runtime-proven.

No removed v36–v41 Electron API applied to this codebase.

Regression sweep

Every failure was classified against an Electron 35 baseline (parent commit 658f842ef) rather than assumed.

Spec Verdict
app-smoke PASS
first-run-local PASS
app-den-tls-fault PASS
models-available PASS
library-state-tabs PASS
builtin-browser-context-menu-passkey PASS (after the focus fix)
skills-local FAIL — pre-existing, identical timeout on the Electron 35 baseline
testkit-app-boot, testkit-selftest FAIL — pre-existing, both revisions reject empty DATABASE_HOST
Den/cloud/multi-desktop lanes SKIP — need OPENWORK_EVAL_DEN_API_URL etc.

Runtime probes on Electron 41: node-pty spawned/resized a real PTY and exited 0; better-sqlite3 opened and queried; browser panel loaded, navigated back/forward/reload with all menus working. Two further failures (blueprint materialization Too many parameter values, cookie persistence across restart) reproduce identically on Electron 35 — pre-existing, not ABI regressions.

pnpm --filter @openwork/desktop test 180 passed / 1 skipped; both typechecks exit 0.

Unproven — needs a human

Signed packaging and Touch ID itself are not proven. Local codesign failed with errSecInternalComponent accessing the private key. Someone must, on a Secure Enclave Mac with the signing cert:

  1. produce a signed build and confirm the keychain-access-groups entitlement is present,
  2. register and then sign in with a passkey in the in-app browser,
  3. confirm the fix(desktop): make right-click work in the in-app browser, and stop passkey requests hanging for 3 minutes #3459 fallback prompt stays absent.

Given the upgrade's blast radius, I'd suggest an alpha build before this reaches everyone.

Electron only gained a working WebAuthn platform authenticator in 41.5.0
via app.configureWebAuthn; 35.x had no authenticator at all.

- Electron 35.7.5 -> 41.10.3 (Chromium 146, Node 24, native ABI 141->145)
- force native rebuilds so better-sqlite3 and node-pty match the new ABI
- add the keychain-access-groups entitlement, kept in sync with the
  signing Team ID from a single source of truth
- call configureWebAuthn first inside whenReady(); calling it earlier
  trips a native SIGTRAP

Touch ID credentials are device-bound and macOS-only: iCloud, 1Password,
phone and USB-key passkeys are still not usable, so the fast-fail
fallback stays in place for them.
Chromium 146 enforces that clipboard writes come from a focused
document, which exposed that hiding the overlay never handed focus back
to the page. Copy actions from the page context menu silently failed on
Electron 41.
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview Aug 3, 2026 1:07pm
openwork-den Ready Ready Preview Aug 3, 2026 1:07pm
openwork-den-worker-proxy Ready Ready Preview Aug 3, 2026 1:07pm
openwork-diagnostics Ready Ready Preview Aug 3, 2026 1:07pm
openwork-landing Ready Ready Preview, v0 Aug 3, 2026 1:07pm

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